1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-27 10:03:20 +00:00

- add stage support

- remove PKGNAMESUFFIX
- update to upstream svn r1605767
- add additional NO_PACKAGE (this port is only for interested developper)
This commit is contained in:
Olli Hauer 2014-07-13 20:05:32 +00:00
parent 4ac6fb0d27
commit b3e28ca352
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=361707
4 changed files with 105 additions and 171 deletions

View File

@ -3,197 +3,127 @@
PORTNAME= apr
PORTVERSION= 2.0.${SNAPDATE}
PORTREVISION= 3
CATEGORIES= devel
MASTER_SITES= http://svn-master.apache.org/snapshots/apr/
MASTER_SITES= LOCAL/ohauer
DISTNAME= ${PORTNAME}_${SNAPDATE}
MAINTAINER= apache@FreeBSD.org
COMMENT= Apache Portability Library
LIB_DEPENDS= expat:${PORTSDIR}/textproc/expat2
LICENSE= APACHE20
LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2
NO_LATEST_LINK= yes
NO_PACKAGE= yes
SNAPDATE= 20110821151329
SNAPDATE= 20140626144503
NO_OPTIONS_SORT=yes
OPTIONS_DEFINE= THREADS IPV6 DEVRANDOM BDB GDBM MYSQL NDBM PGSQL SQLITE DEVELOPER_ONLY
OPTIONS_DEFAULT=THREADS IPV6 DEVRANDOM BDB GDBM
NDBM_DESC= NDBM support in apr-util
DEVRANDOM_DESC= Use /dev/random or compatible
DEVELOPER_ONLY_DESC= I want to test apr2 not the maintainer
NO_STAGE= yes
.include <bsd.port.options.mk>
USES= iconv perl5
USE_AUTOTOOLS= automake autoconf libtool:env
USE_PERL5= build
USES= tar:xz iconv perl5 pathfix libtool
USE_AUTOTOOLS= automake autoconf libtool:env
USE_PERL5= build
USE_PYTHON_BUILD= 2
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= CC="${CC}"
OPTIONS_SUB= yes
OPTIONS_DEFINE= DEVELOPER_ONLY
OPTIONS_GROUP= APR APU
OPTIONS_GROUP_APR= THREADS IPV6 DEVRANDOM
OPTIONS_GROUP_APU= BDB GDBM MYSQL NDBM PGSQL SQLITE
OPTIONS_RADIO= CRYPTO
OPTIONS_RADIO_CRYPTO= SSL NSS
OPTIONS_DEFAULT= THREADS IPV6 DEVRANDOM BDB GDBM SSL
CONFIGURE_ARGS= --with-installbuilddir=${DATADIR}/build-2 \
--with-expat=${LOCALBASE} \
--with-iconv=${ICONV_PREFIX}
DEVELOPER_ONLY_DESC= I want to test apr2 not the maintainer
DEVRANDOM_DESC= Use /dev/random or compatible
NDBM_DESC= NDBM support
NSS_DESC= NSS crypto driver
SSL_DESC= OpenSSL crypto driver
WRKSRC= ${WRKDIR}/apr
DEVRANDOM_CONFIGURE_WITH= devrandom
# is there a valid requirement to build without threads
# if not make thread a mandantory default
THREADS_CONFIGURE_ENABLE= threads
# APR-Util Options
BDB_USE= BDB=48+
GDBM_CONFIGURE_WITH= gdbm=${LOCALBASE}
GDBM_LIB_DEPENDS= libgdbm.so:${PORTSDIR}/databases/gdbm
IPV6_CONFIGURE_ENABLE= ipv6
MYSQL_CFLAGS= -I${LOCALBASE}/include -I${LOCALBASE}/include/mysql -DHAVE_MYSQL_H
MYSQL_CONFIGURE_WITH= mysql=${LOCALBASE}
MYSQL_LIBS= -L${LOCALBASE}/lib/mysql
MYSQL_USE= MYSQL=yes
NDBM_CONFIGURE_WITH= ndbm=/usr
PGSQL_CONFIGURE_ENV= ac_cv_path_PGSQL_CONFIG=""
PGSQL_CONFIGURE_WITH= pgsql=${LOCALBASE}
PGSQL_USE= PGSQL=yes
SQLITE_CONFIGURE_WITH= sqlite3=${LOCALBASE}
SQLITE_USE= SQLITE=yes
# crypto
SSL_USE= OPENSSL=yes
SSL_CONFIGURE_WITH= openssl=${OPENSSLBASE}
SSL_CPPFLAGS= -I${OPENSSLINC}
SSL_LDFLAGS= -L${OPENSSLLIB}
NSS_LIB_DEPENDS= libnss3.so:${PORTSDIR}/security/nss
NSS_CPPFLAGS= -I${LOCALBASE}/include/nss
NSS_LDFLAGS= -L${LOCALBASE}/lib/nss
NSS_CONFIGURE_WITH= nss=${LOCALBASE}
.include <bsd.port.options.mk>
CONFIGURE_ENV+= CC="${CC}"
CONFIGURE_ARGS+=--with-installbuilddir=${DATADIR}/build-2 \
--with-expat=${LOCALBASE} \
--with-iconv=${ICONV_PREFIX}
SHLIB_MAJOR= 0
PLIST_SUB= SHLIB_MAJOR="${SHLIB_MAJOR}"
.if empty(PORT_OPTIONS:MDEVELOPER_ONLY)
IGNORE= not for the general public. Maintainer only supports developers of apr
.endif
.if ${PORT_OPTIONS:MTHREADS}
CONFIGURE_ARGS+= --enable-threads
.else
CONFIGURE_ARGS+= --disable-threads
. if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-nothr
. else
PKGNAMESUFFIX= -nothr
. endif
.endif
.if ${PORT_OPTIONS:MIPV6}
CONFIGURE_ARGS+= --enable-ipv6
. if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ipv6
. else
PKGNAMESUFFIX= -ipv6
. endif
.else
CONFIGURE_ARGS+= --disable-ipv6
.endif
.if ${PORT_OPTIONS:MDEVRANDOM}
CONFIGURE_ARGS+= --with-devrandom
. if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-devrandom
. else
PKGNAMESUFFIX= -devrandom
. endif
.else
CONFIGURE_ARGS+= --without-devrandom
.endif
######### APR-Util Options
.if ${PORT_OPTIONS:MGDBM}
PLIST_SUB+= GDBM=""
EXTRAS= yes
LIB_DEPENDS+= gdbm:${PORTSDIR}/databases/gdbm
CONFIGURE_ARGS+= --with-gdbm=${LOCALBASE}
. if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-gdbm
. else
PKGNAMESUFFIX= -gdbm
. endif
.else
PLIST_SUB+= GDBM="@comment "
CONFIGURE_ARGS+= --without-gdbm
.endif
PLIST_SUB+= SHLIB_MAJOR="${SHLIB_MAJOR}"
# stick BDB here, else BDB_INCLUDE_DIR and BDB_LIB_DIR
# are not resolvable
.if ${PORT_OPTIONS:MBDB}
EXTRAS= yes
PLIST_SUB+= BDB=""
USE_BDB= 42+
CONFIGURE_ARGS+= --with-berkeley-db=${BDB_INCLUDE_DIR}:${BDB_LIB_DIR}
. if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,}
. else
PKGNAMESUFFIX= -${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,}
. endif
.else
PLIST_SUB+= BDB="@comment "
CONFIGURE_ARGS+= --without-berkeley-db
.endif
.if ${PORT_OPTIONS:MNDBM}
EXTRAS= yes
PLIST_SUB+= NDBM=""
CONFIGURE_ARGS+= --with-ndbm=/usr
. if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ndbm
. else
PKGNAMESUFFIX= -ndbm
. endif
.else
PLIST_SUB+= NDBM="@comment "
CONFIGURE_ARGS+= --without-ndbm
.if ! ${PORT_OPTIONS:MDEVELOPER_ONLY}
IGNORE= not for the general public. Maintainer only supports developers of apr
.endif
.if ${PORT_OPTIONS:MMYSQL}
EXTRAS= yes
PLIST_SUB+= MYSQL=""
USE_MYSQL= YES
CONFIGURE_ARGS+= --with-mysql=${LOCALBASE}
CFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/mysql -DHAVE_MYSQL_H
LIBS+= -L${LOCALBASE}/lib/mysql
. if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-mysql${MYSQL_VER}
. else
PKGNAMESUFFIX= -mysql
. endif
# crypto required (apache24)
.if ${PORT_OPTIONS:MSSL} || ${PORT_OPTIONS:MNSS}
CONFIGURE_ARGS+= --with-crypto
.else
PLIST_SUB+= MYSQL="@comment "
CONFIGURE_ARGS+= --without-mysql
.endif
.if ${PORT_OPTIONS:MPGSQL}
EXTRAS= yes
PLIST_SUB+= PGSQL=""
USE_PGSQL= YES
CONFIGURE_ARGS+= --with-pgsql=${LOCALBASE}
CONFIGURE_ENV+= ac_cv_path_PGSQL_CONFIG=""
. if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-pgsql${PGSQL_VER}
. else
PKGNAMESUFFIX= -pgsql
. endif
.else
PLIST_SUB+= PGSQL="@comment "
CONFIGURE_ARGS+= --without-pgsql
.endif
.if ${PORT_OPTIONS:MSQLITE}
EXTRAS= yes
PLIST_SUB+= SQLITE3=""
USE_SQLITE= YES
CONFIGURE_ARGS+= --with-sqlite3=${LOCALBASE}
. if defined(PKGNAMESUFFIX)
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-sqlite3
. else
PKGNAMESUFFIX= -sqlite3
. endif
.else
CONFIGURE_ARGS+= --without-sqlite3
PLIST_SUB+= SQLITE3="@comment "
.endif
.if defined(EXTRAS)
PLIST_SUB+= EXTRAS=""
.else
PLIST_SUB+= EXTRAS="@comment "
CONFIGURE_ARGS+= --without-crypto
.endif
post-patch:
${REINPLACE_CMD} -e 's/OSVERSION/${OSVERSION}/g' ${WRKSRC}/build/apr_hints.m4
${FIND} ${WRKSRC} -name "Makefile.in*" | ${XARGS} ${REINPLACE_CMD} -e \
's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g'
${REINPLACE_CMD} -e '1 s/python/${PYTHON_VERSION}/' ${WRKSRC}/build/gen-build.py
${REINPLACE_CMD} -e 's|%%OSVERSION%%|${OSVERSION}|g' ${WRKSRC}/build/apr_hints.m4
${REINPLACE_CMD} -e '1s|${SETENV} python|${LOCALBASE}/bin/${PYTHON_VERSION}|' \
${WRKSRC}/build/gen-build.py
${REINPLACE_CMD} -e 's|PrintPath python|PrintPath ${PYTHON_VERSION}|' \
-e 's|python -c|${PYTHON_VERSION} -c|' \
${WRKSRC}/build/buildcheck.sh
run-autotools:
@(cd ${WRKSRC} ; ${SETENV} ${CONFIGURE_ENV} ${SH} ./buildconf)
@(cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${SH} ./buildconf)
pre-install:
# looking forward to sub packages and create the modules directory
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/apr-2
@${TOUCH} ${STAGEDIR}${PREFIX}/lib/apr-2/.keep.me
post-install:
${FIND} ${STAGEDIR}/${PREFIX}/lib -name \*.so | ${XARGS} ${STRIP_CMD}
test: build
@(cd ${WRKSRC}; make test)
@-make test -C ${WRKSRC}
#regression-test: test
@ -208,6 +138,7 @@ debug_autoconf:
@${ECHO} "LIBTOOL_SHAREDIR: ${LIBTOOL_SHAREDIR}"
@${ECHO} "LIBTOOL_LIBEXECDIR: ${LIBTOOL_LIBEXECDIR}"
@${ECHO} "LIBTOOL_M4: ${LIBTOOL_M4}"
@${ECHO} "${SETENV} ${CONFIGURE_ENV} ${SH} ./configure ${CONFIGURE_ARGS} ${CONFIGURE_ARGS}"
@${ECHO} "==================="
@${ECHO} "${SETENV} ${CONFIGURE_ENV} ${SH} ./configure ${CONFIGURE_ARGS}" | ${TR} -s ' ' '\n'
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (apr_20110821151329.tar.gz) = 2a1597f102428b1f6ce81362561f450f83ecff04066e685bf70f1da70ce4932d
SIZE (apr_20110821151329.tar.gz) = 977267
SHA256 (apr_20140626144503.tar.xz) = b9e5a644c6852ec1980ddbc2724e3fe24584104e40fecbc5c87ddf0b34a1c17e
SIZE (apr_20140626144503.tar.xz) = 727996

View File

@ -9,7 +9,7 @@
- else
- os_version=000000
- fi
+ osversion="${900010}"
+ osversion=%%OSVERSION%%
# 502102 is when libc_r switched to libpthread (aka libkse).
if test $os_version -ge "502102"; then
apr_cv_pthreads_cflags="none"

View File

@ -12,6 +12,7 @@ include/apr-2/apr_dbm.h
include/apr-2/apr_dso.h
include/apr-2/apr_env.h
include/apr-2/apr_errno.h
include/apr-2/apr_escape.h
include/apr-2/apr_file_info.h
include/apr-2/apr_file_io.h
include/apr-2/apr_fnmatch.h
@ -43,6 +44,7 @@ include/apr-2/apr_sdbm.h
include/apr-2/apr_sha1.h
include/apr-2/apr_shm.h
include/apr-2/apr_signal.h
include/apr-2/apr_skiplist.h
include/apr-2/apr_strings.h
include/apr-2/apr_strmatch.h
include/apr-2/apr_tables.h
@ -63,42 +65,43 @@ include/apr-2/apu.h
include/apr-2/apu_errno.h
include/apr-2/apu_version.h
include/apr-2/apu_want.h
lib/apr-2/.keep.me
%%NSS%%lib/apr-2/apr_crypto_nss-2.so
%%NSS%%lib/apr-2/apr_crypto_nss.a
%%NSS%%lib/apr-2/apr_crypto_nss.so
%%SSL%%lib/apr-2/apr_crypto_openssl-2.so
%%SSL%%lib/apr-2/apr_crypto_openssl.a
%%SSL%%lib/apr-2/apr_crypto_openssl.so
%%MYSQL%%lib/apr-2/apr_dbd_mysql-2.so
%%MYSQL%%lib/apr-2/apr_dbd_mysql.a
%%MYSQL%%lib/apr-2/apr_dbd_mysql.la
%%MYSQL%%lib/apr-2/apr_dbd_mysql.so
%%PGSQL%%lib/apr-2/apr_dbd_pgsql-2.so
%%PGSQL%%lib/apr-2/apr_dbd_pgsql.a
%%PGSQL%%lib/apr-2/apr_dbd_pgsql.la
%%PGSQL%%lib/apr-2/apr_dbd_pgsql.so
%%SQLITE3%%lib/apr-2/apr_dbd_sqlite3-2.so
%%SQLITE3%%lib/apr-2/apr_dbd_sqlite3.a
%%SQLITE3%%lib/apr-2/apr_dbd_sqlite3.la
%%SQLITE3%%lib/apr-2/apr_dbd_sqlite3.so
%%SQLITE%%lib/apr-2/apr_dbd_sqlite3-2.so
%%SQLITE%%lib/apr-2/apr_dbd_sqlite3.a
%%SQLITE%%lib/apr-2/apr_dbd_sqlite3.so
%%BDB%%lib/apr-2/apr_dbm_db-2.so
%%BDB%%lib/apr-2/apr_dbm_db.a
%%BDB%%lib/apr-2/apr_dbm_db.la
%%BDB%%lib/apr-2/apr_dbm_db.so
%%GDBM%%lib/apr-2/apr_dbm_gdbm-2.so
%%GDBM%%lib/apr-2/apr_dbm_gdbm.a
%%GDBM%%lib/apr-2/apr_dbm_gdbm.la
%%GDBM%%lib/apr-2/apr_dbm_gdbm.so
%%NDBM%%lib/apr-2/apr_dbm_ndbm-2.so
%%NDBM%%lib/apr-2/apr_dbm_ndbm.a
%%NDBM%%lib/apr-2/apr_dbm_ndbm.la
%%NDBM%%lib/apr-2/apr_dbm_ndbm.so
lib/apr.exp
lib/libapr-2.a
lib/libapr-2.la
lib/libapr-2.so
lib/libapr-2.so.%%SHLIB_MAJOR%%
lib/libapr-2.so.%%SHLIB_MAJOR%%.%%SHLIB_MAJOR%%.%%SHLIB_MAJOR%%
libdata/pkgconfig/apr-2.pc
%%DATADIR%%/build-2/apr_rules.mk
%%DATADIR%%/build-2/libtool
%%DATADIR%%/build-2/make_exports.awk
%%DATADIR%%/build-2/make_var_export.awk
%%DATADIR%%/build-2/mkdir.sh
@dirrm include/apr-2
@dirrm lib/apr-2
@dirrm %%DATADIR%%/build-2
@dirrm %%DATADIR%%
%%EXTRAS%%@dirrm lib/apr-2
@dirrm include/apr-2