The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / thrift / thrift.mk
1 ################################################################################
2 #
3 # thrift
4 #
5 ################################################################################
6
7 THRIFT_VERSION = 0.9.2
8 THRIFT_SITE = http://www.us.apache.org/dist/thrift/$(THRIFT_VERSION)
9 THRIFT_DEPENDENCIES = host-autoconf-archive host-pkgconf host-thrift boost \
10         libevent openssl zlib
11 THRIFT_INSTALL_STAGING = YES
12 HOST_THRIFT_DEPENDENCIES = host-autoconf-archive host-bison host-boost \
13         host-flex host-libevent host-openssl host-pkgconf host-zlib
14
15 THRIFT_CONF_OPTS = --with-sysroot=$(STAGING_DIR) \
16         --with-boost \
17         --with-boost-libdir=$(STAGING_DIR)/usr/lib \
18         --disable-tests \
19         --disable-tutorial
20 HOST_THRIFT_CONF_OPTS = --with-sysroot=$(HOST_DIR) \
21         --disable-tests \
22         --disable-tutorial
23 THRIFT_AUTORECONF = YES
24 THRIFT_AUTORECONF_OPTS = -I $(HOST_DIR)/usr/share/autoconf-archive
25 THRIFT_LICENSE = Apache-2.0
26 THRIFT_LICENSE_FILES = LICENSE
27
28 ifeq ($(BR2_STATIC_LIBS),y)
29 # openssl uses zlib, so we need to explicitly link with it when static
30 THRIFT_CONF_ENV += LIBS=-lz
31 endif
32
33 # Language selection
34 # The generator (host tool) works with all of them regardless
35 # This is just for the libraries / bindings
36 THRIFT_LANG_CONF_OPTS += --without-csharp --without-java --without-erlang \
37         --without-python --without-perl --without-php --without-php_extension \
38         --without-ruby --without-haskell --without-go --without-d \
39         --without-qt4 --without-lua
40 HOST_THRIFT_CONF_OPTS += $(THRIFT_LANG_CONF_OPTS) --without-c_glib
41 THRIFT_CONF_OPTS += $(THRIFT_LANG_CONF_OPTS)
42
43 # C bindings
44 ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
45 THRIFT_DEPENDENCIES += libglib2
46 else
47 THRIFT_CONF_OPTS += --without-c_glib
48 endif
49
50 # De-hardcode THRIFT for cross compiling
51 define THRIFT_TOOL_NO_HARDCODE
52         for f in `find $(@D) -name Makefile.am -type f`; do \
53                 $(SED) "/^THRIFT =/d" $$f; \
54         done
55         $(SED) "s:top_builddir)/compiler/cpp/thrift:THRIFT):" $(@D)/tutorial/Makefile.am
56 endef
57
58 THRIFT_POST_PATCH_HOOKS += THRIFT_TOOL_NO_HARDCODE
59
60 define THRIFT_BUILD_CMDS
61         $(TARGET_MAKE_ENV) $(MAKE) THRIFT=$(HOST_DIR)/usr/bin/thrift -C $(@D)
62 endef
63
64 # Install runtime only
65 define THRIFT_INSTALL_TARGET_CMDS
66         $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/lib DESTDIR=$(TARGET_DIR) install
67 endef
68
69 $(eval $(autotools-package))
70 $(eval $(host-autotools-package))
71
72 # to be used by other packages
73 THRIFT = $(HOST_DIR)/usr/bin/thrift