1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

textproc/link-grammar: Link with -lstdthreads

The library uses call_once and other C11 Threads functions that are
implemented by libstdthreads on FreeBSD.

Use new upstream.

PR:		267758
This commit is contained in:
Tijl Coosemans 2022-11-30 16:29:41 +01:00
parent cab9a6db6e
commit 7b3995c7b7
2 changed files with 34 additions and 4 deletions

View File

@ -1,12 +1,12 @@
PORTNAME= link-grammar
DISTVERSION= 5.10.5
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= textproc
MASTER_SITES= http://www.abisource.com/downloads/${PORTNAME}/${PORTVERSION}/
MASTER_SITES= https://www.gnucash.org/${PORTNAME}/downloads/${PORTVERSION}/
MAINTAINER= gnome@FreeBSD.org
COMMENT= Grammar checking library
WWW= https://www.abisource.com/projects/link-grammar/
WWW= https://opencog.github.io/link-grammar-website/
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
@ -15,7 +15,6 @@ USES= compiler:c++11-lib dos2unix gmake libtool localbase ncurses \
pathfix pkgconfig sqlite
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
CONFIGURE_ARGS= --disable-maintainer-mode \
--with-regexlib=pcre2 \
--disable-python-bindings

View File

@ -0,0 +1,31 @@
Derived from https://github.com/opencog/link-grammar/commit/8d864c6a7b91
--- configure.orig 2022-06-17 16:29:31 UTC
+++ configure
@@ -18540,8 +18540,26 @@ fi
OS_NETBSD_FALSE=
fi
+case "$host_os" in
+ *freebsd*)
+ freebsd=yes
+ ;;
+ *)
+ freebsd=no
+ ;;
+esac
HOST_OS="$host_os"
+
+# ====================================================================
+# FreeBSD work-around. Apparently, the AX_PTHREAD autoconf macro
+# fails to include -lstdthreads in it's results. See bug report
+# https://github.com/opencog/link-grammar/issues/1355
+# So we hack, and explicitly set it here.
+
+if test -n "$ax_pthread_ok" -a "x$freebsd" = "xyes"; then
+ PTHREAD_LIBS="${PTHREAD_LIBS} -lstdthreads"
+fi
# ====================================================================