summaryrefslogtreecommitdiff
path: root/package/apr/Makefile
blob: 8dbddd98b60792cf8760eeee06a96ca6e8c41d47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# $Id$
#-
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include ${TOPDIR}/rules.mk

PKG_NAME:=		apr
PKG_VERSION:=		0.9.17
PKG_RELEASE:=		1
PKG_MD5SUM:=		ca1e22d98081a03a33c2a0b8684eb192
MASTER_SITES:=		http://gd.tuwien.ac.at/infosys/servers/http/apache/dist/${PKG_NAME}/

include ${TOPDIR}/mk/package.mk

$(eval $(call PKG_template,APR,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE}))

CONFIGURE_STYLE:=	gnu
CONFIGURE_ENV+=		ac_cv_func_setpgrp_void=no
CONFIGURE_ENV+=		ac_cv_sizeof_size_t=4
CONFIGURE_ENV+=		ac_cv_sizeof_ssize_t=4
CONFIGURE_ENV+=		ac_cv_file__dev_zero=yes
CONFIGURE_ENV+=		apr_cv_process_shared_works=no
CONFIGURE_ARGS+=	--with-devrandom=/dev/urandom

ifeq (${ADK_PACKAGE_APR_THREADING},y)
CONFIGURE_ARGS+=	--enable-threads
else
CONFIGURE_ARGS+=	--disable-threads
endif

BUILD_STYLE:=		auto
INSTALL_STYLE:=		auto

post-install:
	${INSTALL_DIR} ${IDIR_APR}/usr/lib
	${CP} ${WRKINST}/usr/lib/libapr-0.so* ${IDIR_APR}/usr/lib/

	${INSTALL_DIR} ${STAGING_DIR}/usr/share/build
	${CP} ${WRKINST}/usr/share/build/* ${STAGING_DIR}/usr/share/build/

	# we need to patch paths to get apr-util compiling
	printf '%s\n%s\n%s\n%s\n%s\nwq\n' \
	    '/^installbuilddir="/s##&${STAGING_DIR}/#' \
	    '/^libdir="/s##&${STAGING_DIR}/#' \
	    '/^datadir="/s##&${STAGING_DIR}/#' \
	    '/^includedir="/s##&${STAGING_DIR}/#' \
	    '/^bindir="/s##&${STAGING_DIR}/#' | \
	    ed -s ${WRKINST}/usr/bin/apr-config
ifeq (${ADK_PACKAGE_APR_THREADING},y)
	echo 'Depends: libpthread' >> ${IDIR_APR}/CONTROL/control
endif

include ${TOPDIR}/mk/pkg-bottom.mk