|
Lines 3-21
Link Here
|
| 3 |
# Whom: Garrett Rooney <rooneg@electricjellyfish.net> |
3 |
# Whom: Garrett Rooney <rooneg@electricjellyfish.net> |
| 4 |
# |
4 |
# |
| 5 |
# $FreeBSD: ports/devel/apr/Makefile,v 1.76 2008/08/22 18:49:56 pgollucci Exp $ |
5 |
# $FreeBSD: ports/devel/apr/Makefile,v 1.76 2008/08/22 18:49:56 pgollucci Exp $ |
| 6 |
# |
|
|
| 7 |
# Tunables: |
| 8 |
# APR_UTIL_WITHOUT_THREADS: disable threads support |
| 9 |
# APR_UTIL_WITH_GDBM: force dependency on the GNU dbm |
| 10 |
# APR_UTIL_WITHOUT_GDBM: unconditionally disable the use of GNU dbm |
| 11 |
# APR_UTIL_WITH_BERKELEY_DB: force dependency on Sleepycat's Berkeley DB 4.2 |
| 12 |
# APR_UTIL_WITHOUT_BERKELEY_DB: unconditionally disable the use of db4.2 |
| 13 |
# (the database bindings are detected and recorded automatically if these |
| 14 |
# switches are not set) |
| 15 |
# APR_UTIL_WITH_LDAP: force dependency on OpenLDAP |
| 16 |
|
6 |
|
| 17 |
PORTNAME= apr |
7 |
PORTNAME= apr |
| 18 |
PORTVERSION= ${APR_VERSION}.${APU_VERSION} |
8 |
PORTVERSION= ${APR_VERSION}.${APU_VERSION} |
|
|
9 |
PORTREVISION= 1 |
| 19 |
CATEGORIES= devel |
10 |
CATEGORIES= devel |
| 20 |
MASTER_SITES= ${MASTER_SITE_APACHE} |
11 |
MASTER_SITES= ${MASTER_SITE_APACHE} |
| 21 |
MASTER_SITE_SUBDIR= apr |
12 |
MASTER_SITE_SUBDIR= apr |
|
Lines 26-70
Link Here
|
| 26 |
|
17 |
|
| 27 |
LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2 |
18 |
LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2 |
| 28 |
|
19 |
|
|
|
20 |
OPTIONS= THREADS "Enable Threads in apr" on \ |
| 21 |
IPV6 "Enable IPV6 Support in apr" off \ |
| 22 |
GDBM "Enable GNU dbm support in apr-util" on \ |
| 23 |
BDB "Enable Berkley BDB support in apr-util" on \ |
| 24 |
NDBM "Enable NDBM support in apr-util" off \ |
| 25 |
LDAP "Enable LDAP support in apr-util" off \ |
| 26 |
MYSQL "Enable MySQL suport in apr-util" off \ |
| 27 |
PGSQL "Enable Postgresql suport in apr-util" off |
| 28 |
|
| 29 |
APR_VERSION= 1.3.3 |
29 |
APR_VERSION= 1.3.3 |
| 30 |
APU_VERSION= 1.3.4 |
30 |
APU_VERSION= 1.3.4 |
| 31 |
|
31 |
|
| 32 |
USE_ICONV= yes |
32 |
USE_ICONV= yes |
| 33 |
USE_AUTOTOOLS= automake:19 autoconf:262 libtool:15:env |
33 |
USE_AUTOTOOLS= automake:19 autoconf:262 libtool:15:env |
| 34 |
USE_PERL5_BUILD= yes |
34 |
USE_PERL5_BUILD= yes |
| 35 |
USE_GMAKE= yes |
|
|
| 36 |
USE_PYTHON_BUILD= yes |
35 |
USE_PYTHON_BUILD= yes |
| 37 |
USE_LDCONFIG= yes |
36 |
USE_LDCONFIG= yes |
| 38 |
GNU_CONFIGURE= yes |
37 |
GNU_CONFIGURE= yes |
| 39 |
|
38 |
|
| 40 |
NO_WRKSUBDIR= yes |
39 |
NO_WRKSUBDIR= yes |
|
|
40 |
APR_WRKDIR= ${WRKDIR}/apr-${APR_VERSION} |
| 41 |
APU_WRKDIR= ${WRKDIR}/apr-util-${APU_VERSION} |
| 41 |
|
42 |
|
| 42 |
PLIST_SUB= SHLIB_MAJOR="${SHLIB_MAJOR}" |
43 |
PLIST_SUB= SHLIB_MAJOR="${SHLIB_MAJOR}" |
| 43 |
SHLIB_MAJOR= 3 |
44 |
SHLIB_MAJOR= 3 |
| 44 |
|
45 |
|
| 45 |
APR_UTIL_CONF_ARGS= --with-apr=../apr-${APR_VERSION} \ |
46 |
APR_CONF_ARGS= |
|
|
47 |
APU_CONF_ARGS= --with-apr=${APR_WRKDIR} \ |
| 46 |
--with-expat=${LOCALBASE} \ |
48 |
--with-expat=${LOCALBASE} \ |
| 47 |
--with-iconv=${LOCALBASE} |
49 |
--with-iconv=${LOCALBASE} |
| 48 |
|
50 |
|
| 49 |
.include <bsd.port.pre.mk> |
51 |
.include <bsd.port.pre.mk> |
| 50 |
|
52 |
|
| 51 |
.if defined(APR_UTIL_WITHOUT_THREADS) |
53 |
.if defined(WITH_MYSQL) || defined(WITH_PGSQL) || defined (WITH_LDAP) |
| 52 |
CONFIGURE_ARGS+= --disable-threads |
54 |
PLIST_SUB+= APU_EXTRAS="" |
| 53 |
APR_UTIL_CONF_ARGS+= --disable-threads |
55 |
.else |
|
|
56 |
PLIST_SUB+= APU_EXTRAS="@comment " |
| 57 |
.endif |
| 58 |
|
| 59 |
########## APR Options |
| 60 |
.if defined(WITHOUT_THREADS) |
| 61 |
APR_CONF_ARGS+= --disable-threads |
| 54 |
.if defined(PKGNAMESUFFIX) |
62 |
.if defined(PKGNAMESUFFIX) |
| 55 |
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-nothr |
63 |
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-nothr |
| 56 |
.else |
64 |
.else |
| 57 |
PKGNAMESUFFIX= -nothr |
65 |
PKGNAMESUFFIX= -nothr |
| 58 |
.endif |
66 |
.endif |
| 59 |
.else |
67 |
.else |
| 60 |
CONFIGURE_ARGS+= --enable-threads |
68 |
APR_CONF_ARGS+= --enable-threads |
| 61 |
.endif |
69 |
.endif |
| 62 |
|
70 |
|
| 63 |
.if defined(APR_UTIL_WITHOUT_GDBM) |
71 |
.if defined(WITHOUT_IPV6) |
| 64 |
APR_UTIL_CONF_ARGS+= --without-gdbm |
72 |
APR_CONF_ARGS+= --disable-ipv6 |
| 65 |
.elif defined(APR_UTIL_WITH_GDBM) || exists(${LOCALBASE}/lib/libgdbm.so.3) |
73 |
.else |
|
|
74 |
APR_CONF_ARGS+= --enable-ipv6 |
| 75 |
.if defined(PKGNAMESUFFIX) |
| 76 |
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ipv6 |
| 77 |
.else |
| 78 |
PKGNAMESUFFIX= -ipv6 |
| 79 |
.endif |
| 80 |
.endif |
| 81 |
|
| 82 |
######### APR-Util Options |
| 83 |
.if defined(WITHOUT_GDBM) |
| 84 |
APU_CONF_ARGS+= --without-gdbm |
| 85 |
.elif defined(WITH_GDBM) || exists(${LOCALBASE}/lib/libgdbm.so.3) |
| 66 |
LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm |
86 |
LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm |
| 67 |
APR_UTIL_CONF_ARGS+= --with-gdbm=${LOCALBASE} |
87 |
APU_CONF_ARGS+= --with-gdbm=${LOCALBASE} |
| 68 |
.if defined(PKGNAMESUFFIX) |
88 |
.if defined(PKGNAMESUFFIX) |
| 69 |
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-gdbm |
89 |
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-gdbm |
| 70 |
.else |
90 |
.else |
|
Lines 74-88
Link Here
|
| 74 |
APR_UTIL_CONF_ARGS+= --without-gdbm |
94 |
APR_UTIL_CONF_ARGS+= --without-gdbm |
| 75 |
.endif |
95 |
.endif |
| 76 |
|
96 |
|
| 77 |
.if defined(WITH_BDB) |
97 |
.if defined(WITHOUT_BDB) |
| 78 |
APR_UTIL_WITH_BERKELEY_DB= yes |
98 |
APU_CONF_ARGS+= --without-berkeley-db |
| 79 |
.endif |
99 |
.elif defined(WITH_BDB) || exists(${LOCALBASE}/lib/libdb-4.2.so.2) |
| 80 |
|
|
|
| 81 |
.if defined(APR_UTIL_WITHOUT_BERKELEY_DB) |
| 82 |
APR_UTIL_CONF_ARGS+= --without-berkeley-db |
| 83 |
.elif defined(APR_UTIL_WITH_BERKELEY_DB) || exists(${LOCALBASE}/lib/libdb-4.2.so.2) |
| 84 |
USE_BDB= 42+ |
100 |
USE_BDB= 42+ |
| 85 |
APR_UTIL_CONF_ARGS+= --with-berkeley-db=${BDB_INCLUDE_DIR}:${BDB_LIB_DIR} |
101 |
APU_CONF_ARGS+= --with-berkeley-db=${BDB_INCLUDE_DIR}:${BDB_LIB_DIR} |
| 86 |
.if defined(PKGNAMESUFFIX) |
102 |
.if defined(PKGNAMESUFFIX) |
| 87 |
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,} |
103 |
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,} |
| 88 |
.else |
104 |
.else |
|
Lines 90-103
Link Here
|
| 90 |
.endif |
106 |
.endif |
| 91 |
.endif |
107 |
.endif |
| 92 |
|
108 |
|
| 93 |
.if defined(WITH_LDAP) |
109 |
.if defined(WITHOUT_NDBM) |
| 94 |
APR_UTIL_WITH_LDAP= yes |
110 |
APU_CONF_ARGS+= --without-ndbm |
|
|
111 |
.elif defined(WITH_NDBM) |
| 112 |
APU_CONF_ARGS+= --with-ndbm=/usr |
| 113 |
.if defined(PKGNAMESUFFIX) |
| 114 |
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ndbm |
| 115 |
.else |
| 116 |
PKGNAMESUFFIX= -ndbm |
| 117 |
.endif |
| 95 |
.endif |
118 |
.endif |
| 96 |
|
119 |
|
| 97 |
.if defined(APR_UTIL_WITH_LDAP) |
120 |
.if defined(WITH_LDAP) |
| 98 |
PLIST_SUB+= LDAP="" |
121 |
PLIST_SUB+= LDAP="" |
| 99 |
USE_OPENLDAP= yes |
122 |
USE_OPENLDAP= yes |
| 100 |
APR_UTIL_CONF_ARGS+= --with-ldap-include=${LOCALBASE}/include \ |
123 |
APU_CONF_ARGS+= --with-ldap-include=${LOCALBASE}/include \ |
| 101 |
--with-ldap-lib=${LOCALBASE}/lib --with-ldap=ldap |
124 |
--with-ldap-lib=${LOCALBASE}/lib --with-ldap=ldap |
| 102 |
.if defined(PKGNAMESUFFIX) |
125 |
.if defined(PKGNAMESUFFIX) |
| 103 |
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ldap |
126 |
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-ldap |
|
Lines 108-189
Link Here
|
| 108 |
PLIST_SUB+= LDAP="@comment " |
131 |
PLIST_SUB+= LDAP="@comment " |
| 109 |
.endif |
132 |
.endif |
| 110 |
|
133 |
|
| 111 |
pre-extract: |
134 |
.if defined(WITH_MYSQL) |
| 112 |
@${ECHO_MSG} "" |
135 |
PLIST_SUB+= MYSQL="" |
| 113 |
.if defined(APR_UTIL_WITHOUT_THREADS) |
136 |
USE_MYSQL= YES |
| 114 |
@${ECHO_MSG} "apr library will be built without threads support." |
137 |
APU_CONF_ARGS+= --with-mysql=${LOCALBASE} |
| 115 |
.else |
138 |
CONFIGURE_ENV+= LIBS="${LIBS}" |
| 116 |
@${ECHO_MSG} "apr library will be built with threads support." |
139 |
CFLAGS+= -I${LOCALBASE}/include/mysql -DHAVE_MYSQL_H |
| 117 |
@${ECHO_MSG} "All programs which use apr must be linked with threads too." |
140 |
LDFLAGS+= -L${LOCALBASE}/lib/mysql |
| 118 |
@${ECHO_MSG} "You can disable threads by defining APR_UTIL_WITHOUT_THREADS." |
141 |
.if defined(PKGNAMESUFFIX) |
| 119 |
.endif |
142 |
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-mysql |
| 120 |
@${ECHO_MSG} "" |
143 |
.else |
| 121 |
.if defined(APR_UTIL_WITHOUT_GDBM) |
144 |
PKGNAMESUFFIX= -mysql |
| 122 |
@${ECHO_MSG} "GDBM support is disabled." |
145 |
.endif |
| 123 |
.elif defined(APR_UTIL_WITH_GDBM) |
146 |
.else |
| 124 |
@${ECHO_MSG} "GDBM support is forced." |
147 |
PLIST_SUB+= MYSQL="@comment " |
| 125 |
.elif exists(${LOCALBASE}/lib/libgdbm.so.3) |
148 |
.endif |
| 126 |
@${ECHO_MSG} "GDBM support is enabled." |
149 |
|
| 127 |
@${ECHO_MSG} "You can disable GDBM support by defining APR_UTIL_WITHOUT_GDBM." |
150 |
.if defined(WITH_PGSQL) |
| 128 |
.else |
151 |
PLIST_SUB+= PGSQL="" |
| 129 |
@${ECHO_MSG} "GDBM was not found." |
152 |
USE_PGSQL= YES |
| 130 |
@${ECHO_MSG} "You can force GDBM support by defining APR_UTIL_WITH_GDBM." |
153 |
APU_CONF_ARGS+= --with-pgsql=${LOCALBASE} |
| 131 |
.endif |
154 |
CONFIGURE_ENV+= ac_cv_path_PGSQL_CONFIG="" |
| 132 |
@${ECHO_MSG} "" |
155 |
.if defined(PKGNAMESUFFIX) |
| 133 |
.if defined(APR_UTIL_WITHOUT_BERKELEY_DB) |
156 |
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-pgsql |
| 134 |
@${ECHO_MSG} "Berkeley DB support is disabled." |
|
|
| 135 |
.elif defined(APR_UTIL_WITH_BERKELEY_DB) |
| 136 |
@${ECHO_MSG} "Berkeley DB support forced." |
| 137 |
.elif exists(${LOCALBASE}/lib/libdb-4.2.so.2) |
| 138 |
@${ECHO_MSG} "Berkeley db4.2 support is enabled." |
| 139 |
@${ECHO_MSG} "You can disable Berkeley db4.2 support by defining APR_UTIL_WITHOUT_BERKELEY_DB." |
| 140 |
.else |
157 |
.else |
| 141 |
@${ECHO_MSG} "Berkeley DB was not found." |
158 |
PKGNAMESUFFIX= -pgsql |
| 142 |
@${ECHO_MSG} "You can force Berkeley DB support by defining APR_UTIL_WITH_BERKELEY_DB." |
159 |
.endif |
|
|
160 |
.else |
| 161 |
PLIST_SUB+= PGSQL="@comment " |
| 143 |
.endif |
162 |
.endif |
| 144 |
@${ECHO_MSG} "" |
|
|
| 145 |
|
163 |
|
| 146 |
post-patch: |
164 |
post-patch: |
| 147 |
${REINPLACE_CMD} -e 's/OSVERSION/'${OSVERSION}'/g' \ |
165 |
${REINPLACE_CMD} -e 's/OSVERSION/'${OSVERSION}'/g' \ |
| 148 |
${WRKDIR}/apr-${APR_VERSION}/build/apr_hints.m4 |
166 |
${APR_WRKDIR}/build/apr_hints.m4 |
| 149 |
${FIND} ${WRKDIR} -name "Makefile.in*" | ${XARGS} ${REINPLACE_CMD} -e \ |
167 |
${FIND} ${WRKDIR} -name "Makefile.in*" | ${XARGS} ${REINPLACE_CMD} -e \ |
| 150 |
's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' |
168 |
's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' |
| 151 |
|
169 |
|
| 152 |
run-autotools:: |
170 |
run-autotools:: |
| 153 |
cd ${WRKDIR}/apr-${APR_VERSION} ; \ |
171 |
cd ${APR_WRKDIR} ; \ |
| 154 |
${SETENV} ${CONFIGURE_ENV} ${SH} ./buildconf |
172 |
${SETENV} ${CONFIGURE_ENV} ${SH} ./buildconf |
| 155 |
cd ${WRKDIR}/apr-util-${APU_VERSION} ; \ |
173 |
cd ${APU_WRKDIR} ; \ |
| 156 |
${RM} -fr xml/expat |
174 |
${RM} -fr xml/expat |
| 157 |
cd ${WRKDIR}/apr-util-${APU_VERSION} ; \ |
175 |
cd ${APU_WRKDIR} ; \ |
| 158 |
${SETENV} ${CONFIGURE_ENV} ${SH} ./buildconf \ |
176 |
${SETENV} ${CONFIGURE_ENV} ${SH} ./buildconf \ |
| 159 |
--with-apr=../apr-${APR_VERSION} |
177 |
--with-apr=${APR_WRKDIR} |
| 160 |
cd ${WRKDIR}/apr-${APR_VERSION}; \ |
178 |
cd ${APR_WRKDIR}; \ |
| 161 |
${SETENV} ${CONFIGURE_ENV} ${SH} ./configure ${CONFIGURE_ARGS} |
179 |
${SETENV} ${CONFIGURE_ENV} ${SH} \ |
| 162 |
cd ${WRKDIR}/apr-util-${APU_VERSION}; \ |
180 |
./configure ${CONFIGURE_ARGS} ${APR_CONF_ARGS} |
|
|
181 |
cd ${APU_WRKDIR}; \ |
| 163 |
${SETENV} ${CONFIGURE_ENV} ${SH} \ |
182 |
${SETENV} ${CONFIGURE_ENV} ${SH} \ |
| 164 |
./configure ${CONFIGURE_ARGS} ${APR_UTIL_CONF_ARGS} |
183 |
./configure ${CONFIGURE_ARGS} ${APU_CONF_ARGS} |
| 165 |
|
184 |
|
| 166 |
do-configure: |
185 |
do-configure: |
| 167 |
${DO_NADA} |
186 |
${DO_NADA} |
| 168 |
|
187 |
|
| 169 |
do-build: |
188 |
do-build: |
| 170 |
cd ${WRKDIR}/apr-${APR_VERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE} |
189 |
cd ${APR_WRKDIR}; ${SETENV} ${MAKE_ENV} ${MAKE} |
| 171 |
cd ${WRKDIR}/apr-util-${APU_VERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE} |
190 |
cd ${APU_WRKDIR}; ${SETENV} ${MAKE_ENV} ${MAKE} |
| 172 |
|
191 |
|
| 173 |
do-install: |
192 |
do-install: |
| 174 |
cd ${WRKDIR}/apr-${APR_VERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${INSTALL_TARGET} |
193 |
cd ${APR_WRKDIR}; ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET} |
| 175 |
cd ${WRKDIR}/apr-util-${APU_VERSION}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${INSTALL_TARGET} |
194 |
cd ${APU_WRKDIR}; ${SETENV} ${MAKE_ENV} ${MAKE} ${INSTALL_TARGET} |
| 176 |
|
195 |
|
| 177 |
debug_autoconf: |
196 |
debug_autoconf: |
| 178 |
@echo "LIBTOOL: ${LIBTOOL_VERSION}" |
197 |
@${ECHO} "LIBTOOL: ${LIBTOOL_VERSION}" |
| 179 |
@echo "AUTOCONF: dev ${dev_acver} cur ${cur_acver} use ${use_acver}" |
198 |
@${ECHO} "AUTOCONF: dev ${dev_acver} cur ${cur_acver} use ${use_acver}" |
| 180 |
@echo "AUTOMAKE: dev ${dev_amver} cur ${cur_amver} use ${use_amver}" |
199 |
@${ECHO} "AUTOMAKE: dev ${dev_amver} cur ${cur_amver} use ${use_amver}" |
| 181 |
@echo "AUTOCONF_DIR: ${AUTOCONF_DIR}" |
200 |
@${ECHO} "AUTOCONF_DIR: ${AUTOCONF_DIR}" |
| 182 |
@echo "BUILD_DEPENDS: ${BUILD_DEPENDS}" |
201 |
@${ECHO} "BUILD_DEPENDS: ${BUILD_DEPENDS}" |
| 183 |
@echo "ACLOCAL_DIR: ${ACLOCAL_DIR}" |
202 |
@${ECHO} "ACLOCAL_DIR: ${ACLOCAL_DIR}" |
| 184 |
@echo "LIBTOOLFILES: ${LIBTOOLFILES}" |
203 |
@${ECHO} "LIBTOOLFILES: ${LIBTOOLFILES}" |
| 185 |
@echo "LIBTOOL_SHAREDIR: ${LIBTOOL_SHAREDIR}" |
204 |
@${ECHO} "LIBTOOL_SHAREDIR: ${LIBTOOL_SHAREDIR}" |
| 186 |
@echo "LIBTOOL_LIBEXECDIR: ${LIBTOOL_LIBEXECDIR}" |
205 |
@${ECHO} "LIBTOOL_LIBEXECDIR: ${LIBTOOL_LIBEXECDIR}" |
| 187 |
@echo "LIBTOOL_M4: ${LIBTOOL_M4}" |
206 |
@${ECHO} "LIBTOOL_M4: ${LIBTOOL_M4}" |
|
|
207 |
@${ECHO} "${SETENV} ${CONFIGURE_ENV} ${SH} ./configure ${CONFIGURE_ARGS} ${APR_CONF_ARGS}" |
| 208 |
@${ECHO} "${SETENV} ${CONFIGURE_ENV} ${SH} ./configure ${CONFIGURE_ARGS} ${APR_UTIL_CONF_ARGS}" |
| 188 |
|
209 |
|
| 189 |
.include <bsd.port.post.mk> |
210 |
.include <bsd.port.post.mk> |