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.

85 lines
2.7 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:=3
  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-2.0
  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:=https://apr.apache.org/
  26. endef
  27. TARGET_CFLAGS += $(FPIC)
  28. CONFIGURE_ARGS += \
  29. --without-pic \
  30. --with-devrandom=/dev/urandom \
  31. $(call autoconf_bool,CONFIG_IPV6,ipv6)
  32. # XXX: ac_cv_sizeof_struct_iovec=1 is just to trick configure
  33. CONFIGURE_VARS += \
  34. ac_cv_sizeof_struct_iovec=1 \
  35. ac_cv_struct_rlimit=yes \
  36. ac_cv_func_sem_open=yes \
  37. ac_cv_func_pthread_mutexattr_setpshared=yes \
  38. apr_cv_mutex_robust_shared=yes \
  39. apr_cv_tcp_nodelay_with_cork=yes \
  40. apr_cv_sock_cloexec=yes \
  41. apr_cv_process_shared_works=yes \
  42. apr_cv_mutex_recursive=yes \
  43. apr_cv_epoll_create1=yes \
  44. apr_cv_epoll=yes \
  45. apr_cv_dup3=yes \
  46. apr_cv_accept4=yes
  47. define 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
  66. endef
  67. define Package/libapr/install
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.so.* $(1)/usr/lib/
  70. endef
  71. $(eval $(call BuildPackage,libapr))