From 28b502ee246dd191910a0646fd457df4ffddc666 Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Sat, 7 Oct 2006 12:51:39 +0000 Subject: - Record -pthread requirement in pkg-config file, if threads are turned on - USB always needs threads turned on PR: ports/104064 --- palm/pilot-link/Makefile | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'palm/pilot-link') diff --git a/palm/pilot-link/Makefile b/palm/pilot-link/Makefile index 15e84e6212a0..907ceb740d66 100644 --- a/palm/pilot-link/Makefile +++ b/palm/pilot-link/Makefile @@ -6,7 +6,8 @@ # PORTNAME= pilot-link -DISTVERSION= 0.12.1 +PORTVERSION= 0.12.1 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= palm comms MASTER_SITES= http://www.mirrorservice.org/sites/master.us.finkmirrors.net/distfiles/ \ @@ -18,7 +19,7 @@ COMMENT= Suite of tools used to connect and sync your Palm handled USE_BZIP2= yes USE_ICONV= yes USE_GETOPT_LONG=yes -USE_GNOME= gnometarget gnomehack +USE_GNOME= gnometarget gnomehack pkgconfig GNU_CONFIGURE= yes CFLAGS+= -I${WRKSRC}/popt -I${LOCALBASE}/include CONFIGURE_ARGS+=--with-libiconv=${LOCALBASE} --with-included-popt --enable-conduits \ @@ -34,13 +35,18 @@ OPTIONS= PNG "build with png support" off \ .if !defined(WITHOUT_THREADS) CONFIGURE_ARGS+= --enable-threads -LDFLAGS+= ${PTHREAD_LIBS} .endif .if defined(WITH_USB) LIB_DEPENDS+= usb-0.1.8:${PORTSDIR}/devel/libusb CONFIGURE_ARGS+=--enable-libusb -CONFIGURE_ENV+="LDFLAGS=${LDFLAGS} -L${PREFIX}/lib -lusb" +CONFIGURE_ENV+=LDFLAGS="${LDFLAGS} -L${PREFIX}/lib -lusb" + +.if defined(WITHOUT_THREADS) +IGNORE= cannot be built: USB support requires THREADS turned on. Please reconfigure using 'make config' +.else +LDFLAGS+= ${PTHREAD_LIBS} +.endif .endif .if defined(WITH_PNG) @@ -52,4 +58,9 @@ CONFIGURE_ARGS+= --disable-png .include "${.CURDIR}/manpages.mk" +post-patch: +.if !defined(WITHOUT_THREADS) + @${REINPLACE_CMD} -e 's|Libs: |Libs: ${PTHREAD_LIBS} |' ${WRKSRC}/pilot-link.pc.in ${WRKSRC}/pilot-link-pp.pc.in +.endif + .include -- cgit v1.2.3