2 # Copyright (C) 2007-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=@APACHE
/apr
/
16 PKG_HASH
:=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
18 PKG_MAINTAINER
:=Thomas Heil
<heil@terminal-consulting.de
>, \
19 Sebastian Kemper
<sebastian_ml@gmx.net
>
21 PKG_LICENSE
:=Apache-2.0
22 PKG_LICENSE_FILES
:=LICENSE
24 PKG_CPE_ID
:=cpe
:/a
:apache
:apr
32 include $(INCLUDE_DIR
)/package.mk
37 DEPENDS
:=+libpthread
+librt
+libuuid
38 TITLE
:=Apache Portable Runtime Library
39 URL
:=https
://apr.apache.org
/
43 --with-devrandom
=/dev
/urandom \
44 $(call autoconf_bool
,CONFIG_IPV6
,ipv6
)
46 # XXX: ac_cv_sizeof_struct_iovec=1 is just to trick configure
47 # XXX: don't set apr_cv_use_lfs64=yes, see
48 # https://www.openwall.com/lists/musl/2020/02/03/18
49 # XXX: the atomic builtins used require 8-byte intrinsics, which are available
50 # on all 64-bit architectures and some arm as well as x86 32-bit platforms
52 ap_cv_atomic_builtins
=$(if
$(CONFIG_ARCH_64BIT
),yes
,no
) \
53 ac_cv_file__dev_zero
=yes \
54 ac_cv_func_pthread_mutexattr_setpshared
=yes \
55 ac_cv_func_sem_open
=yes \
56 ac_cv_func_setpgrp_void
=yes \
57 ac_cv_mmap__dev_zero
=yes \
58 ac_cv_negative_eai
=yes \
59 ac_cv_o_nonblock_inherited
=no \
60 ac_cv_sizeof_struct_iovec
=1 \
61 ac_cv_struct_rlimit
=yes \
65 apr_cv_epoll_create1
=yes \
66 apr_cv_gai_addrconfig
=yes \
67 apr_cv_mutex_recursive
=yes \
68 apr_cv_mutex_robust_shared
=yes \
69 apr_cv_process_shared_works
=yes \
70 apr_cv_pthreads_lib
=-lpthread \
71 apr_cv_sock_cloexec
=yes \
72 apr_cv_tcp_nodelay_with_cork
=yes
74 ifeq ($(call qstrip
,$(CONFIG_LIBC
)),musl
)
76 ac_cv_strerror_r_rc_int
=yes
79 define Build
/InstallDev
80 $(INSTALL_DIR
) $(1)/usr
/bin
$(1)/usr
/include/apr-1 \
81 $(1)/usr
/lib
/pkgconfig
$(1)/usr
/share
/build-1
82 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/apr-1-config \
84 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/include/apr-1
/* \
85 $(1)/usr
/include/apr-1
86 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libapr-1.
{a
,so
*} $(1)/usr
/lib
87 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/apr-1.
pc \
88 $(1)/usr
/lib
/pkgconfig
89 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/build-1
/* $(1)/usr
/share
/build-1
90 $(SED
) '/^prefix=\|^exec_prefix=/s|/usr|$(STAGING_DIR)/usr|' \
91 $(1)/usr
/bin
/apr-1-config
92 $(SED
) '/^datadir=/s|/usr|$$$${prefix}|' $(1)/usr
/bin
/apr-1-config
93 $(SED
) 's,/usr/share/build-1,$(STAGING_DIR)/usr/share/build-1,g' \
94 $(1)/usr
/share
/build-1
/apr_rules.mk
97 define Package
/libapr
/install
98 $(INSTALL_DIR
) $(1)/usr
/lib
99 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libapr-1.so.
* $(1)/usr
/lib
102 $(eval
$(call BuildPackage
,libapr
))