Re: Remove build machinery for non-UTF-8 charsets
Stefan Sperlingwrites: > On Fri, Mar 18, 2016 at 01:49:05AM +0100, Jeremie Courreges-Anglas wrote: >> >> What's the plan regarding this? libc and locale(1) don't use >> LOCALE_CHARSETS anymore, we only support UTF-8 and I doubt that we'll >> change our mind about that. >> >> The diff below removes support for non-UTF-8 LC_CTYPE files. It >> survived make release. >> >> Thoughts? > > OK. > > I was just about to prepare a similar diff and already sent two chunks > which are part of this diff which I missed when you posted it. > > We should also remove the corresponding .src files from share/locale/ctype > and there's a share/locale/ctype/charset subdirectory with files which > I think can be deleted as well. Those are included by *.src files at the top level. > I haven't tested a build without these > files yet, though. mkr still happy. ok? R bg_BG.CP1251.src R el_GR.ISO8859-7.src R en_US.ASCII.src R en_US.DIS_8859-15.src R en_US.ISO_8859-1.src R en_US.ISO_8859-2.src R en_US.ISO_8859-4.src R hy_AM.ARMSCII-8.src R ja_JP.CTEXT.src R ja_JP.ISO-2022-JP-2.src R ja_JP.ISO-2022-JP.src R ja_JP.SJIS.src R ja_JP.eucJP.src R ko_KR.eucKR.src R lt_LT.ISO8859-13.src R ru_RU.CP866.src R ru_RU.ISO_8859-5.src R ru_RU.KOI8-R.src R tr_TR.ISO8859-9.src R uk_UA.KOI8-U.src R zh_CN.GB18030.src R zh_CN.eucCN.src R zh_TW.BIG5.src R zh_TW.eucTW.src R charset/ASCII R charset/GB2312 R charset/JISX0201-left R charset/JISX0201-right R charset/JISX0208-1978 R charset/JISX0208-1983 R charset/Latin-1 R charset/Latin-2 R charset/Latin-3 R charset/Latin-4 R charset/Latin-5 R charset/Latin-6 R charset/Latin-6+ R charset/Latin-Cyrillic R charset/Latin-Greek R charset/Latin-Hebrew -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
Re: Remove build machinery for non-UTF-8 charsets
On Fri, Mar 18, 2016 at 01:49:05AM +0100, Jeremie Courreges-Anglas wrote: > > What's the plan regarding this? libc and locale(1) don't use > LOCALE_CHARSETS anymore, we only support UTF-8 and I doubt that we'll > change our mind about that. > > The diff below removes support for non-UTF-8 LC_CTYPE files. It > survived make release. > > Thoughts? OK. I was just about to prepare a similar diff and already sent two chunks which are part of this diff which I missed when you posted it. We should also remove the corresponding .src files from share/locale/ctype and there's a share/locale/ctype/charset subdirectory with files which I think can be deleted as well. I haven't tested a build without these files yet, though. > Index: lib/libc/locale/Makefile.inc > === > RCS file: /cvs/src/lib/libc/locale/Makefile.inc,v > retrieving revision 1.20 > diff -u -p -r1.20 Makefile.inc > --- lib/libc/locale/Makefile.inc 3 Jul 2015 11:15:19 - 1.20 > +++ lib/libc/locale/Makefile.inc 17 Mar 2016 22:36:13 - > @@ -3,9 +3,6 @@ > # locale sources > .PATH: ${LIBCSRCDIR}/locale > > -# for LOCALECHARSETS > -.include "${.CURDIR}/../../share/locale/ctype/Makefile.inc" > - > SRCS+= btowc.c _def_messages.c _def_monetary.c _def_numeric.c > _def_time.c \ > localeconv.c nl_langinfo.c setlocale.c iswctype.c __mb_cur_max.c \ > mblen.c mbrlen.c mbstowcs.c mbtowc.c multibyte_citrus.c wcscoll.c \ > @@ -43,4 +40,3 @@ MLINKS+=setlocale.3 localeconv.3 \ > wcsrtombs.3 wcsnrtombs.3 > > CFLAGS+=-I${.CURDIR} -I${LIBCSRCDIR}/citrus > -CFLAGS+=-DLOCALE_CHARSETS="\"${LOCALECHARSETS}\"" > Index: share/locale/ctype/Makefile > === > RCS file: /cvs/src/share/locale/ctype/Makefile,v > retrieving revision 1.10 > diff -u -p -r1.10 Makefile > --- share/locale/ctype/Makefile 1 Jul 2013 00:36:12 - 1.10 > +++ share/locale/ctype/Makefile 17 Mar 2016 22:34:44 - > @@ -6,53 +6,18 @@ NOMAN= # defined > # pull LOCALEDIR and other declarations > .include > > -# pull in LOCALECHARSETS > -.include "${.CURDIR}/Makefile.inc" > +all: UTF-8.out > > -LOCALESRC_ARMSCII-8 = hy_AM.ARMSCII-8 > -LOCALESRC_CP1251 = bg_BG.CP1251 > -LOCALESRC_CP866 = ru_RU.CP866 > -LOCALESRC_ISO8859-1 = en_US.ISO_8859-1 > -LOCALESRC_ISO8859-2 = en_US.ISO_8859-2 > -LOCALESRC_ISO8859-4 = en_US.ISO_8859-4 > -LOCALESRC_ISO8859-5 = ru_RU.ISO_8859-5 > -LOCALESRC_ISO8859-7 = el_GR.ISO8859-7 > -LOCALESRC_ISO8859-9 = tr_TR.ISO8859-9 > -LOCALESRC_ISO8859-13 = lt_LT.ISO8859-13 > -LOCALESRC_ISO8859-15 = en_US.DIS_8859-15 > -LOCALESRC_KOI8-R = ru_RU.KOI8-R > -LOCALESRC_KOI8-U = uk_UA.KOI8-U > -LOCALESRC_UTF-8 = en_US.UTF-8 > - > -all: ${LOCALECHARSETS:S/$/.out/g} > -realall: ${LOCALECHARSETS:S/$/.out/g} > - > -CLEANFILES+= ${LOCALECHARSETS:S/$/.out/g} > +UTF-8.out: en_US.UTF-8.src > + ${CPP} < ${.CURDIR}/en_US.UTF-8.src | \ > + sed -e '/^#/d' | mklocale -o ${.TARGET} > > -FILES= ${LOCALECHARSETS:S/$/.out/g} > -.for locale in ${LOCALECHARSETS} > -FILESDIR_${locale}.out= ${LOCALEDIR}/${locale} > -FILESNAME_${locale}.out= LC_CTYPE > -.endfor > +CLEANFILES+= UTF-8.out > > install: > -.for locale in ${LOCALECHARSETS} > install -o ${LOCALEOWN} -g ${LOCALEGRP} -m ${DIRMODE} -d \ > - ${DESTDIR}${LOCALEDIR}/${locale} > + ${DESTDIR}${LOCALEDIR}/UTF-8 > install -o ${LOCALEOWN} -g ${LOCALEGRP} -m ${LOCALEMODE} \ > - ${locale}.out ${DESTDIR}${LOCALEDIR}/${locale}/LC_CTYPE > -.endfor > - > -.for locale in ${LOCALECHARSETS} > -${locale}.out: ${LOCALESRC_${locale}}.src > - ${CPP} -I${.CURDIR} < ${.CURDIR}/${LOCALESRC_${locale}}.src | \ > - sed -e '/^#/d' | mklocale -o ${.TARGET} > -.endfor > - > -.SUFFIXES: .src .out > -.src.out: > - ${CPP} -I${.CURDIR} < ${.IMPSRC} | sed -e '/^#/d' | \ > -mklocale -o ${.TARGET} > - > + UTF-8.out ${DESTDIR}${LOCALEDIR}/UTF-8/LC_CTYPE > > .include > Index: share/locale/ctype/Makefile.inc > === > RCS file: share/locale/ctype/Makefile.inc > diff -N share/locale/ctype/Makefile.inc > --- share/locale/ctype/Makefile.inc 1 Jul 2013 00:35:22 - 1.2 > +++ /dev/null 1 Jan 1970 00:00:00 - > @@ -1,6 +0,0 @@ > -# $OpenBSD: Makefile.inc,v 1.2 2013/07/01 00:35:22 fgsch Exp $ > - > -# Charsets supported by LC_CTYPE locale > -LOCALECHARSETS= ARMSCII-8 CP1251 CP866 ISO8859-1 ISO8859-13 ISO8859-15 \ > - ISO8859-2 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 KOI8-R \ > - KOI8-U UTF-8 > Index: usr.bin/locale/Makefile > === > RCS file: /cvs/src/usr.bin/locale/Makefile,v > retrieving revision 1.1 > diff -u -p -r1.1 Makefile > --- usr.bin/locale/Makefile 3 Jun 2013 14:27:50 - 1.1 > +++ usr.bin/locale/Makefile 17
Remove build machinery for non-UTF-8 charsets
What's the plan regarding this? libc and locale(1) don't use LOCALE_CHARSETS anymore, we only support UTF-8 and I doubt that we'll change our mind about that. The diff below removes support for non-UTF-8 LC_CTYPE files. It survived make release. Thoughts? Index: lib/libc/locale/Makefile.inc === RCS file: /cvs/src/lib/libc/locale/Makefile.inc,v retrieving revision 1.20 diff -u -p -r1.20 Makefile.inc --- lib/libc/locale/Makefile.inc3 Jul 2015 11:15:19 - 1.20 +++ lib/libc/locale/Makefile.inc17 Mar 2016 22:36:13 - @@ -3,9 +3,6 @@ # locale sources .PATH: ${LIBCSRCDIR}/locale -# for LOCALECHARSETS -.include "${.CURDIR}/../../share/locale/ctype/Makefile.inc" - SRCS+= btowc.c _def_messages.c _def_monetary.c _def_numeric.c _def_time.c \ localeconv.c nl_langinfo.c setlocale.c iswctype.c __mb_cur_max.c \ mblen.c mbrlen.c mbstowcs.c mbtowc.c multibyte_citrus.c wcscoll.c \ @@ -43,4 +40,3 @@ MLINKS+=setlocale.3 localeconv.3 \ wcsrtombs.3 wcsnrtombs.3 CFLAGS+=-I${.CURDIR} -I${LIBCSRCDIR}/citrus -CFLAGS+=-DLOCALE_CHARSETS="\"${LOCALECHARSETS}\"" Index: share/locale/ctype/Makefile === RCS file: /cvs/src/share/locale/ctype/Makefile,v retrieving revision 1.10 diff -u -p -r1.10 Makefile --- share/locale/ctype/Makefile 1 Jul 2013 00:36:12 - 1.10 +++ share/locale/ctype/Makefile 17 Mar 2016 22:34:44 - @@ -6,53 +6,18 @@ NOMAN=# defined # pull LOCALEDIR and other declarations .include -# pull in LOCALECHARSETS -.include "${.CURDIR}/Makefile.inc" +all: UTF-8.out -LOCALESRC_ARMSCII-8 = hy_AM.ARMSCII-8 -LOCALESRC_CP1251 = bg_BG.CP1251 -LOCALESRC_CP866 = ru_RU.CP866 -LOCALESRC_ISO8859-1 = en_US.ISO_8859-1 -LOCALESRC_ISO8859-2 = en_US.ISO_8859-2 -LOCALESRC_ISO8859-4 = en_US.ISO_8859-4 -LOCALESRC_ISO8859-5 = ru_RU.ISO_8859-5 -LOCALESRC_ISO8859-7 = el_GR.ISO8859-7 -LOCALESRC_ISO8859-9 = tr_TR.ISO8859-9 -LOCALESRC_ISO8859-13 = lt_LT.ISO8859-13 -LOCALESRC_ISO8859-15 = en_US.DIS_8859-15 -LOCALESRC_KOI8-R = ru_RU.KOI8-R -LOCALESRC_KOI8-U = uk_UA.KOI8-U -LOCALESRC_UTF-8 = en_US.UTF-8 - -all: ${LOCALECHARSETS:S/$/.out/g} -realall: ${LOCALECHARSETS:S/$/.out/g} - -CLEANFILES+= ${LOCALECHARSETS:S/$/.out/g} +UTF-8.out: en_US.UTF-8.src + ${CPP} < ${.CURDIR}/en_US.UTF-8.src | \ + sed -e '/^#/d' | mklocale -o ${.TARGET} -FILES= ${LOCALECHARSETS:S/$/.out/g} -.for locale in ${LOCALECHARSETS} -FILESDIR_${locale}.out=${LOCALEDIR}/${locale} -FILESNAME_${locale}.out= LC_CTYPE -.endfor +CLEANFILES+= UTF-8.out install: -.for locale in ${LOCALECHARSETS} install -o ${LOCALEOWN} -g ${LOCALEGRP} -m ${DIRMODE} -d \ - ${DESTDIR}${LOCALEDIR}/${locale} + ${DESTDIR}${LOCALEDIR}/UTF-8 install -o ${LOCALEOWN} -g ${LOCALEGRP} -m ${LOCALEMODE} \ - ${locale}.out ${DESTDIR}${LOCALEDIR}/${locale}/LC_CTYPE -.endfor - -.for locale in ${LOCALECHARSETS} -${locale}.out: ${LOCALESRC_${locale}}.src - ${CPP} -I${.CURDIR} < ${.CURDIR}/${LOCALESRC_${locale}}.src | \ - sed -e '/^#/d' | mklocale -o ${.TARGET} -.endfor - -.SUFFIXES: .src .out -.src.out: - ${CPP} -I${.CURDIR} < ${.IMPSRC} | sed -e '/^#/d' | \ -mklocale -o ${.TARGET} - + UTF-8.out ${DESTDIR}${LOCALEDIR}/UTF-8/LC_CTYPE .include Index: share/locale/ctype/Makefile.inc === RCS file: share/locale/ctype/Makefile.inc diff -N share/locale/ctype/Makefile.inc --- share/locale/ctype/Makefile.inc 1 Jul 2013 00:35:22 - 1.2 +++ /dev/null 1 Jan 1970 00:00:00 - @@ -1,6 +0,0 @@ -# $OpenBSD: Makefile.inc,v 1.2 2013/07/01 00:35:22 fgsch Exp $ - -# Charsets supported by LC_CTYPE locale -LOCALECHARSETS=ARMSCII-8 CP1251 CP866 ISO8859-1 ISO8859-13 ISO8859-15 \ - ISO8859-2 ISO8859-4 ISO8859-5 ISO8859-7 ISO8859-9 KOI8-R \ - KOI8-U UTF-8 Index: usr.bin/locale/Makefile === RCS file: /cvs/src/usr.bin/locale/Makefile,v retrieving revision 1.1 diff -u -p -r1.1 Makefile --- usr.bin/locale/Makefile 3 Jun 2013 14:27:50 - 1.1 +++ usr.bin/locale/Makefile 17 Mar 2016 22:36:13 - @@ -1,9 +1,5 @@ # $OpenBSD: Makefile,v 1.1 2013/06/03 14:27:50 stsp Exp $ -# for LOCALECHARSETS -.include "${.CURDIR}/../../share/locale/ctype/Makefile.inc" - PROG= locale -CFLAGS+= -DLOCALE_CHARSETS="\"${LOCALECHARSETS}\"" .include -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
Re: Remove build machinery for non-UTF-8 charsets
On Thursday, March 17, 2016, Jeremie Courreges-Anglaswrote: > > What's the plan regarding this? libc and locale(1) don't use > LOCALE_CHARSETS anymore, we only support UTF-8 and I doubt that we'll > change our mind about that. > > The diff below removes support for non-UTF-8 LC_CTYPE files. It > survived make release. > > Thoughts? > I think I had a diff like this at some point, but we were still on the > decision of killing the other encodings. That boat has launched, so let's > do it. > Philip Guenther