aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2007-04-25 02:39:02 +0800
committerpav <pav@FreeBSD.org>2007-04-25 02:39:02 +0800
commitd37be30c37247dff732d70daf3f4a25bd30c82a5 (patch)
tree9e32dbd374476c0c2a58fb191d95c5775fa7da3c /graphics
parentc3ba9ef487246d795188ec99fdef5db40e952435 (diff)
downloadfreebsd-ports-gnome-d37be30c37247dff732d70daf3f4a25bd30c82a5.tar.gz
freebsd-ports-gnome-d37be30c37247dff732d70daf3f4a25bd30c82a5.tar.zst
freebsd-ports-gnome-d37be30c37247dff732d70daf3f4a25bd30c82a5.zip
- Support WITHOUT_NLS
PR: ports/111459 Submitted by: Helge Oldach <ports-exif-apr07@oldach.net>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/exif/Makefile10
-rw-r--r--graphics/exif/files/patch-exif-i18n.c30
-rw-r--r--graphics/exif/pkg-plist6
3 files changed, 42 insertions, 4 deletions
diff --git a/graphics/exif/Makefile b/graphics/exif/Makefile
index dbe9a9bcaf87..88d8b195bc8d 100644
--- a/graphics/exif/Makefile
+++ b/graphics/exif/Makefile
@@ -18,9 +18,17 @@ LIB_DEPENDS= exif.12:${PORTSDIR}/graphics/libexif \
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
.include <bsd.port.mk>
diff --git a/graphics/exif/files/patch-exif-i18n.c b/graphics/exif/files/patch-exif-i18n.c
new file mode 100644
index 000000000000..17c9f6a801a3
--- /dev/null
+++ b/graphics/exif/files/patch-exif-i18n.c
@@ -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
+ }
diff --git a/graphics/exif/pkg-plist b/graphics/exif/pkg-plist
index 3d2b1fa12f1e..0b7bbf80ab18 100644
--- a/graphics/exif/pkg-plist
+++ b/graphics/exif/pkg-plist
@@ -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