]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/apr/apr.mk
apr: security bump to version 1.6.3
[coffee/buildroot.git] / package / apr / apr.mk
1 ################################################################################
2 #
3 # apr
4 #
5 ################################################################################
6
7 APR_VERSION = 1.6.3
8 APR_SOURCE = apr-$(APR_VERSION).tar.bz2
9 APR_SITE = http://archive.apache.org/dist/apr
10 APR_LICENSE = Apache-2.0
11 APR_LICENSE_FILES = LICENSE
12 APR_INSTALL_STAGING = YES
13 # We have a patch touching configure.in and Makefile.in,
14 # so we need to autoreconf:
15 APR_AUTORECONF = YES
16
17 APR_CONF_ENV = \
18         CC_FOR_BUILD="$(HOSTCC)" \
19         CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
20         ac_cv_file__dev_zero=yes \
21         ac_cv_func_setpgrp_void=yes \
22         apr_cv_process_shared_works=yes \
23         apr_cv_mutex_robust_shared=no \
24         apr_cv_tcp_nodelay_with_cork=yes \
25         ac_cv_sizeof_struct_iovec=8 \
26         ac_cv_sizeof_pid_t=4 \
27         ac_cv_struct_rlimit=yes \
28         ac_cv_o_nonblock_inherited=no \
29         apr_cv_mutex_recursive=yes
30 APR_CONFIG_SCRIPTS = apr-1-config
31
32 # Doesn't even try to guess when cross compiling
33 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
34 APR_CONF_ENV += apr_cv_pthreads_lib="-lpthread"
35 endif
36
37 # Fix lfs detection when cross compiling
38 APR_CONF_ENV += apr_cv_use_lfs64=yes
39
40 # Use non-portable atomics when available: 8 bytes atomics are used on
41 # 64-bits architectures, 4 bytes atomics on 32-bits architectures. We
42 # have to override ap_cv_atomic_builtins because the test used to
43 # check for atomic builtins uses AC_TRY_RUN, which doesn't work when
44 # cross-compiling.
45 ifeq ($(BR2_ARCH_IS_64):$(BR2_TOOLCHAIN_HAS_SYNC_8),y:y)
46 APR_CONF_OPTS += --enable-nonportable-atomics
47 APR_CONF_ENV += ap_cv_atomic_builtins=yes
48 else ifeq ($(BR2_ARCH_IS_64):$(BR2_TOOLCHAIN_HAS_SYNC_4),:y)
49 APR_CONF_OPTS += --enable-nonportable-atomics
50 APR_CONF_ENV += ap_cv_atomic_builtins=yes
51 else
52 APR_CONF_OPTS += --disable-nonportable-atomics
53 endif
54
55 ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
56 APR_DEPENDENCIES += util-linux
57 endif
58
59 define APR_CLEANUP_UNNEEDED_FILES
60         $(RM) -rf $(TARGET_DIR)/usr/build-1/
61 endef
62
63 APR_POST_INSTALL_TARGET_HOOKS += APR_CLEANUP_UNNEEDED_FILES
64
65 define APR_FIXUP_RULES_MK
66         $(SED) 's%apr_builddir=%apr_builddir=$(STAGING_DIR)%' \
67                 $(STAGING_DIR)/usr/build-1/apr_rules.mk
68         $(SED) 's%apr_builders=%apr_builders=$(STAGING_DIR)%' \
69                 $(STAGING_DIR)/usr/build-1/apr_rules.mk
70         $(SED) 's%top_builddir=%top_builddir=$(STAGING_DIR)%' \
71                 $(STAGING_DIR)/usr/build-1/apr_rules.mk
72 endef
73
74 APR_POST_INSTALL_STAGING_HOOKS += APR_FIXUP_RULES_MK
75
76 $(eval $(autotools-package))