From 7915e3f4b62b4f11910e41a287cda974a5194624 Mon Sep 17 00:00:00 2001 From: wiz Date: Wed, 17 May 2023 11:53:23 +0000 Subject: [PATCH] recode: update to 3.7.14. Version 3.7.14 ============== + No user-visible changes; minor clean-ups as part of the Debian packaging process. Version 3.7.13 ============== + Fix request diagnostics with --verbose: avoid output of confusing and possibly incorrect diagnostics. + Fix a file descriptor leak. Version 3.7.12 ============== + Simplify support for ignoring invalid input with iconv, integrated with the --strict and --force mechanisms. + Various documentation improvements. Version 3.7.11 ============== + Re-add support for transliteration with iconv (removed in 3.7). + Add support for ignoring invalid input with iconv. + Fix a bug introduced in 3.7.10 that prevented building the code. Version 3.7.10 ============== + In recode program, only use iconv if needed; add --prefer-iconv option to allow its use in all cases. + Remove support for pre-3.5 request syntax (colon as charset separator). + PO files have been updated from the Translation Project. + Build system fixes and improvements. + Update gnulib to fix a problem building on Android. + Fix confusingly wrong NEWS entry for 3.7.4. Version 3.7.9 ============= + A fix to the CP1252 encoding: U+017E LATIN SMALL LETTER Z WITH CARON is at byte 0x9e, not byte 0x8f. + Minor documentation fixes. Version 3.7.8 ============= + Improvements to the build system. + Fix man page generation, and document that help2man must be built with gettext. + Updates to nl, pt, sv translations (thanks, translators!). Version 3.7.7 ============= + Improvements to the build system. + Updates to nl, pt, sv translations (thanks, translators!). Version 3.7.6 ============= + Improvements to the build system. Version 3.7.5 ============= + Port tests to Python 3. Version 3.7.4 ============= + Fixes to file handling in recode program. + Fix tests on Windows. Version 3.7.3 ============= + No code changes to recode itself; this release features a properly versioned shared library. Version 3.7.2 ============= + No code changes to recode itself; this release includes updates to license headers to guide users to the GPL online, corrects the version of COPYING-LIB shipped with the sources, and updates the message files for various languages. Version 3.7.1 ============= + No code changes to recode itself; this release just updates the version of gnulib to fix a bug in glibc 2.28: (GitHub issue #11 https://github.com/rrthomas/recode/issues/11 Version 3.7 =========== + Converters for BibTeX (from Vincent Danjean) and the ANSEL and ISO 5426 character sets (from Wolfram Schneider) have been added. + The conversion strategies (whether to use pipes, memory or files) are no longer available. Now it is reasonable to assume virtual memory, so files and memory have similar performance characteristics (in particular, the memory method is not limited by physical memory.) Further, tests showed that even for runs on little data, the pipes method has minimal performance impact (none was measured). This is not a surprise, as for one-step recodings, the commonest case, no forking is needed. The command-line options -i, -p and --sequence=STRATEGY are ignored for backwards compatibility. + Recode does not include libiconv anymore, but uses an external iconv library if one was available at installation time. The -x: option to the program, or a new flag to the library recode_new_outer function, inhibits the initialisation and usage of iconv. + The experimental ``tree`` surface is removed. Structured data needs a proper parser, and that doesn't fit the framework of Recode. + Many bug fixes. + Long ago, I renamed GNU recode to Free recode: the permission for using the GNU prefix mandated a level of obedience to the FSF that once went overboard, in my opinion. After that change, I realized that some people read Free as a four letter word! To be peaceful, this version changes the name again, to merely Recode. recode (no capital) still names the executable program specifically, or the distribution archive itself. + make check accepts a LIMIT= option, for limiting tests to one or a few cases. See tests/Makefile.am. + PO files have been updated from the Translation Project. + The test system has been overhauled. Tests now run much faster, and require Python and Cython. + Overhauled build system, now using gnulib for portability. This reduces the amount of code in the Recode tree considerably. --- converters/recode/Makefile | 36 +++++++------ converters/recode/PLIST | 22 +++++++- converters/recode/distinfo | 12 ++--- converters/recode/patches/patch-aa | 42 --------------- .../recode/patches/patch-libiconv_aliases.h | 12 ----- .../recode/patches/patch-src_Makefile_in | 51 ------------------- .../recode/patches/patch-src_recodext.h | 21 -------- 7 files changed, 45 insertions(+), 151 deletions(-) delete mode 100644 converters/recode/patches/patch-aa delete mode 100644 converters/recode/patches/patch-libiconv_aliases.h delete mode 100644 converters/recode/patches/patch-src_Makefile_in delete mode 100644 converters/recode/patches/patch-src_recodext.h diff --git a/converters/recode/Makefile b/converters/recode/Makefile index 78236ce8eac5..cd178a41df9a 100644 --- a/converters/recode/Makefile +++ b/converters/recode/Makefile @@ -1,26 +1,30 @@ -# $NetBSD: Makefile,v 1.35 2023/05/17 11:22:57 wiz Exp $ -# +# $NetBSD: Makefile,v 1.36 2023/05/17 11:53:23 wiz Exp $ -DISTNAME= recode-3.6 -PKGREVISION= 6 -CATEGORIES= converters -MASTER_SITES= ${MASTER_SITE_GNU:=recode/} +DISTNAME= recode-3.7.14 +CATEGORIES= converters +MASTER_SITES= ${MASTER_SITE_GITHUB:=rrthomas/} +GITHUB_RELEASE= v${PKGVERSION_NOREV} -MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= https://www.gnu.org/software/recode/recode.html -COMMENT= Convert files between character sets and usages -LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://github.com/rrthomas/recode/ +COMMENT= Convert files between character sets and usages +LICENSE= gnu-gpl-v3 AND gnu-lgpl-v3 -USE_PKGLOCALEDIR= yes -GNU_CONFIGURE= yes -USE_LIBTOOL= yes -BROKEN_GETTEXT_DETECTION= yes +# needed only for tests, but detected at configure time +BUILD_DEPENDS+= ${PYPKGPREFIX}-cython-[0-9]*:../../devel/py-cython +# to detect cython properly, configure is only looking for unversioned cython +CONFIGURE_ENV+= CYTHON=cython-${PYVERSSUFFIX} + +GNU_CONFIGURE= yes +USE_LIBTOOL= yes INFO_FILES= yes TEST_TARGET= check -post-extract: - ${CP} ${WRKSRC}/lib/error.c ${WRKSRC}/src/error.c +PYTHON_VERSIONS_INCOMPATIBLE= 27 +PYTHON_FOR_BUILD_ONLY= yes +.include "../../lang/python/tool.mk" .include "../../devel/gettext-lib/buildlink3.mk" +.include "../../converters/libiconv/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/converters/recode/PLIST b/converters/recode/PLIST index bd337ddab131..d3ae6236fbba 100644 --- a/converters/recode/PLIST +++ b/converters/recode/PLIST @@ -1,19 +1,39 @@ -@comment $NetBSD: PLIST,v 1.9 2011/12/20 17:20:02 dholland Exp $ +@comment $NetBSD: PLIST,v 1.10 2023/05/17 11:53:23 wiz Exp $ bin/recode include/recode.h include/recodext.h info/recode.info lib/librecode.la man/man1/recode.1 +share/locale/be/LC_MESSAGES/recode.mo +share/locale/ca/LC_MESSAGES/recode.mo +share/locale/cs/LC_MESSAGES/recode.mo share/locale/da/LC_MESSAGES/recode.mo share/locale/de/LC_MESSAGES/recode.mo share/locale/el/LC_MESSAGES/recode.mo +share/locale/eo/LC_MESSAGES/recode.mo share/locale/es/LC_MESSAGES/recode.mo +share/locale/fi/LC_MESSAGES/recode.mo share/locale/fr/LC_MESSAGES/recode.mo +share/locale/ga/LC_MESSAGES/recode.mo share/locale/gl/LC_MESSAGES/recode.mo +share/locale/he/LC_MESSAGES/recode.mo +share/locale/hr/LC_MESSAGES/recode.mo +share/locale/hu/LC_MESSAGES/recode.mo +share/locale/id/LC_MESSAGES/recode.mo share/locale/it/LC_MESSAGES/recode.mo +share/locale/nb/LC_MESSAGES/recode.mo share/locale/nl/LC_MESSAGES/recode.mo share/locale/pl/LC_MESSAGES/recode.mo share/locale/pt/LC_MESSAGES/recode.mo +share/locale/pt_BR/LC_MESSAGES/recode.mo +share/locale/ro/LC_MESSAGES/recode.mo +share/locale/ru/LC_MESSAGES/recode.mo +share/locale/sk/LC_MESSAGES/recode.mo share/locale/sl/LC_MESSAGES/recode.mo +share/locale/sr/LC_MESSAGES/recode.mo share/locale/sv/LC_MESSAGES/recode.mo +share/locale/tr/LC_MESSAGES/recode.mo +share/locale/uk/LC_MESSAGES/recode.mo +share/locale/vi/LC_MESSAGES/recode.mo +share/locale/zh_CN/LC_MESSAGES/recode.mo diff --git a/converters/recode/distinfo b/converters/recode/distinfo index a9aa985f5175..14ee698ff2d7 100644 --- a/converters/recode/distinfo +++ b/converters/recode/distinfo @@ -1,9 +1,5 @@ -$NetBSD: distinfo,v 1.12 2021/10/26 10:06:51 nia Exp $ +$NetBSD: distinfo,v 1.13 2023/05/17 11:53:23 wiz Exp $ -BLAKE2s (recode-3.6.tar.gz) = e65845fff7caca553a03765fbfbcc75cc0d6e6039481517e9be27ef4dda143f7 -SHA512 (recode-3.6.tar.gz) = 68de277ac8cd5f6023bb077b959ab5778a78edac1299d507bab906824080b6f86e9bfcd89169aa474197c2faa9af2ceb1ed272c8dd4d50caef373afa05daed1b -Size (recode-3.6.tar.gz) = 1751886 bytes -SHA1 (patch-aa) = bc1fcbced4af16cb059beabbc34009e3dcd960d7 -SHA1 (patch-libiconv_aliases.h) = c0f4b390cb87157b0a46436f04291a2f10332f6f -SHA1 (patch-src_Makefile_in) = 7f0d2a585aa18af817c221a2c4934550fdb5c7e6 -SHA1 (patch-src_recodext.h) = f404830d5573e86ce5f9c9ce6477110f6c9dc1c0 +BLAKE2s (recode-3.7.14.tar.gz) = cb1c0c3eb297df8f31162c09fede81a010c9969f41b797a538713d5e3d7137ec +SHA512 (recode-3.7.14.tar.gz) = ca0e9aa392f0571cfd1cf9566a15d7651a80edf40d603eadaa4c4ee2d7843ffa9d6074be30a21dac2ab192fe601f8581721d719d055911eeccb455acfe112596 +Size (recode-3.7.14.tar.gz) = 2297471 bytes diff --git a/converters/recode/patches/patch-aa b/converters/recode/patches/patch-aa deleted file mode 100644 index cb4f77965530..000000000000 --- a/converters/recode/patches/patch-aa +++ /dev/null @@ -1,42 +0,0 @@ -$NetBSD: patch-aa,v 1.3 2011/08/26 08:13:44 wiz Exp $ - -date: 2009/03/04 08:44:13; author: yyamano; state: Exp; -Make this build on Mac OS X. - ---- lib/Makefile.in.orig 2001-01-22 10:14:14.000000000 -0800 -+++ lib/Makefile.in -@@ -108,7 +108,11 @@ AUTOMAKE_OPTIONS = gnits - - noinst_LIBRARIES = libreco.a - noinst_HEADERS = error.h getopt.h gettext.h pathmax.h xstring.h -+.if ${OPSYS} == "Darwin" -+libreco_a_SOURCES = error.c xstrdup.c -+.else - libreco_a_SOURCES = error.c getopt.c getopt1.c xstrdup.c -+.endif - - EXTRA_DIST = alloca.c gettext.c malloc.c realloc.c strtol.c strtoul.c - -@@ -128,7 +132,11 @@ CPPFLAGS = @CPPFLAGS@ - LDFLAGS = @LDFLAGS@ - LIBS = @LIBS@ - libreco_a_DEPENDENCIES = @ALLOCA@ @LIBOBJS@ -+.if ${OPSYS} == "Darwin" -+libreco_a_OBJECTS = error.o xstrdup.o -+.else - libreco_a_OBJECTS = error.o getopt.o getopt1.o xstrdup.o -+.endif - AR = ar - CFLAGS = @CFLAGS@ - COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@@ -256,8 +264,10 @@ distdir: $(DISTFILES) - fi; \ - done - error.o: error.c ../config.h error.h -+.if ${OPSYS} != "Darwin" - getopt.o: getopt.c ../config.h - getopt1.o: getopt1.c ../config.h getopt.h -+.endif - xstrdup.o: xstrdup.c ../config.h - - info-am: diff --git a/converters/recode/patches/patch-libiconv_aliases.h b/converters/recode/patches/patch-libiconv_aliases.h deleted file mode 100644 index f560a8c4c192..000000000000 --- a/converters/recode/patches/patch-libiconv_aliases.h +++ /dev/null @@ -1,12 +0,0 @@ -$NetBSD: patch-libiconv_aliases.h,v 1.1 2012/04/19 21:02:11 joerg Exp $ - ---- libiconv/aliases.h.orig 2012-04-19 13:47:17.000000000 +0000 -+++ libiconv/aliases.h -@@ -66,6 +66,7 @@ aliases_hash (register const char *str, - return hval + asso_values[(unsigned char) str[len - 1]]; - } - -+static - #ifdef __GNUC__ - __inline - #endif diff --git a/converters/recode/patches/patch-src_Makefile_in b/converters/recode/patches/patch-src_Makefile_in deleted file mode 100644 index 79f9235cfeb6..000000000000 --- a/converters/recode/patches/patch-src_Makefile_in +++ /dev/null @@ -1,51 +0,0 @@ -$NetBSD: patch-src_Makefile_in,v 1.1 2011/12/20 17:22:25 dholland Exp $ - -Include lib/error.c in librecode.so, or else librecode.so ends up with -an undefined symbol "error". Fix mostly from PR 32253. - ---- src/Makefile.in.orig 2001-01-22 18:14:16.000000000 +0000 -+++ src/Makefile.in -@@ -129,7 +129,7 @@ L_SURFACES = - recode_SOURCES = main.c freeze.c mixed.c - recode_LDADD = librecode.la ../lib/libreco.a - --librecode_la_SOURCES = argmatch.c charname.c combine.c fr-charname.c hash.c iconv.c libiconv.c localcharset.c merged.c names.c outer.c quotearg.c recode.c request.c strip-pool.c task.c xmalloc.c $(C_STEPS) -+librecode_la_SOURCES = argmatch.c charname.c combine.c fr-charname.c hash.c iconv.c libiconv.c localcharset.c merged.c names.c outer.c quotearg.c recode.c request.c strip-pool.c task.c xmalloc.c error.c $(C_STEPS) - - librecode_la_LDFLAGS = -version-info 0:0:0 - -@@ -165,7 +165,7 @@ ebcdic$U.lo ibmpc$U.lo iconqnx$U.lo lat1 - strip-data$U.lo testdump$U.lo ucs$U.lo utf16$U.lo utf7$U.lo utf8$U.lo \ - varia$U.lo vn$U.lo flat$U.lo html$U.lo lat1ltex$U.lo lat1txte$U.lo \ - rfc1345$U.lo texinfo$U.lo base64$U.lo dump$U.lo endline$U.lo \ --permut$U.lo quoted$U.lo -+permut$U.lo quoted$U.lo error$U.lo - PROGRAMS = $(bin_PROGRAMS) - - recode_OBJECTS = main$U.o freeze$U.o mixed$U.o -@@ -419,6 +419,8 @@ vn_.c: vn.c $(ANSI2KNR) - $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/vn.c; then echo $(srcdir)/vn.c; else echo vn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > vn_.c - xmalloc_.c: xmalloc.c $(ANSI2KNR) - $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > xmalloc_.c -+error_.c: error.c $(ANSI2KNR) -+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/error.c; then echo $(srcdir)/error.c; else echo error.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > error_.c - african_.o african_.lo afrtran_.o afrtran_.lo applemac_.o applemac_.lo \ - argmatch_.o argmatch_.lo atarist_.o atarist_.lo bangbang_.o \ - bangbang_.lo base64_.o base64_.lo cdcnos_.o cdcnos_.lo charname_.o \ -@@ -435,7 +437,7 @@ request_.o request_.lo rfc1345_.o rfc134 - strip-data_.lo strip-pool_.o strip-pool_.lo task_.o task_.lo \ - testdump_.o testdump_.lo texinfo_.o texinfo_.lo ucs_.o ucs_.lo utf16_.o \ - utf16_.lo utf7_.o utf7_.lo utf8_.o utf8_.lo varia_.o varia_.lo vn_.o \ --vn_.lo xmalloc_.o xmalloc_.lo : $(ANSI2KNR) -+vn_.lo xmalloc_.o xmalloc_.lo error_.lo : $(ANSI2KNR) - - install-man1: - $(mkinstalldirs) $(DESTDIR)$(man1dir) -@@ -690,6 +692,7 @@ varia.lo varia.o : varia.c common.h ../c - vn.lo vn.o : vn.c common.h ../config.h xalloc.h argmatch.h \ - ../lib/error.h recodext.h recode.h - xmalloc.lo xmalloc.o : xmalloc.c ../config.h ../lib/error.h xalloc.h -+error.lo error.o : ../lib/error.h - - info-am: - info: info-am diff --git a/converters/recode/patches/patch-src_recodext.h b/converters/recode/patches/patch-src_recodext.h deleted file mode 100644 index 4391d7521689..000000000000 --- a/converters/recode/patches/patch-src_recodext.h +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-src_recodext.h,v 1.1 2011/08/26 08:13:44 wiz Exp $ - -Fix gcc-4.5 problem: -In file included from common.h:140:0, - from charname.c:20: -recodext.h:221:5: error: width of 'ignore' exceeds its type - -See also -https://github.com/pinard/Recode/commit/a34dfd2257f412dff59f2ad7f714252fa200028e#src/recodext.h - ---- src/recodext.h.orig 2001-01-04 14:36:54.000000000 +0000 -+++ src/recodext.h -@@ -218,7 +218,7 @@ struct recode_symbol - enum recode_symbol_type type : 3; - - /* Non zero if this one should be ignored. */ -- bool ignore : 2; -+ bool ignore : 1; - }; - - struct recode_surface_list