aboutsummaryrefslogtreecommitdiff
path: root/devel/gettext-runtime
diff options
context:
space:
mode:
Diffstat (limited to 'devel/gettext-runtime')
-rw-r--r--devel/gettext-runtime/Makefile52
-rw-r--r--devel/gettext-runtime/files/patch-configure11
-rw-r--r--devel/gettext-runtime/files/patch-intl-threadlib.c39
-rw-r--r--devel/gettext-runtime/pkg-descr6
-rw-r--r--devel/gettext-runtime/pkg-plist69
5 files changed, 177 insertions, 0 deletions
diff --git a/devel/gettext-runtime/Makefile b/devel/gettext-runtime/Makefile
new file mode 100644
index 000000000000..6535480433df
--- /dev/null
+++ b/devel/gettext-runtime/Makefile
@@ -0,0 +1,52 @@
+# $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-runtime
+PORTREVISION= 0
+
+COMMENT= GNU gettext runtime libraries and programs
+
+LICENSE= LGPL21 GPLv3
+LICENSE_COMB= multi
+LICENSE_FILE_LGPL21= ${WRKSRC}/intl/COPYING.LIB
+LICENSE_FILE_GPLv3= ${WRKSRC}/../COPYING
+
+.include "${.CURDIR}/../gettext/Makefile.common"
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --disable-csharp --disable-java --with-included-gettext \
+ ac_cv_lib_rt_sched_yield=no
+INSTALL_TARGET= install-strip
+USES= charsetfix iconv libtool tar:xz
+USE_LDCONFIG= yes
+WRKSRC_SUBDIR= gettext-runtime
+
+INFO= autosprintf
+
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == DragonFly || (${OPSYS} == FreeBSD && ${OSVERSION} < 900506)
+CONFIGURE_ARGS+=--disable-threads
+.endif
+
+post-patch:
+# Do not install csharp and java documentation.
+ @${REINPLACE_CMD} -E '/^SUBDIRS =/s/(intl-csharp|intl-java)//g' \
+ ${WRKSRC}/Makefile.in
+# Do not install html copies of manpages.
+ @${REINPLACE_CMD} \
+ -e '/^all-local:/s/html-local//' \
+ -e '/^install-data-local:/s/install-html//' \
+ -e '/^installdirs-local:/s/installdirs-html//' \
+ ${WRKSRC}/libasprintf/Makefile.in ${WRKSRC}/man/Makefile.in
+
+post-install:
+ ${LN} -s libintl.so.8 ${STAGEDIR}${PREFIX}/lib/libintl.so.9
+
+regression-test: build
+ @(cd ${WRKSRC} && ${MAKE_CMD} check)
+
+.include <bsd.port.mk>
diff --git a/devel/gettext-runtime/files/patch-configure b/devel/gettext-runtime/files/patch-configure
new file mode 100644
index 000000000000..d7c3b9c960e1
--- /dev/null
+++ b/devel/gettext-runtime/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig 2014-07-14 07:30:12 UTC
++++ configure
+@@ -16277,7 +16277,7 @@
+ # thread: pthread_create from libc will fail, whereas
+ # pthread_create will actually create a thread.
+ case "$host_os" in
+- solaris* | hpux*)
++ solaris* | hpux* | freebsd*)
+
+ $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
+
diff --git a/devel/gettext-runtime/files/patch-intl-threadlib.c b/devel/gettext-runtime/files/patch-intl-threadlib.c
new file mode 100644
index 000000000000..8de65d9244f0
--- /dev/null
+++ b/devel/gettext-runtime/files/patch-intl-threadlib.c
@@ -0,0 +1,39 @@
+--- intl/threadlib.c.orig 2013-03-07 08:44:37 UTC
++++ intl/threadlib.c
+@@ -29,11 +29,10 @@
+
+ # if PTHREAD_IN_USE_DETECTION_HARD
+
+-/* The function to be executed by a dummy thread. */
+-static void *
+-dummy_thread_func (void *arg)
++static pthread_once_t dummy_once_control = PTHREAD_ONCE_INIT;
++static void
++dummy_once_func (void)
+ {
+- return arg;
+ }
+
+ int
+@@ -44,19 +43,10 @@ glthread_in_use (void)
+
+ if (!tested)
+ {
+- pthread_t thread;
+-
+- if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0)
+- /* Thread creation failed. */
++ if (pthread_once (&dummy_once_control, dummy_once_func) != 0)
+ result = 0;
+ else
+- {
+- /* Thread creation works. */
+- void *retval;
+- if (pthread_join (thread, &retval) != 0)
+- abort ();
+- result = 1;
+- }
++ result = 1;
+ tested = 1;
+ }
+ return result;
diff --git a/devel/gettext-runtime/pkg-descr b/devel/gettext-runtime/pkg-descr
new file mode 100644
index 000000000000..ac084016ae59
--- /dev/null
+++ b/devel/gettext-runtime/pkg-descr
@@ -0,0 +1,6 @@
+GNU gettext is a framework of libraries and tools for internationalisation
+and localisation of software.
+
+This package contains the runtime libraries and programs.
+
+WWW: http://www.gnu.org/software/gettext/
diff --git a/devel/gettext-runtime/pkg-plist b/devel/gettext-runtime/pkg-plist
new file mode 100644
index 000000000000..6cb2b44697f5
--- /dev/null
+++ b/devel/gettext-runtime/pkg-plist
@@ -0,0 +1,69 @@
+bin/envsubst
+bin/gettext
+bin/gettext.sh
+bin/ngettext
+include/autosprintf.h
+include/libintl.h
+lib/libasprintf.a
+lib/libasprintf.so
+lib/libasprintf.so.0
+lib/libasprintf.so.0.0.0
+lib/libintl.a
+lib/libintl.so
+lib/libintl.so.8
+lib/libintl.so.8.1.2
+lib/libintl.so.9
+man/man1/envsubst.1.gz
+man/man1/gettext.1.gz
+man/man1/ngettext.1.gz
+man/man3/bind_textdomain_codeset.3.gz
+man/man3/bindtextdomain.3.gz
+man/man3/dcgettext.3.gz
+man/man3/dcngettext.3.gz
+man/man3/dgettext.3.gz
+man/man3/dngettext.3.gz
+man/man3/gettext.3.gz
+man/man3/ngettext.3.gz
+man/man3/textdomain.3.gz
+%%DATADIR%%/ABOUT-NLS
+share/locale/be/LC_MESSAGES/gettext-runtime.mo
+share/locale/bg/LC_MESSAGES/gettext-runtime.mo
+share/locale/ca/LC_MESSAGES/gettext-runtime.mo
+share/locale/cs/LC_MESSAGES/gettext-runtime.mo
+share/locale/da/LC_MESSAGES/gettext-runtime.mo
+share/locale/de/LC_MESSAGES/gettext-runtime.mo
+share/locale/el/LC_MESSAGES/gettext-runtime.mo
+share/locale/en@boldquot/LC_MESSAGES/gettext-runtime.mo
+share/locale/en@quot/LC_MESSAGES/gettext-runtime.mo
+share/locale/eo/LC_MESSAGES/gettext-runtime.mo
+share/locale/es/LC_MESSAGES/gettext-runtime.mo
+share/locale/et/LC_MESSAGES/gettext-runtime.mo
+share/locale/fi/LC_MESSAGES/gettext-runtime.mo
+share/locale/fr/LC_MESSAGES/gettext-runtime.mo
+share/locale/ga/LC_MESSAGES/gettext-runtime.mo
+share/locale/gl/LC_MESSAGES/gettext-runtime.mo
+share/locale/hr/LC_MESSAGES/gettext-runtime.mo
+share/locale/hu/LC_MESSAGES/gettext-runtime.mo
+share/locale/id/LC_MESSAGES/gettext-runtime.mo
+share/locale/it/LC_MESSAGES/gettext-runtime.mo
+share/locale/ja/LC_MESSAGES/gettext-runtime.mo
+share/locale/ko/LC_MESSAGES/gettext-runtime.mo
+share/locale/locale.alias
+share/locale/nb/LC_MESSAGES/gettext-runtime.mo
+share/locale/nl/LC_MESSAGES/gettext-runtime.mo
+share/locale/nn/LC_MESSAGES/gettext-runtime.mo
+share/locale/pl/LC_MESSAGES/gettext-runtime.mo
+share/locale/pt/LC_MESSAGES/gettext-runtime.mo
+share/locale/pt_BR/LC_MESSAGES/gettext-runtime.mo
+share/locale/ro/LC_MESSAGES/gettext-runtime.mo
+share/locale/ru/LC_MESSAGES/gettext-runtime.mo
+share/locale/sk/LC_MESSAGES/gettext-runtime.mo
+share/locale/sl/LC_MESSAGES/gettext-runtime.mo
+share/locale/sr/LC_MESSAGES/gettext-runtime.mo
+share/locale/sv/LC_MESSAGES/gettext-runtime.mo
+share/locale/tr/LC_MESSAGES/gettext-runtime.mo
+share/locale/uk/LC_MESSAGES/gettext-runtime.mo
+share/locale/vi/LC_MESSAGES/gettext-runtime.mo
+share/locale/zh_CN/LC_MESSAGES/gettext-runtime.mo
+share/locale/zh_HK/LC_MESSAGES/gettext-runtime.mo
+share/locale/zh_TW/LC_MESSAGES/gettext-runtime.mo