You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.6 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=apr
  9. PKG_VERSION:=1.6.5
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@APACHE/apr/
  13. PKG_HASH:=a67ca9fcf9c4ff59bce7f428a323c8b5e18667fdea7b0ebad47d194371b0a105
  14. PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>
  15. PKG_LICENSE:=Apache License
  16. PKG_FIXUP:=autoreconf
  17. PKG_REMOVE_FILES:=aclocal.m4 build/ltmain.sh
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/libapr
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. DEPENDS:=+libpthread +librt +libuuid
  24. TITLE:=Apache Portable Runtime Library
  25. URL:=http://apr.apache.org/
  26. endef
  27. TARGET_CFLAGS += $(FPIC)
  28. TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
  29. CONFIGURE_ARGS += \
  30. --with-devrandom=/dev/urandom \
  31. --disable-dso \
  32. $(call autoconf_bool,CONFIG_IPV6,ipv6)
  33. # XXX: ac_cv_sizeof_struct_iovec=1 is just to trick configure
  34. CONFIGURE_VARS += \
  35. ac_cv_sizeof_struct_iovec=1 \
  36. ac_cv_struct_rlimit=yes \
  37. apr_cv_process_shared_works=no \
  38. apr_cv_mutex_robust_shared=no \
  39. apr_cv_tcp_nodelay_with_cork=yes \
  40. apr_cv_use_lfs64=yes \
  41. LDFLAGS="$$$$LDFLAGS -lpthread" \
  42. define Build/InstallDev
  43. $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1 $(1)/usr/lib $(1)/usr/lib/pkgconfig $(1)/usr/share/build-1
  44. $(CP) $(PKG_INSTALL_DIR)/usr/bin/apr-1-config \
  45. $(1)/usr/bin/
  46. $(CP) $(PKG_INSTALL_DIR)/usr/include/apr-1/* \
  47. $(1)/usr/include/apr-1/
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.{la,a,so*} \
  49. $(1)/usr/lib/
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-1.pc \
  51. $(1)/usr/lib/pkgconfig/
  52. $(CP) $(PKG_INSTALL_DIR)/usr/share/build-1/* \
  53. $(1)/usr/share/build-1/
  54. $(SED) 's,^datadir=\"/usr/share\",datadir=\"$(STAGING_DIR)/usr/share\",g' $(1)/usr/bin/apr-1-config
  55. $(SED) 's,^installbuilddir=\"/usr/share/build-1\",installbuilddir=\"$(STAGING_DIR)/usr/share/build-1\",g' $(1)/usr/bin/apr-1-config
  56. $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/apr-1-config
  57. $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/apr-1-config
  58. $(SED) 's,-L$$$$libdir,,g' $(1)/usr/bin/apr-1-config
  59. $(SED) 's,-R$$$$libdir,,g' $(1)/usr/bin/apr-1-config
  60. $(SED) 's,/usr/share/build-1,$(STAGING_DIR)/usr/share/build-1,g' $(1)/usr/share/build-1/apr_rules.mk
  61. endef
  62. define Package/libapr/install
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.so.* $(1)/usr/lib/
  65. endef
  66. $(eval $(call BuildPackage,libapr))