ports/111459: [patch] ports/graphics/exif can do WITHOUT_NLS
Helge Oldach
ports-exif-apr07 at oldach.net
Tue Apr 10 19:40:10 UTC 2007
>Number: 111459
>Category: ports
>Synopsis: [patch] ports/graphics/exif can do WITHOUT_NLS
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Apr 10 19:40:08 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Helge Oldach
>Release: FreeBSD 6.2-790 i386
>Organization:
>Environment:
System: FreeBSD localhost 6.2-790 FreeBSD 6.2-790 #0: Tue Apr 10 17:03:24 CEST 2007 toor at localhost:/usr/obj/usr/src/sys/HMO i386
>Description:
ports/graphics/exif does support WITHOUT_NLS using our standard knob.
Trivial fix below (includes a tweak to exif-i18n.c taken from exif's CVS
but corrected).
>How-To-Repeat:
>Fix:
--- ./Makefile.ctm Thu Feb 23 16:08:13 2006
+++ ./Makefile Tue Apr 10 21:23:18 2007
@@ -18,8 +18,16 @@
popt.0:${PORTSDIR}/devel/popt
GNU_CONFIGURE= yes
-USE_ICONV= yes
CONFIGURE_ARGS= --with-popt-prefix=${LOCALBASE}
+
+.if defined(WITHOUT_NLS)
+CONFIGURE_ARGS+= --disable-nls
+PLIST_SUB+= NLS="@comment "
+.else
+USE_ICONV= yes
+USE_GETTEXT= yes
+PLIST_SUB+= NLS=""
+.endif
MAN1= exif.1
--- ./pkg-plist.ctm Tue May 3 00:11:54 2005
+++ ./pkg-plist Tue Apr 10 05:55:07 2007
@@ -1,4 +1,4 @@
bin/exif
-share/locale/de/LC_MESSAGES/exif.mo
-share/locale/es/LC_MESSAGES/exif.mo
-share/locale/fr/LC_MESSAGES/exif.mo
+%%NLS%%share/locale/de/LC_MESSAGES/exif.mo
+%%NLS%%share/locale/es/LC_MESSAGES/exif.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/exif.mo
--- /dev/null Tue Apr 10 21:27:18 2007
+++ ./files/patch-exif-i18n.c Tue Apr 10 21:27:18 2007
@@ -0,0 +1,30 @@
+--- exif/exif-i18n.c 2003/09/30 22:53:37 1.2
++++ exif/exif-i18n.c 2004/08/27 16:28:18 1.3
+@@ -1,7 +1,10 @@
+ #include <config.h>
+ #include "exif-i18n.h"
+
+-#include <iconv.h>
++#ifdef HAVE_ICONV
++# include <iconv.h>
++#endif
++
+ #include <string.h>
+ #include <sys/types.h>
+
+@@ -11,6 +14,7 @@
+ const char *
+ exif_i18n_convert_utf8_to_lat1 (const char *in)
+ {
++#ifdef HAVE_ICONV
+ static iconv_t tr = 0;
+ size_t t = (in ? strlen (in) : 0);
+ static char buf[2048];
+@@ -23,4 +27,7 @@
+ if (!tr) tr = iconv_open ("ISO-8859-1", "UTF-8");
+ iconv (tr, (char **) &in, &t, (char **) &out, &buf_size);
+ return buf;
++#else
++ return in;
++#endif
+ }
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list