2007-05-17 20:41:56 +00:00
|
|
|
#
|
2008-04-13 18:20:42 +00:00
|
|
|
# Copyright (C) 2007-2008 OpenWrt.org
|
2007-05-17 20:41:56 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2007-07-01 21:54:25 +00:00
|
|
|
# $Id$
|
2007-05-17 20:41:56 +00:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=apr
|
2007-07-02 10:59:50 +00:00
|
|
|
PKG_VERSION:=1.2.9
|
2007-05-17 20:41:56 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=http://apache.d-s-s-p.de/apr/
|
2007-07-02 10:59:50 +00:00
|
|
|
PKG_MD5SUM:=6f4b063ac01a54ba0818c31280f06959
|
2007-05-17 20:41:56 +00:00
|
|
|
|
2007-12-27 02:12:04 +00:00
|
|
|
PKG_FIXUP = libtool
|
|
|
|
|
2007-05-17 20:41:56 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2007-10-10 15:14:54 +00:00
|
|
|
define Package/libapr
|
2007-05-17 20:41:56 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
DEPENDS:=+libpthread
|
|
|
|
TITLE:=Apache Portable Runtime Library
|
|
|
|
URL:=http://apr.apache.org/
|
|
|
|
endef
|
|
|
|
|
2008-08-06 22:43:15 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC)
|
2007-07-31 10:23:55 +00:00
|
|
|
CONFIGURE_ARGS += \
|
2007-10-10 15:14:54 +00:00
|
|
|
--with-devrandom=/dev/urandom \
|
|
|
|
--disable-dso \
|
2007-12-30 02:41:28 +00:00
|
|
|
--enable-ipv6
|
2007-07-31 10:23:55 +00:00
|
|
|
|
|
|
|
CONFIGURE_VARS += \
|
2007-10-10 15:14:54 +00:00
|
|
|
apr_cv_process_shared_works=no \
|
|
|
|
apr_cv_mutex_robust_shared=no \
|
|
|
|
apr_cv_tcp_nodelay_with_cork=yes \
|
|
|
|
LDFLAGS="$$$$LDFLAGS -lpthread" \
|
|
|
|
|
|
|
|
define Build/Compile
|
2007-12-27 02:12:04 +00:00
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
|
2007-10-10 15:14:54 +00:00
|
|
|
endef
|
2007-05-17 20:41:56 +00:00
|
|
|
|
|
|
|
define Build/InstallDev
|
2008-04-13 18:20:42 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1 $(1)/usr/lib $(1)/usr/lib/pkgconfig $(1)/usr/share/build-1
|
2007-07-01 21:54:25 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/apr-1-config \
|
2008-04-13 18:20:42 +00:00
|
|
|
$(1)/usr/bin/
|
2007-10-10 15:14:54 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/apr-1/* \
|
|
|
|
$(1)/usr/include/apr-1/
|
2007-12-23 21:35:37 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.{la,a,so*} \
|
2007-10-07 03:20:26 +00:00
|
|
|
$(1)/usr/lib/
|
2007-10-10 15:14:54 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-1.pc \
|
|
|
|
$(1)/usr/lib/pkgconfig/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/build-1/* \
|
|
|
|
$(1)/usr/share/build-1/
|
2008-04-13 18:20:42 +00:00
|
|
|
$(SED) 's,^datadir=\"/usr/share\",datadir=\"$(STAGING_DIR)/usr/share\",g' $(1)/usr/bin/apr-1-config
|
|
|
|
$(SED) 's,^installbuilddir=\"/usr/share/build-1\",installbuilddir=\"$(STAGING_DIR)/usr/share/build-1\",g' $(1)/usr/bin/apr-1-config
|
|
|
|
$(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/apr-1-config
|
|
|
|
$(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/apr-1-config
|
|
|
|
$(SED) 's,-L$$$$libdir,,g' $(1)/usr/bin/apr-1-config
|
|
|
|
$(SED) 's,-R$$$$libdir,,g' $(1)/usr/bin/apr-1-config
|
2007-12-27 02:12:26 +00:00
|
|
|
$(SED) 's,/usr/share/build-1,$(STAGING_DIR)/usr/share/build-1,g' $(1)/usr/share/build-1/apr_rules.mk
|
2007-05-17 20:41:56 +00:00
|
|
|
endef
|
|
|
|
|
2007-10-10 15:14:54 +00:00
|
|
|
define Package/libapr/install
|
2007-05-17 20:41:56 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2007-10-10 15:14:54 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.so.* $(1)/usr/lib/
|
2007-05-17 20:41:56 +00:00
|
|
|
endef
|
|
|
|
|
2007-10-10 15:14:54 +00:00
|
|
|
$(eval $(call BuildPackage,libapr))
|