Date: Sat, 20 Jan 2007 11:35:23 -0500 (EST) From: Craig Rodrigues <rodrigc@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/108154: sysutils/hourglass: respect PTHREAD_LIBS, add WITH_LINUXTHREADS Message-ID: <200701201635.l0KGZNg8071714@c-66-31-35-94.hsd1.ma.comcast.net> Resent-Message-ID: <200701201650.l0KGoIPX098999@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 108154 >Category: ports >Synopsis: sysutils/hourglass: respect PTHREAD_LIBS, add WITH_LINUXTHREADS >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jan 20 16:50:18 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Craig Rodrigues >Release: FreeBSD 7.0-CURRENT i386 >Organization: >Environment: System: FreeBSD dibbler.crodrigues.org 7.0-CURRENT FreeBSD 7.0-CURRENT #9: Tue Jan 16 22:46:34 EST 2007 root@dibbler.crodrigues.org:/usr/obj/usr/src/sys/MYKERNEL1 i386 >Description: sysutils/hourglass has a hard dependency on linuxthreads. This dependency is unnecessary. Change this port to respect PTHREAD_LIBS and PTHREAD_CFLAGS. Add a tunable WITH_LINUXTHREADS if user wishes to use linuxthreads instead of default pthread library. >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/pcvs/ports/sysutils/hourglass/Makefile,v retrieving revision 1.5 diff -u -u -r1.5 Makefile --- Makefile 4 Sep 2006 08:35:44 -0000 1.5 +++ Makefile 20 Jan 2007 16:23:33 -0000 @@ -23,15 +23,25 @@ .include <bsd.port.pre.mk> +.if defined(WITH_LINUXTHREADS) + .if ${OSVERSION} >= 500035 +PTHREAD_LIBS= -L${LOCALBASE}/lib -llthread -llgcc_r +PTHREAD_CFLAGS= -D_THREAD_SAFE -I${LOCALBASE}/include/pthread/linuxthreads LIB_DEPENDS+= lthread.3:${PORTSDIR}/devel/linuxthreads .else LIB_DEPENDS+= lthread.2:${PORTSDIR}/devel/linuxthreads .endif +.endif + post-patch: @${REINPLACE_CMD} -e 's,%LOCALBASE%,${LOCALBASE},g' \ ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's,%PTHREAD_LIBS%,${PTHREAD_LIBS},g' \ + ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's,%PTHREAD_CFLAGS%,${PTHREAD_CFLAGS},g' \ + ${WRKSRC}/configure post-install: .if !defined(NOPORTDOCS) Index: files/patch-configure =================================================================== RCS file: /home/pcvs/ports/sysutils/hourglass/files/patch-configure,v retrieving revision 1.1 diff -u -u -r1.1 patch-configure --- files/patch-configure 12 Apr 2004 15:54:55 -0000 1.1 +++ files/patch-configure 20 Jan 2007 16:23:33 -0000 @@ -24,8 +24,8 @@ - CFLAGS='-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads' ; + CFLAGS_sav=$CFLAGS ; + LDFLAGS_sav=$LDFLAGS ; -+ LDFLAGS="$LDFLAGS_sav -llthread -llgcc_r -L%LOCALBASE%/lib" ; -+ CFLAGS="$CFLAGS_sav -D_THREAD_SAFE -I%LOCALBASE%/include/pthread/linuxthreads" ; ++ LDFLAGS="$LDFLAGS_sav %PTHREAD_LIBS%" ; ++ CFLAGS="$CFLAGS_sav %PTHREAD_CFLAGS%" ; on_unix='yes' ; on_windows='no' ;; *cygwin*) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701201635.l0KGZNg8071714>