- use -pthread instead of -lpthread

- fix WANTLIB a bit

"should be ok" ckuethe@ (MAINTAINER), "looks ok to me" ajacoutot@
This commit is contained in:
jasper 2009-02-17 07:45:11 +00:00
parent 7618a1ead8
commit 7ef8649822
2 changed files with 38 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.26 2009/02/10 23:23:27 ckuethe Exp $
# $OpenBSD: Makefile,v 1.27 2009/02/17 07:45:11 jasper Exp $
COMMENT-main= service daemon that monitors one or more GPSes
COMMENT-motif= motif-based test apps using gpsd
@ -7,10 +7,10 @@ COMMENT-python= python bindings for gpsd
VERSION= 2.38
DISTNAME= gpsd-${VERSION}
PKGNAME-main= gpsd-${VERSION}
PKGNAME-motif= gpsd-motif-${VERSION}
PKGNAME-main= gpsd-${VERSION}p0
PKGNAME-motif= gpsd-motif-${VERSION}p0
PKGNAME-php= gpsd-php-${VERSION}
PKGNAME-python= gpsd-python-${VERSION}
PKGNAME-python= gpsd-python-${VERSION}p0
SHARED_LIBS= gps 18.0
CATEGORIES= misc geo
@ -45,7 +45,7 @@ BUILD_DEPENDS= ::textproc/libxslt \
CONFIGURE_ARGS+= --without-x
.else
MULTI_PACKAGES+= -motif
WANTLIB-motif= ICE Xaw Xau Xdmcp Xext Xft Xmu Xp Xrender X11 SM Xt \
WANTLIB-motif= ICE Xaw8 Xau Xdmcp Xext Xft Xmu Xp Xpm Xrender X11 SM Xt \
c m pthread expat fontconfig freetype iconv z
LIB_DEPENDS-motif= Xm::x11/openmotif gps::misc/gpsd
USE_X11= Yes
@ -59,7 +59,7 @@ CONFIGURE_ARGS+= --disable-python
MULTI_PACKAGES+= -python
MODULES= lang/python
LIB_DEPENDS-python= gps::misc/gpsd
WANTLIB-python= c m pthread
WANTLIB-python=
RUN_DEPENDS-main=
RUN_DEPENDS-motif=
CONFIGURE_ENV+= PYTHON="${MODPY_BIN}"

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-configure,v 1.1 2009/02/17 07:45:11 jasper Exp $
Prevent linking with -lpthread, and use -pthread instead.
--- configure.orig Mon Feb 16 11:19:56 2009
+++ configure Mon Feb 16 11:20:23 2009
@@ -20913,13 +20913,13 @@ if test $ac_cv_lib_c_open = yes; then
fi
-{ echo "$as_me:$LINENO: checking for pthread_setcancelstate in -lpthread" >&5
-echo $ECHO_N "checking for pthread_setcancelstate in -lpthread... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for pthread_setcancelstate in -pthread" >&5
+echo $ECHO_N "checking for pthread_setcancelstate in -pthread... $ECHO_C" >&6; }
if test "${ac_cv_lib_pthread_pthread_setcancelstate+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+LIBS="-pthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -20975,7 +20975,7 @@ fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_setcancelstate" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_pthread_setcancelstate" >&6; }
if test $ac_cv_lib_pthread_pthread_setcancelstate = yes; then
- LIBPTHREAD="-lpthread"
+ LIBPTHREAD="-pthread"
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBPTHREAD