ports/132381: [patch] databases/sqlite2: Change hard coded TCL dependancy to USE_TCL
Scot W. Hetzel
swhetzel at gmail.com
Sat Mar 7 07:40:05 UTC 2009
>Number: 132381
>Category: ports
>Synopsis: [patch] databases/sqlite2: Change hard coded TCL dependancy to USE_TCL
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Mar 07 07:40:04 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Scot W. Hetzel
>Release: 8.0-CURRENT
>Organization:
>Environment:
FreeBSD hp010 8.0-CURRENT FreeBSD 8.0-CURRENT #1: Fri Mar 6 02:22:28 CST 2009 root at hp010:/usr/obj/usr/src/8x-zfs/sys/DV8135NR amd64
>Description:
Currently, databases/sqlite2 has a hard coded dependency on either TCL 8.3 or TCL 8.4. The port doesn't allow the selection of a newer version of TCL. This also causes other ports that depend on sqlite2 to have an indirect dependency on these versions of TCL 8.3 or TCL 8.4.
This prevents the installation of only one TCL port.
>How-To-Repeat:
Install TCL > 8.4 and set WITH_TCL_VER to that value
Then install databases/sqlite2
sqlite2 will then install TCL 8.3 or 8.4.
>Fix:
The attached patch allows sqlite2 to be built with any supported version of TCL.
Patch attached with submission follows:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/databases/sqlite2/Makefile,v
retrieving revision 1.42
diff -u -r1.42 Makefile
--- Makefile 21 Aug 2008 06:16:31 -0000 1.42
+++ Makefile 7 Mar 2009 04:52:50 -0000
@@ -29,44 +29,25 @@
EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude CVS
-OPTIONS= TCL84 "Enable TCL wrapper (tcl 8.4)" off \
- TCL83 "Enable TCL wrapper (tcl 8.3)" off \
+OPTIONS= TCL "Enable TCL wrapper" off \
THREADS "Compile with threads support" off \
DOCS "Building docs (depends on TCL)" on
-# Defaults, for building the docs:
-TCL_VERSION= 8.4
-
.include <bsd.port.pre.mk>
# Deprecated options
-.if defined(SQLITE_WITH_TCL83)
-WITH_TCL83= yes
-.endif
-.if defined(SQLITE_WITH_TCL84)
-WITH_TCL84= yes
-.endif
-
-.if defined(WITH_TCL83)
-.if defined(WITH_TCL84)
-BROKEN= please, select only one TCL wrapper
-.endif
-CATEGORIES+= tcl
-TCL_VERSION= 8.3
-WITH_TCL= YES
-.endif
-
-.if defined(WITH_TCL84)
-.if defined(WITH_TCL83)
-BROKEN= please, select only one TCL wrapper
-.endif
-CATEGORIES+= tcl
-TCL_VERSION= 8.4
-WITH_TCL= YES
+.if defined(SQLITE_WITH_TCL83) || defined(WITH_TCL83)
+WITH_TCL_VER= 83
+WITH_TCL= yes
+.endif
+.if defined(SQLITE_WITH_TCL84) || defined(WITH_TCL84)
+WITH_TCL_VER= 84
+WITH_TCL= yes
.endif
.if defined(WITH_TCL)
-LIB_DEPENDS+= tcl${TCL_VERSION:S/.//}:${PORTSDIR}/lang/tcl${TCL_VERSION:S/.//}
+CATEGORIES+= tcl
+USE_TCL= 83+
PLIST_SUB+= WITH_TCL=""
.else
PLIST_SUB+= WITH_TCL="@comment "
@@ -74,17 +55,21 @@
.if !defined(NOPORTDOCS) && !defined(WITHOUT_DOCS)
PORTDOCS= *
-BUILD_DEPENDS+= tclsh${TCL_VERSION}:${PORTSDIR}/lang/tcl${TCL_VERSION:S/.//}
-MAKE_ARGS+= TCLSH=tclsh${TCL_VERSION}
-MAKE_ENV+= TCL_VER=${TCL_VERSION}
+USE_TCL_BUILD= 83+
+MAKE_ARGS+= TCLSH=${TCLSH}
+MAKE_ENV+= TCL_VER=${TCL_VER}
+.endif
+
+.if defined(WITH_TCL) || defined(WITH_DOCS)
+.include "${PORTSDIR}/Mk/bsd.tcl.mk"
.endif
post-patch:
@${REINPLACE_CMD} -e "s/tclsh \$$(TOP)/\$$(TCLSH) \$$(TOP)/g" \
-e "s|\./libtool|${LIBTOOL}|g" ${WRKSRC}/Makefile.in
- @${ECHO} "config_TARGET_TCL_INC=\"-I${PREFIX}/include/tcl${TCL_VERSION}\"" \
+ @${ECHO} "config_TARGET_TCL_INC=\"-I${TCL_INCLUDEDIR}\"" \
> ${WRKSRC}/freebsd.hints
- @${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_VERSION:S/.//}\"" \
+ @${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_VER:S/.//}\"" \
>> ${WRKSRC}/freebsd.hints
.if defined(WITH_THREADS)
@${ECHO} "config_TARGET_CFLAGS=\"-DTHREADSAFE=1 ${PTHREAD_LIBS}\"" \
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list