2 # Copyright (C) 2007-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=@APACHE
/apr
/
16 PKG_HASH
:=a41076e3710746326c3945042994ad9a4fcac0ce0277dd8fea076fec3c9772b5
17 PKG_MAINTAINER
:=Thomas Heil
<heil@terminal-consulting.de
>
19 PKG_LICENSE
:=Apache-2.0
20 PKG_LICENSE_FILES
:=LICENSE
22 PKG_CPE_ID
:=cpe
:/a
:apache
:apr-util
24 PKG_CONFIG_DEPENDS
:= \
25 CONFIG_PACKAGE_libaprutil-crypto-openssl \
26 CONFIG_PACKAGE_libaprutil-dbd-mysql \
27 CONFIG_PACKAGE_libaprutil-dbd-odbc \
28 CONFIG_PACKAGE_libaprutil-dbd-pgsql \
29 CONFIG_PACKAGE_libaprutil-dbd-sqlite3 \
30 CONFIG_PACKAGE_libaprutil-dbm-gdbm \
31 CONFIG_PACKAGE_libaprutil-ldap
37 include $(INCLUDE_DIR
)/package.mk
38 include $(INCLUDE_DIR
)/nls.mk
40 define Package
/libaprutil
/Default
43 URL
:=http
://apr.apache.org
/
46 define Package
/libaprutil
47 $(call Package
/libaprutil
/Default
)
48 DEPENDS
:=+libapr
+libexpat
+libuuid
$(ICONV_DEPENDS
)
49 TITLE
:=Apache Portable Runtime Utility Library
52 ## Prevent apu-iconv.m4 to append "/lib" to LDFLAGS if ICONV_PREFIX is empty
53 ifeq ($(ICONV_PREFIX
),)
58 --with-apr
="$(STAGING_DIR)/usr/bin/apr-1-config" \
59 --with-expat
="$(STAGING_DIR)/usr" \
60 --with-iconv
="$(ICONV_PREFIX)" \
63 ifneq ($(CONFIG_PACKAGE_libaprutil-crypto-openssl
),)
64 CONFIGURE_ARGS
+= --with-crypto
--with-openssl
="$(STAGING_DIR)/usr"
66 CONFIGURE_ARGS
+= --without-crypto
69 ifneq ($(CONFIG_PACKAGE_libaprutil-dbd-mysql
),)
70 CONFIGURE_ARGS
+= --with-mysql
="$(STAGING_DIR)/usr"
72 CONFIGURE_ARGS
+= --without-mysql
75 ifneq ($(CONFIG_PACKAGE_libaprutil-dbd-odbc
),)
76 CONFIGURE_ARGS
+= --with-odbc
="$(STAGING_DIR)/usr"
78 CONFIGURE_ARGS
+= --without-odbc
81 ifneq ($(CONFIG_PACKAGE_libaprutil-dbd-pgsql
),)
82 CONFIGURE_ARGS
+= --with-pgsql
="$(STAGING_DIR)/usr"
84 CONFIGURE_ARGS
+= --without-pgsql
87 ifneq ($(CONFIG_PACKAGE_libaprutil-dbd-sqlite3
),)
88 CONFIGURE_ARGS
+= --with-sqlite3
="$(STAGING_DIR)/usr"
90 CONFIGURE_ARGS
+= --without-sqlite3
93 ifneq ($(CONFIG_PACKAGE_libaprutil-dbm-gdbm
),)
94 CONFIGURE_ARGS
+= --with-gdbm
="$(STAGING_DIR)/usr"
96 CONFIGURE_ARGS
+= --without-gdbm
99 ifneq ($(CONFIG_PACKAGE_libaprutil-ldap
),)
102 --with-ldap-include
="$(STAGING_DIR)/usr/include" \
103 --with-ldap-lib
="$(STAGING_DIR)/usr/lib"
110 ac_cv_path_ODBC_CONFIG
= \
111 apu_cv_weak_symbols
=yes \
112 APR_BUILD_DIR
="$(STAGING_DIR)/usr/share/build-1"
114 ifeq ($(CONFIG_USE_GLIBC
)$(CONFIG_USE_MUSL
),y
)
116 apu_cv_explicit_bzero
=yes
119 define Package
/libaprutil
/install/driver
120 $(INSTALL_DIR
) $(1)/usr
/lib
/apr-util-1
121 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/apr-util-1
/apr_
$(2)*.so \
122 $(1)/usr
/lib
/apr-util-1
125 define Package
/libaprutil
/Driver
126 define Package
/libaprutil-
$(subst _
,-,$(1))
127 $(call Package
/libaprutil
/Default
)
128 TITLE
:=libaprutil
- $(2) driver
129 DEPENDS
:=libaprutil
$(patsubst +%,+PACKAGE_libaprutil-
$(subst _
,-,$(1)):%,$(3))
131 define Package
/libaprutil-
$(subst _
,-,$(1))/install
132 $(foreach d
,$(1),$(call Package
/libaprutil
/install/driver
,$$(1),$(d
));)
134 $$(eval
$$(call BuildPackage
,libaprutil-
$(subst _
,-,$(1))))
137 # PKG_CONFIG_DEPENDS trigger configure, but the compile afterward may be
138 # incomplete if the build directory is not cleaned before. This is not a
139 # general observation, yet it is valid for apr-util :/
141 $(call Build
/Compile
/Default
,clean all)
144 define Build
/InstallDev
145 $(INSTALL_DIR
) $(1)/usr
/bin
$(1)/usr
/include/apr-1 \
146 $(1)/usr
/lib
/apr-util-1
$(1)/usr
/lib
/pkgconfig
147 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/apu-1-config
$(1)/usr
/bin
148 $(SED
) '/^prefix=\|^exec_prefix=/s|/usr|$(STAGING_DIR)/usr|' $(1)/usr
/bin
/apu-1-config
149 $(SED
) '/^bindir=/s|/usr|$$$${prefix}|' $(1)/usr
/bin
/apu-1-config
150 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/apr-1
/* $(1)/usr
/include/apr-1
151 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/apr-util-1
/apr_
*.
{a
,so
} \
152 $(1)/usr
/lib
/apr-util-1
2>/dev
/null ||
:
153 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libaprutil-1.
{a
,so
*} \
155 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/apr-util-1.
pc \
156 $(1)/usr
/lib
/pkgconfig
157 $(INSTALL_DIR
) $(2)/bin
158 $(LN
) ..
/..
/usr
/bin
/apu-1-config
$(2)/bin
/apu-1-config
161 define Package
/libaprutil
/install
162 $(INSTALL_DIR
) $(1)/usr
/lib
163 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libaprutil-1.so.
* $(1)/usr
/lib
166 $(eval
$(call BuildPackage
,libaprutil
))
167 $(eval
$(call Package
/libaprutil
/Driver
,crypto_openssl
,OpenSSL
,+libopenssl
))
168 $(eval
$(call Package
/libaprutil
/Driver
,dbd_mysql
,MySQL
,+libmariadb
))
169 $(eval
$(call Package
/libaprutil
/Driver
,dbd_odbc
,ODBC
,+unixodbc
))
170 $(eval
$(call Package
/libaprutil
/Driver
,dbd_pgsql
,PostgreSQL
,+libpq
))
171 $(eval
$(call Package
/libaprutil
/Driver
,dbd_sqlite3
,SQLite3
,+libsqlite3
))
172 $(eval
$(call Package
/libaprutil
/Driver
,dbm_gdbm
,GDBM dbm
,+libgdbm
))
173 $(eval
$(call Package
/libaprutil
/Driver
,ldap
,LDAP
,+libopenldap
))