freebsd-ports/databases/sqlite2/Makefile
Baptiste Daroussin 9346b215f0 new devel/pkgconf added to replace devel/pkg-config. new version of pkg-config
are no more self hosting so we are stuck with 0.25 version while pkgconf provide
the same set of features as 0.27 and a compatible frontend. A symlink to
pkg-config has been added for convenience and compatibility

This also introduces a new macro to use pkgconf in your ports:
USE_PKGCONFIG

it can take the following arguments:
 - yes (meaning build only dep)
 - build (meaning build only dep)
 - run (meaning run only dep)
 - both (meaning run and build dep)

From now USE_GNOME= pkgconfig is deprecated in favour of USE_PKGCONFIG
The old gnome macro has been modified to use pkgconf but still the sameway: run
and build dep to avoid large breakage.

While here fix some ports relying on pkg-config but not specifying it, fix some
ports broken because testing wrong .pc files, and fix ports using pkg-config
--version to determine pkg-config version instead of
pkg-config --modversion pkg-config like recommanded by pkg-config

With Hat:	portmgr
Exp-runs by:	bapt (pointhat-west), beat (pointyhat)
2012-07-26 05:40:22 +00:00

95 lines
2.2 KiB
Makefile

# ex:ts=8
# New ports collection makefile for: sqlite
# Date created: Feb 21, 2001
# Whom: Ying-Chieh Liao <ijliao@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= sqlite
PORTVERSION= 2.8.17
PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://www.sqlite.org/
MAINTAINER= ports@FreeBSD.org
COMMENT= An SQL database engine in a C library
USE_GMAKE= YES
USE_AUTOTOOLS= libtool
USE_LDCONFIG= YES
USE_PKGCONFIG= yes
CONFIGURE_ARGS= --prefix=${PREFIX} --with-hints=freebsd.hints
DOCSDIR= ${PREFIX}/share/doc/sqlite2
EXAMPLESDIR= ${PREFIX}/share/examples/sqlite2
LATEST_LINK= ${PKGNAMEPREFIX}${PORTNAME}2
EXTRACT_AFTER_ARGS= | ${TAR} -xf - --exclude CVS
OPTIONS_DEFINE= TCL THREADS DOCS
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MTCL}
USE_TCL= 83+
.else
.if ${PORT_OPTIONS:MDOCS}
USE_TCL_BUILD= 83+
. endif
.endif
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MTCL}
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_TCLWRAPPER="@comment "
.endif
.if ${PORT_OPTIONS:MDOCS}
PORTDOCS= *
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
.if ${PORT_OPTIONS:MTCL} || !empty(PORT_OPTIONS:MDOCS)
@${ECHO} "config_TARGET_TCL_INC=\"-I${TCL_INCLUDEDIR}\"" \
> ${WRKSRC}/freebsd.hints
@${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_VER:S/.//}\"" \
>> ${WRKSRC}/freebsd.hints
.else
@${ECHO} "" > ${WRKSRC}/freebsd.hints
.endif
.if ${PORT_OPTIONS:MTHREADS}
@${ECHO} "config_TARGET_CFLAGS=\"-DTHREADSAFE=1 ${PTHREAD_LIBS}\"" \
>> ${WRKSRC}/freebsd.hints
.endif
post-build:
.if ${PORT_OPTIONS:MDOCS}
@${ECHO_MSG} "===> Building docs"
@(cd ${WRKSRC} && ${GMAKE} ${MAKE_ARGS} doc)
.endif
post-install:
.if ${PORT_OPTIONS:MTCL}
@(cd ${WRKSRC} && ${GMAKE} install-tcl)
${INSTALL_DATA} ${FILESDIR}/pkgIndex.tcl ${PREFIX}/lib/sqlite/
.endif
.if ${PORT_OPTIONS:MTCL}
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCSDIR}
.endif
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${FILESDIR}/example.tcl ${EXAMPLESDIR}
.include <bsd.port.post.mk>