Index: head/devel/gettext-tools/Makefile =================================================================== --- head/devel/gettext-tools/Makefile (revision 506983) +++ head/devel/gettext-tools/Makefile (revision 506984) @@ -1,63 +1,63 @@ # $FreeBSD$ # NOTE: before committing to this port, contact portmgr to arrange for an # experimental ports run. Untested commits may be backed out at portmgr's # discretion. PORTNAME= gettext-tools -PORTREVISION= 0 +PORTREVISION= 1 COMMENT= GNU gettext development and translation tools LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/../COPYING .include "${.CURDIR}/../gettext/Makefile.common" BUILD_DEPENDS= libtextstyle>=${PORTVERSION}:devel/libtextstyle LIB_DEPENDS= libtextstyle.so:devel/libtextstyle USES= charsetfix cpe gettext-runtime iconv libtool tar:xz USE_LDCONFIG= yes CPE_PRODUCT= gettext CPE_VENDOR= gnu GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-csharp --disable-java --disable-openmp \ --with-included-glib --with-included-libcroco \ --with-included-libunistring --with-included-libxml \ --without-emacs --without-git ac_cv_lib_rt_sched_yield=no INSTALL_TARGET= install-strip TEST_TARGET= check WRKSRC_SUBDIR= gettext-tools DATADIR= ${PREFIX}/share/gettext DOCSDIR= ${PREFIX}/share/doc/gettext PLIST_SUB= PORTVERSION=${PORTVERSION} VERSION=${PORTVERSION:R} INFO= gettext OPTIONS_DEFINE= DOCS EXAMPLES THREADS OPTIONS_DEFAULT=THREADS OPTIONS_EXCLUDE_DragonFly= THREADS THREADS_CONFIGURE_ENABLE= threads post-patch: # Do not patch system float.h. @${REINPLACE_CMD} 's/FLOAT_H=float\.h//' \ ${WRKSRC}/configure # Use libintl installed by gettext-runtime. @${REINPLACE_CMD} '/^LDADD_no =/s,\.\./intl/libgnuintl.la,,' \ ${WRKSRC}/tests/Makefile.in # Use libasprintf installed by gettext-runtime. @${REINPLACE_CMD} 's,[^ ]*libasprintf.la,-lasprintf,' \ ${WRKSRC}/tests/lang-c++ # Use system libtextstyle. @${REINPLACE_CMD} \ -e '/:/!s,[[:<:]]textstyle[^[:space:]]*\.h,,g' \ -e 's,\.\./\.\./libtextstyle/lib/libtextstyle\.la,-ltextstyle,' \ ${WRKSRC}/src/Makefile.in .include Index: head/devel/gettext-tools/files/patch-git_2336451ed68d91ff =================================================================== --- head/devel/gettext-tools/files/patch-git_2336451ed68d91ff (nonexistent) +++ head/devel/gettext-tools/files/patch-git_2336451ed68d91ff (revision 506984) @@ -0,0 +1,81 @@ +From 2336451ed68d91ff4b5ae1acbc1eca30e47a86a9 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Sun, 19 May 2019 13:10:06 +0200 +Subject: [PATCH] msgmerge: Fix behaviour of --for-msgfmt on PO files with no + translations. + +Reported by Don Lawrence +in +via Daiki Ueno +in . + +* gettext-tools/src/msgmerge.c (main): Treat force_po like true if for_msgfmt +is true. +* gettext-tools/tests/msgmerge-26: Add test of PO file with no translations. +--- + gettext-tools/src/msgmerge.c | 4 ++-- + gettext-tools/tests/msgmerge-26 | 36 +++++++++++++++++++++++++++++++++--- + 2 files changed, 35 insertions(+), 5 deletions(-) + +diff --git a/gettext-tools/src/msgmerge.c b/gettext-tools/src/msgmerge.c +index cd762c0..92c9b7a 100644 +--- src/msgmerge.c ++++ src/msgmerge.c +@@ -520,8 +520,8 @@ There is NO WARRANTY, to the extent permitted by law.\n\ + else + { + /* Write the merged message list out. */ +- msgdomain_list_print (result, output_file, output_syntax, force_po, +- false); ++ msgdomain_list_print (result, output_file, output_syntax, ++ for_msgfmt || force_po, false); + } + + exit (EXIT_SUCCESS); +diff --git a/gettext-tools/tests/msgmerge-26 b/gettext-tools/tests/msgmerge-26 +index cd3862e..b86f7a0 100755 +--- tests/msgmerge-26 ++++ tests/msgmerge-26 +@@ -73,7 +73,37 @@ msgstr "Papaya" + EOF + + : ${DIFF=diff} +-${DIFF} mm-test26.ok mm-test26.out +-result=$? ++${DIFF} mm-test26.ok mm-test26.out || Exit 1 + +-exit $result ++# Test with a PO file that has no translated messages. ++ ++cat <<\EOF > mm-test26a.in1 ++msgid "" ++msgstr "" ++"Content-Type: text/plain; charset=UTF-8\n" ++ ++msgid "Hello world" ++msgstr "Hallo Welt" ++EOF ++ ++cat <<\EOF > mm-test26a.in2 ++msgid "" ++msgstr "" ++"Content-Type: text/plain; charset=ASCII\n" ++ ++msgid "Hello, world!" ++msgstr "" ++EOF ++ ++: ${MSGMERGE=msgmerge} ++${MSGMERGE} --for-msgfmt -o mm-test26a.tmp mm-test26a.in1 mm-test26a.in2 \ ++ || Exit 1 ++LC_ALL=C tr -d '\r' < mm-test26a.tmp > mm-test26a.out || Exit 1 ++ ++cat <<\EOF > mm-test26a.ok ++msgid "" ++msgstr "Content-Type: text/plain; charset=UTF-8\n" ++EOF ++ ++: ${DIFF=diff} ++${DIFF} mm-test26a.ok mm-test26a.out || Exit 1 +-- +1.9.1 Property changes on: head/devel/gettext-tools/files/patch-git_2336451ed68d91ff ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property