1 ################################################################################
5 ################################################################################
8 THRIFT_SITE = http://www.us.apache.org/dist/thrift/$(THRIFT_VERSION)
9 THRIFT_DEPENDENCIES = host-autoconf-archive host-pkgconf host-thrift boost \
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
15 THRIFT_CONF_OPTS = --with-sysroot=$(STAGING_DIR) \
17 --with-boost-libdir=$(STAGING_DIR)/usr/lib \
20 HOST_THRIFT_CONF_OPTS = --with-sysroot=$(HOST_DIR) \
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
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
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)
44 ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
45 THRIFT_DEPENDENCIES += libglib2
47 THRIFT_CONF_OPTS += --without-c_glib
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; \
55 $(SED) "s:top_builddir)/compiler/cpp/thrift:THRIFT):" $(@D)/tutorial/Makefile.am
58 THRIFT_POST_PATCH_HOOKS += THRIFT_TOOL_NO_HARDCODE
60 define THRIFT_BUILD_CMDS
61 $(TARGET_MAKE_ENV) $(MAKE) THRIFT=$(HOST_DIR)/usr/bin/thrift -C $(@D)
64 # Install runtime only
65 define THRIFT_INSTALL_TARGET_CMDS
66 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/lib DESTDIR=$(TARGET_DIR) install
69 $(eval $(autotools-package))
70 $(eval $(host-autotools-package))
72 # to be used by other packages
73 THRIFT = $(HOST_DIR)/usr/bin/thrift