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.

102 lines
2.9 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.7.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@APACHE/apr/
  13. PKG_HASH:=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
  14. PKG_MAINTAINER:=Thomas Heil <heil@terminal-consulting.de>, \
  15. Sebastian Kemper <sebastian_ml@gmx.net>
  16. PKG_LICENSE:=Apache-2.0
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_CPE_ID:=cpe:/a:apache:apr
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_FIXUP:=autoreconf
  21. PKG_INSTALL:=1
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/libapr
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. DEPENDS:=+libpthread +librt +libuuid
  27. TITLE:=Apache Portable Runtime Library
  28. URL:=https://apr.apache.org/
  29. endef
  30. CONFIGURE_ARGS += \
  31. --with-devrandom=/dev/urandom \
  32. $(call autoconf_bool,CONFIG_IPV6,ipv6)
  33. # XXX: ac_cv_sizeof_struct_iovec=1 is just to trick configure
  34. # XXX: don't set apr_cv_use_lfs64=yes, see
  35. # https://www.openwall.com/lists/musl/2020/02/03/18
  36. # XXX: the atomic builtins used require 8-byte intrinsics, which are available
  37. # on all 64-bit architectures and some arm as well as x86 32-bit platforms
  38. CONFIGURE_VARS += \
  39. ap_cv_atomic_builtins=$(if $(CONFIG_ARCH_64BIT),yes,no) \
  40. ac_cv_file__dev_zero=yes \
  41. ac_cv_func_pthread_mutexattr_setpshared=yes \
  42. ac_cv_func_sem_open=yes \
  43. ac_cv_func_setpgrp_void=yes \
  44. ac_cv_mmap__dev_zero=yes \
  45. ac_cv_negative_eai=yes \
  46. ac_cv_o_nonblock_inherited=no \
  47. ac_cv_sizeof_struct_iovec=1 \
  48. ac_cv_struct_rlimit=yes \
  49. apr_cv_accept4=yes \
  50. apr_cv_dup3=yes \
  51. apr_cv_epoll=yes \
  52. apr_cv_epoll_create1=yes \
  53. apr_cv_gai_addrconfig=yes \
  54. apr_cv_mutex_recursive=yes \
  55. apr_cv_mutex_robust_shared=yes \
  56. apr_cv_process_shared_works=yes \
  57. apr_cv_pthreads_lib=-lpthread \
  58. apr_cv_sock_cloexec=yes \
  59. apr_cv_tcp_nodelay_with_cork=yes
  60. ifeq ($(call qstrip,$(CONFIG_LIBC)),musl)
  61. CONFIGURE_VARS += \
  62. ac_cv_strerror_r_rc_int=yes
  63. endif
  64. define Build/InstallDev
  65. $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1 \
  66. $(1)/usr/lib/pkgconfig $(1)/usr/share/build-1
  67. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/apr-1-config \
  68. $(1)/usr/bin
  69. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/apr-1/* \
  70. $(1)/usr/include/apr-1
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.{a,so*} $(1)/usr/lib
  72. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-1.pc \
  73. $(1)/usr/lib/pkgconfig
  74. $(CP) $(PKG_INSTALL_DIR)/usr/share/build-1/* $(1)/usr/share/build-1
  75. $(SED) '/^prefix=\|^exec_prefix=/s|/usr|$(STAGING_DIR)/usr|' \
  76. $(1)/usr/bin/apr-1-config
  77. $(SED) '/^datadir=/s|/usr|$$$${prefix}|' $(1)/usr/bin/apr-1-config
  78. $(SED) 's,/usr/share/build-1,$(STAGING_DIR)/usr/share/build-1,g' \
  79. $(1)/usr/share/build-1/apr_rules.mk
  80. endef
  81. define Package/libapr/install
  82. $(INSTALL_DIR) $(1)/usr/lib
  83. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libapr-1.so.* $(1)/usr/lib
  84. endef
  85. $(eval $(call BuildPackage,libapr))