aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authormnag <mnag@FreeBSD.org>2009-03-23 13:31:39 +0800
committermnag <mnag@FreeBSD.org>2009-03-23 13:31:39 +0800
commit4c33aba304554cdd9b73770d4eee7e666d1ba753 (patch)
treedd45cc4852823c2ecf5b89f25425d0e33ea9ba96 /databases
parent28f92e96ed27edd8f752667fc2ef89fc35df051b (diff)
downloadfreebsd-ports-gnome-4c33aba304554cdd9b73770d4eee7e666d1ba753.tar.gz
freebsd-ports-gnome-4c33aba304554cdd9b73770d4eee7e666d1ba753.tar.zst
freebsd-ports-gnome-4c33aba304554cdd9b73770d4eee7e666d1ba753.zip
- Change hard coded TCL dependancy to USE_TCL
PR: 132381 Submitted by: Scot W. Hetzel <swhetzel___gmail.com>
Diffstat (limited to 'databases')
-rw-r--r--databases/sqlite2/Makefile70
-rw-r--r--databases/sqlite2/pkg-plist6
-rw-r--r--databases/sqlite34/Makefile42
3 files changed, 65 insertions, 53 deletions
diff --git a/databases/sqlite2/Makefile b/databases/sqlite2/Makefile
index d3e6bb436839..c8741686404d 100644
--- a/databases/sqlite2/Makefile
+++ b/databases/sqlite2/Makefile
@@ -13,7 +13,7 @@ CATEGORIES= databases
MASTER_SITES= http://www.sqlite.org/
MAINTAINER= mnag@FreeBSD.org
-COMMENT= An SQL database engine in a C library w/ Tcl wrapper
+COMMENT= An SQL database engine in a C library
USE_GMAKE= YES
USE_GNOME= pkgconfig
@@ -29,62 +29,60 @@ LATEST_LINK= ${PKGNAMEPREFIX}${PORTNAME}2
EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude CVS
-OPTIONS= TCL84 "Enable TCL wrapper (tcl 8.4)" off \
- TCL83 "Enable TCL wrapper (tcl 8.3)" off \
- THREADS "Compile with threads support" off \
- DOCS "Building docs (depends on TCL)" on
-
-# Defaults, for building the docs:
-TCL_VERSION= 8.4
+OPTIONS= TCLWRAPPER "Enable TCL wrapper" off \
+ THREADS "Compile with threads support" off \
+ DOCS "Building docs (depends on TCL)" on
.include <bsd.port.pre.mk>
# Deprecated options
-.if defined(SQLITE_WITH_TCL83)
-WITH_TCL83= yes
+.if defined(SQLITE_WITH_TCL83) || defined(WITH_TCL83)
+WITH_TCL_VER= 83
+WITH_TCLWRAPPER= yes
.endif
-.if defined(SQLITE_WITH_TCL84)
-WITH_TCL84= yes
+.if defined(SQLITE_WITH_TCL84) || defined(WITH_TCL84)
+WITH_TCL_VER= 84
+WITH_TCLWRAPPER= 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
+.if defined(WITHOUT_DOCS)
+NOPORTDOCS= yes
+.elif defined(NOPORTDOCS)
+WITHOUT_DOCS= 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(WITH_TCLWRAPPER)
+USE_TCL= 83+
+.include "${PORTSDIR}/Mk/bsd.tcl.mk"
+.else
+. if !defined(WITHOUT_DOCS)
+USE_TCL_BUILD= 83+
+. include "${PORTSDIR}/Mk/bsd.tcl.mk"
+. endif
.endif
-.if defined(WITH_TCL)
-LIB_DEPENDS+= tcl${TCL_VERSION:S/.//}:${PORTSDIR}/lang/tcl${TCL_VERSION:S/.//}
-PLIST_SUB+= WITH_TCL=""
+.if defined(WITH_TCLWRAPPER)
+CATEGORIES+= lang tcl
+COMMENT+= with TCL wrapper
+MAKE_ARGS+= TCLSH=${TCLSH}
+MAKE_ENV+= TCL_VER=${TCL_VER}
+PLIST_SUB+= WITH_TCLWRAPPER=""
.else
-PLIST_SUB+= WITH_TCL="@comment "
+PLIST_SUB+= WITH_TCLWRAPPER="@comment "
.endif
.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}
+MAKE_ARGS+= TCLSH=${TCLSH}
+MAKE_ENV+= TCL_VER=${TCL_VER}
.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}\"" \
@@ -98,7 +96,7 @@ post-build:
.endif
post-install:
-.if defined(WITH_TCL)
+.if defined(WITH_TCLWRAPPER)
@(cd ${WRKSRC} && ${GMAKE} install-tcl)
${INSTALL_DATA} ${FILESDIR}/pkgIndex.tcl ${PREFIX}/lib/sqlite/
.endif
diff --git a/databases/sqlite2/pkg-plist b/databases/sqlite2/pkg-plist
index 24ee78b8c98d..bc9b25f7264f 100644
--- a/databases/sqlite2/pkg-plist
+++ b/databases/sqlite2/pkg-plist
@@ -4,8 +4,8 @@ lib/libsqlite.a
lib/libsqlite.so
lib/libsqlite.so.2
libdata/pkgconfig/sqlite.pc
-%%WITH_TCL%%lib/sqlite/libtclsqlite.so
-%%WITH_TCL%%lib/sqlite/pkgIndex.tcl
-%%WITH_TCL%%@dirrm lib/sqlite
+%%WITH_TCLWRAPPER%%lib/sqlite/libtclsqlite.so
+%%WITH_TCLWRAPPER%%lib/sqlite/pkgIndex.tcl
+%%WITH_TCLWRAPPER%%@dirrm lib/sqlite
%%EXAMPLESDIR%%/example.tcl
@dirrm %%EXAMPLESDIR%%
diff --git a/databases/sqlite34/Makefile b/databases/sqlite34/Makefile
index abe1a8f1eecb..9b3d98a19dd9 100644
--- a/databases/sqlite34/Makefile
+++ b/databases/sqlite34/Makefile
@@ -13,7 +13,7 @@ MASTER_SITE_SUBDIR= mnag/${PORTNAME}
DISTNAME= sqlite-${PORTVERSION}
MAINTAINER= mnag@FreeBSD.org
-COMMENT= An SQL database engine in a C library w/ Tcl wrapper
+COMMENT= An SQL database engine in a C library
CONFLICTS= sqlite3-[0-9]*
@@ -29,22 +29,34 @@ OPTIONS= DEBUG "Enable debugging & verbose explain" off \
DOCS "Building docs (depends on TCL)" on \
FTS1 "Enable FTS1 (Full Text Search) module" off \
FTS2 "Enable FTS2 (Full Text Search) module" off \
- TCLWRAPPER "TCL wrapper for SQLITE" off \
+ TCLWRAPPER "Enable TCL wrapper" off \
THREADS "Enable threads support" off
-# Defaults, for building the docs:
-TCL_V?= 8.4
-MAKE_ARGS+= TCLSH=tclsh${TCL_V}
-MAKE_ENV+= TCL_VER=${TCL_V}
-
.include <bsd.port.pre.mk>
.if defined(WITH_DEBUG)
CONFIGURE_ARGS+= --enable-debug
.endif
-.if !defined(NOPORTDOCS) && !defined(WITHOUT_DOCS)
-BUILD_DEPENDS+= tclsh${TCL_V}:${PORTSDIR}/lang/tcl${TCL_V:S/.//}
+.if defined(WITHOUT_DOCS)
+NOPORTDOCS= yes
+.elif defined(NOPORTDOCS)
+WITHOUT_DOCS= yes
+.endif
+
+.if defined(WITH_TCLWRAPPER)
+USE_TCL= 84+
+.include "${PORTSDIR}/Mk/bsd.tcl.mk"
+.else
+. if !defined(WITHOUT_DOCS)
+USE_TCL_BUILD= 84+
+. include "${PORTSDIR}/Mk/bsd.tcl.mk"
+. endif
+.endif
+
+.if !defined(WITHOUT_DOCS)
+MAKE_ARGS+= TCLSH=${TCLSH}
+MAKE_ENV+= TCL_VER=${TCL_VER}
ALL_TARGET+= all doc
PORTDOCS= *
.endif
@@ -62,8 +74,10 @@ EXTRA_PATCHES+= ${FILESDIR}/fts2_patch-Makefile.in
.if defined(WITH_TCLWRAPPER)
CATEGORIES+= lang tcl
-LIB_DEPENDS+= tcl${TCL_V:S/.//}:${PORTSDIR}/lang/tcl${TCL_V:S/.//}
-CONFIGURE_ARGS+= --with-tcl=${LOCALBASE}/lib/tcl${TCL_V}
+COMMENT+= with TCL wrapper
+MAKE_ARGS+= TCLSH=${TCLSH}
+MAKE_ENV+= TCL_VER=${TCL_VER}
+CONFIGURE_ARGS+= --with-tcl=${TCL_LIBDIR}
PLIST_SUB+= WITH_TCLWRAPPER=""
.else
CONFIGURE_ARGS+= --disable-tcl
@@ -82,9 +96,9 @@ post-patch:
-e "s|--mode=link|--mode=link --tag=CC|g" \
-e "s|\$${HAVE_TCL:1=tcl_install}||" \
${WRKSRC}/Makefile.in
- @${ECHO} "config_TARGET_TCL_INC=\"-I${PREFIX}/include/tcl${TCL_V}\"" \
+ @${ECHO} "config_TARGET_TCL_INC=\"-I${TCL_INCLUDEDIR}\"" \
> ${WRKSRC}/freebsd.hints
- @${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_V:S/.//}\"" \
+ @${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_VER:S/.//}\"" \
>> ${WRKSRC}/freebsd.hints
pre-configure:
@@ -106,7 +120,7 @@ post-install:
@${MKDIR} ${EXAMPLESDIR}
@${INSTALL_DATA} ${FILESDIR}/example.tcl ${EXAMPLESDIR}
.endif
-.if !defined(NOPORTDOCS) && !defined(WITHOUT_DOCS)
+.if !defined(WITHOUT_DOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
.endif