summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2019-03-27 07:50:51 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2019-03-27 07:50:51 +0000
commiteecef4f6f082abe0614a5e4f4be41eb808bfd0ad (patch)
tree1848598985545d88a728dfc8d8d3d7a02548630f
parente03cfd1ee4087046615719d571add8ea571e2a1c (diff)
downloadfreebsd-ports-eecef4f6f082abe0614a5e4f4be41eb808bfd0ad.zip
Make sure the port links against libthr.so
This fixes the build in HEAD after lld received support for --no-allow-shlib-undefined in base r345349. Upstream looks for libpthread in sem_init(3), which is part of libc on FreeBSD. Look for a symbol that's in libpthread to make sure we link against it. See also: https://github.com/tesseract-ocr/tesseract/issues/2344 PR: 236812 Approved by: Piotr Kubaj <pkubaj@anongoth.pl> (maintainer)
-rw-r--r--graphics/tesseract/Makefile2
-rw-r--r--graphics/tesseract/files/patch-configure.ac12
2 files changed, 13 insertions, 1 deletions
diff --git a/graphics/tesseract/Makefile b/graphics/tesseract/Makefile
index 17b3eb5a6bb0..e52e2e1bb815 100644
--- a/graphics/tesseract/Makefile
+++ b/graphics/tesseract/Makefile
@@ -3,7 +3,7 @@
PORTNAME= tesseract
PORTVERSION= 3.05.02
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= graphics
MAINTAINER= pkubaj@anongoth.pl
diff --git a/graphics/tesseract/files/patch-configure.ac b/graphics/tesseract/files/patch-configure.ac
new file mode 100644
index 000000000000..668d838431c0
--- /dev/null
+++ b/graphics/tesseract/files/patch-configure.ac
@@ -0,0 +1,12 @@
+sem_init(3) is part of libc on FreeBSD, so we ended up not linking against
+libpthread. Look for a symbol that causes us to load it.
+--- configure.ac.orig 2019-03-26 21:58:42 UTC
++++ configure.ac
+@@ -375,6 +375,7 @@ CXXFLAGS="$OLD_CXXFLAGS"
+ # ----------------------------------------
+
+ AC_SEARCH_LIBS([sem_init], [pthread rt])
++AC_SEARCH_LIBS([pthread_create], [pthread])
+
+
+ # ----------------------------------------