freebsd-ports/devel/gettext-runtime/Makefile
Tijl Coosemans fb889ca829 devel/gettext-runtime: Fix crash triggered by libgpg-error
Libgpg-error has an initialisation function with
__attribute__((constructor)) that calls a libintl function that
calls pthread_rwlock_wrlock that segfaults if libpthread wasn't
initialised yet.  This can happen because libintl doesn't link to
libpthread to avoid the overhead for non-threaded programs.  To
fix this, add an initialisation function to libintl that triggers
initialisation of libpthread.

RTLD_NOLOAD suggested by kib.

dlopen was fixed to work during initialisation in
https://cgit.FreeBSD.org/src/commit/?id=1005d3d05362

PR:		272472, 272517
2023-07-17 20:53:17 +02:00

43 lines
1 KiB
Makefile

# 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= 1
COMMENT= GNU gettext runtime libraries and programs
WWW= https://www.gnu.org/software/gettext/
LICENSE= LGPL21+ GPLv3+
LICENSE_COMB= multi
LICENSE_FILE_LGPL21+ = ${WRKSRC}/intl/COPYING.LIB
LICENSE_FILE_GPLv3+ = ${WRKSRC}/../COPYING
.include "${.CURDIR}/../gettext/Makefile.common"
USES= charsetfix cpe iconv libtool tar:xz
USE_LDCONFIG= yes
CPE_PRODUCT= gettext
CPE_VENDOR= gnu
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-csharp --disable-java --with-included-gettext \
ac_cv_lib_rt_sched_yield=no
INSTALL_TARGET= install-strip
TEST_TARGET= check
WRKSRC_SUBDIR= gettext-runtime
DATADIR= ${PREFIX}/share/gettext
DOCSDIR= ${PREFIX}/share/doc/gettext
INFO= autosprintf
OPTIONS_DEFINE= DOCS
.include <bsd.port.options.mk>
.if ${OPSYS} == DragonFly
CONFIGURE_ARGS+=--disable-threads
.endif
.include <bsd.port.mk>