2 # Copyright (C) 2007-2009 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
:=http
://www.ibiblio.org
/pub
/mirrors
/apache
/apr
16 PKG_MD5SUM
:=7138ac64d4458eeeaa9b9aefa4e6e51b
21 include $(INCLUDE_DIR
)/package.mk
27 TITLE
:=Apache Portable Runtime Library
28 URL
:=http
://apr.apache.org
/
31 TARGET_CFLAGS
+= $(FPIC
)
33 --with-devrandom
=/dev
/urandom \
37 # XXX: ac_cv_sizeof_struct_iovec=1 is just to trick configure
39 ac_cv_sizeof_struct_iovec
=1 \
40 apr_cv_process_shared_works
=no \
41 apr_cv_mutex_robust_shared
=no \
42 apr_cv_tcp_nodelay_with_cork
=yes \
43 LDFLAGS
="$$$$LDFLAGS -lpthread" \
45 define Build
/InstallDev
46 $(INSTALL_DIR
) $(1)/usr
/bin
$(1)/usr
/include/apr-1
$(1)/usr
/lib
$(1)/usr
/lib
/pkgconfig
$(1)/usr
/share
/build-1
47 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/apr-1-config \
49 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/apr-1
/* \
50 $(1)/usr
/include/apr-1
/
51 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libapr-1.
{la
,a
,so
*} \
53 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/apr-1.
pc \
54 $(1)/usr
/lib
/pkgconfig
/
55 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/build-1
/* \
56 $(1)/usr
/share
/build-1
/
57 $(SED
) 's,^datadir=\"/usr/share\",datadir=\"$(STAGING_DIR)/usr/share\",g' $(1)/usr
/bin
/apr-1-config
58 $(SED
) 's,^installbuilddir=\"/usr/share/build-1\",installbuilddir=\"$(STAGING_DIR)/usr/share/build-1\",g' $(1)/usr
/bin
/apr-1-config
59 $(SED
) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr
/bin
/apr-1-config
60 $(SED
) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr
/bin
/apr-1-config
61 $(SED
) 's,-L$$$$libdir,,g' $(1)/usr
/bin
/apr-1-config
62 $(SED
) 's,-R$$$$libdir,,g' $(1)/usr
/bin
/apr-1-config
63 $(SED
) 's,/usr/share/build-1,$(STAGING_DIR)/usr/share/build-1,g' $(1)/usr
/share
/build-1
/apr_rules.mk
66 define Package
/libapr
/install
67 $(INSTALL_DIR
) $(1)/usr
/lib
68 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libapr-1.so.
* $(1)/usr
/lib
/
71 $(eval
$(call BuildPackage
,libapr
))