aboutsummaryrefslogtreecommitdiff
path: root/package/poco/poco.mk
blob: ddb5b258e86f2a80f432388d5b391f26eabd9f04 (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
55
56
57
58
#############################################################
#
# poco
#
#############################################################
POCO_VERSION = 1.4.3p1
POCO_SOURCE = poco-$(POCO_VERSION)-all.tar.gz
POCO_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/poco
POCO_INSTALL_STAGING = YES

POCO_DEPENDENCIES = zlib pcre					\
	$(if $(BR2_PACKAGE_POCO_XML),expat)			\
	$(if $(BR2_PACKAGE_POCO_CRYPTO),openssl)		\
	$(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),openssl)	\
	$(if $(BR2_PACKAGE_POCO_DATA_SQLITE),sqlite)		\
	$(if $(BR2_PACKAGE_POCO_DATA_MYSQL),mysql_client)

POCO_OMIT = Data/ODBC PageCompiler					\
	$(if $(BR2_PACKAGE_POCO_XML),,XML)				\
	$(if $(BR2_PACKAGE_POCO_UTIL),,Util)				\
	$(if $(BR2_PACKAGE_POCO_NET),,Net)				\
	$(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),,NetSSL_OpenSSL)	\
	$(if $(BR2_PACKAGE_POCO_CRYPTO),,Crypto)			\
	$(if $(BR2_PACKAGE_POCO_ZIP),,Zip)				\
	$(if $(BR2_PACKAGE_POCO_DATA),,Data)				\
	$(if $(BR2_PACKAGE_POCO_DATA_MYSQL),,Data/MySQL)		\
	$(if $(BR2_PACKAGE_POCO_DATA_SQLITE),,Data/SQLite)

ifeq ($(LIBC),uclibc)
POCO_CONF_OPT += --no-fpenvironment --no-wstring
endif

define POCO_CONFIGURE_CMDS
	(cd $(@D); ./configure \
		--config=Linux-CrossEnv	\
		--prefix=/usr		\
		--omit="$(POCO_OMIT)"	\
		$(POCO_CONF_OPT)	\
		--unbundled		\
		--no-tests		\
		--no-samples)
endef

define POCO_BUILD_CMDS
	$(MAKE) POCO_TARGET_OSARCH=$(ARCH) CROSSENV=$(TARGET_CROSS) \
		MYSQL_LIBDIR=$(STAGING_DIR)/usr/lib/mysql \
		MYSQL_INCDIR=$(STAGING_DIR)/usr/include/mysql -C $(@D)
endef

define POCO_INSTALL_STAGING_CMDS
	$(MAKE) DESTDIR=$(STAGING_DIR) POCO_TARGET_OSARCH=$(ARCH) install -C $(@D)
endef

define POCO_INSTALL_TARGET_CMDS
	$(MAKE) DESTDIR=$(TARGET_DIR) POCO_TARGET_OSARCH=$(ARCH) install -C $(@D)
endef

$(eval $(call GENTARGETS))