ports/64324: x11-toolkits/tk84's Makefile lacks of appropriate tunables
Seva Gluschenko
gvs at rinet.ru
Tue Mar 16 10:20:18 UTC 2004
>Number: 64324
>Category: ports
>Synopsis: x11-toolkits/tk84's Makefile lacks of appropriate tunables
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Mar 16 02:20:17 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Seva Gluschenko
>Release: FreeBSD 5.2-CURRENT i386
>Organization:
Yandex LLC
>Environment:
System: FreeBSD road.yandex.ru 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Wed Jan 14 18:05:16 MSK 2004 gvs at road.yandex.ru:/local/obj/local/usr/src/sys/ROAD i386
>Description:
The x11-toolkits/tk84 port has the Makefile which looks a bit outdated and needs
to be tuned appropriately. The following changes were adopted:
1. Changed "build" to "extract" in forced dependency on tcl84 because only extracted
source is really needed if tcl84 is installed already.
2. Added --with-x configure argument turned on by default. It may be turned off specifying
WITHOUT_X11=yes.
3. Added --enable-threads configure arg turned off by default. It can be turned on specifying
WITH_THREADS=yes.
>How-To-Repeat:
Try to build an up-to-date tk84 port. You'll be forced to build tcl84 first. You won't be able
to turn on threads or X support.
>Fix:
Apply patch below in /usr/ports/x11-toolkits/tk84, rebuild and reinstall tk84 if needed.
--- Makefile.orig Tue Mar 16 13:19:12 2004
+++ Makefile Tue Mar 16 13:24:34 2004
@@ -16,7 +16,7 @@
MAINTAINER= ports at FreeBSD.org
COMMENT= Graphical toolkit for TCL
-BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/${TCL84_PORT}:build
+BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/${TCL84_PORT}:extract
LIB_DEPENDS= tcl84.1:${PORTSDIR}/${TCL84_PORT}
LATEST_LINK= tk84
@@ -28,6 +28,7 @@
SHORT_TK_VER= 84
CONFIGURE_ARGS= --enable-shared --with-tcl=${PREFIX}/lib/tcl${TK_VER} \
--includedir=${LOCALBASE}/include/tk${TK_VER}
+
CONFIGURE_ENV= PORTSDIR=${PORTSDIR} TK_LIB_FILE=libtk${SHORT_TK_VER}.so.1
MAKE_ENV= SHORT_TK_VER=${SHORT_TK_VER}
PLIST_SUB= TK_VER=${TK_VER} SHORT_TK_VER=${SHORT_TK_VER}
@@ -38,6 +39,15 @@
USE_REINPLACE= YES
MANCOMPRESSED= no
+.ifndef (WITHOUT_X11)
+CONFIGURE_ARGS+= --with-x
+.endif
+
+.ifdef (WITH_THREADS)
+CONFIGURE_ARGS+= --enable-threads
+PKGNAMESUFFIX?= -threads
+.endif
+
MAN1= wish.1
MAN3= 3DBorder.3 AddOption.3 BindTable.3 CanvPsY.3 CanvTkwin.3 \
CanvTxtInfo.3 Clipboard.3 ClrSelect.3 ConfigWidg.3 ConfigWind.3 \
@@ -340,6 +350,13 @@
text.n tk_textPaste.n
.include <bsd.port.pre.mk>
+
+.if defined(WITH_THREADS)
+post-patch:
+ @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \
+ ${WRKSRC}/configure
+
+.endif
post-configure:
${REINPLACE_CMD} -e 's=${WRKDIRPREFIX}${PORTSDIR}=$${WRKDIRPREFIX}${PORTSDIR}=' \
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list