source: packages/libs/apr/Makefile @ 27418

Last change on this file since 27418 was 27418, checked in by swalker, 5 years ago

[packages] apr: update to 1.4.5 (CVE-2011-0419, CVE-2011-1928), refresh patches

File size: 2.3 KB
Line 
1#
2# Copyright (C) 2007-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=apr
11PKG_VERSION:=1.4.5
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=http://www.ibiblio.org/pub/mirrors/apache/apr
16PKG_MD5SUM:=8b53f5a5669d0597f2da889a2f576eb6
17
18PKG_FIXUP:=autoreconf
19PKG_REMOVE_FILES:=aclocal.m4 build/ltmain.sh
20
21PKG_INSTALL:=1
22
23include $(INCLUDE_DIR)/package.mk
24
25define Package/libapr
26  SECTION:=libs
27  CATEGORY:=Libraries
28  DEPENDS:=+libpthread +librt
29  TITLE:=Apache Portable Runtime Library
30  URL:=http://apr.apache.org/
31endef
32
33TARGET_CFLAGS += $(FPIC)
34CONFIGURE_ARGS += \
35        --with-devrandom=/dev/urandom \
36        --disable-dso \
37        --enable-ipv6
38
39# XXX: ac_cv_sizeof_struct_iovec=1 is just to trick configure
40CONFIGURE_VARS += \
41        ac_cv_sizeof_struct_iovec=1 \
42        apr_cv_process_shared_works=no \
43        apr_cv_mutex_robust_shared=no \
44        apr_cv_tcp_nodelay_with_cork=yes \
45        LDFLAGS="$$$$LDFLAGS -lpthread" \
46
47define Build/InstallDev
48        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1 $(1)/usr/lib $(1)/usr/lib/pkgconfig $(1)/usr/share/build-1
49        $(CP)   $(PKG_INSTALL_DIR)/usr/bin/apr-1-config \
50                $(1)/usr/bin/
51        $(CP)   $(PKG_INSTALL_DIR)/usr/include/apr-1/* \
52                $(1)/usr/include/apr-1/
53        $(CP)   $(PKG_INSTALL_DIR)/usr/lib/libapr-1.{la,a,so*} \
54                $(1)/usr/lib/
55        $(CP)   $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-1.pc \
56                $(1)/usr/lib/pkgconfig/
57        $(CP)   $(PKG_INSTALL_DIR)/usr/share/build-1/* \
58                $(1)/usr/share/build-1/
59        $(SED) 's,^datadir=\"/usr/share\",datadir=\"$(STAGING_DIR)/usr/share\",g' $(1)/usr/bin/apr-1-config
60        $(SED) 's,^installbuilddir=\"/usr/share/build-1\",installbuilddir=\"$(STAGING_DIR)/usr/share/build-1\",g' $(1)/usr/bin/apr-1-config
61        $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/apr-1-config
62        $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/apr-1-config
63        $(SED) 's,-L$$$$libdir,,g' $(1)/usr/bin/apr-1-config
64        $(SED) 's,-R$$$$libdir,,g' $(1)/usr/bin/apr-1-config
65        $(SED) 's,/usr/share/build-1,$(STAGING_DIR)/usr/share/build-1,g' $(1)/usr/share/build-1/apr_rules.mk
66endef
67
68define Package/libapr/install
69        $(INSTALL_DIR) $(1)/usr/lib
70        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.so.* $(1)/usr/lib/
71endef
72
73$(eval $(call BuildPackage,libapr))
Note: See TracBrowser for help on using the repository browser.