pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Under OpenBSD there is no libpthread.so, just libpt...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/068b4e5b07e0
branches:  trunk
changeset: 476817:068b4e5b07e0
user:      xtraeme <xtraeme%pkgsrc.org@localhost>
date:      Mon Jun 21 00:06:37 2004 +0000

description:
Under OpenBSD there is no libpthread.so, just libpthread.so.X.X, and
BUILDLINK_LDADD.pthread was empty, so add a check to find the libraries
and if they are found, add -lpthread to BUILDLINK_LDADD.pthread, thanks
to grant beattie for the suggestion.

Reported and tested by Sergio Jimenez <tripledes at eslack dot org>.

diffstat:

 mk/pthread.buildlink3.mk |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r 535de13d3789 -r 068b4e5b07e0 mk/pthread.buildlink3.mk
--- a/mk/pthread.buildlink3.mk  Sun Jun 20 22:31:51 2004 +0000
+++ b/mk/pthread.buildlink3.mk  Mon Jun 21 00:06:37 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pthread.buildlink3.mk,v 1.6 2004/06/12 03:19:52 grant Exp $
+# $NetBSD: pthread.buildlink3.mk,v 1.7 2004/06/21 00:06:37 xtraeme Exp $
 #
 # The pthreads strategy for pkgsrc is to "bless" a particular pthread
 # package as the Official Pthread Replacement (OPR).  A package that uses
@@ -163,6 +163,17 @@
 BUILDLINK_LDADD.pthread=       -lpthread
 .  elif exists(/usr/lib/libc_r.so)
 BUILDLINK_LDADD.pthread=       -lc_r
+# In OpenBSD there is no libpthread.so, just libpthread.so.X.X.
+.  elif ${OPSYS} == "OpenBSD"
+_CHECK_LIBPTH!=        \
+       if [ "`echo /usr/lib/libpthread.so.*`" = "/usr/lib/libpthread.so.*" ]; then \
+               echo "yes";     \
+       else                    \
+               echo "no";      \
+       fi
+.    if ${_CHECK_LIBPTH} == "yes"
+BUILDLINK_LDADD.pthread=       -lpthread
+.    endif
 .  else
 BUILDLINK_LDADD.pthread=       # empty
 .  endif



Home | Main Index | Thread Index | Old Index