2013-12-02 14:00:14 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# thrift
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2014-12-05 20:12:42 +01:00
|
|
|
THRIFT_VERSION = 0.9.2
|
2013-12-02 14:00:14 +01:00
|
|
|
THRIFT_SITE = http://www.us.apache.org/dist/thrift/$(THRIFT_VERSION)
|
2015-04-08 22:26:21 +02:00
|
|
|
THRIFT_DEPENDENCIES = host-autoconf-archive host-pkgconf host-thrift boost \
|
|
|
|
libevent openssl zlib
|
2013-12-02 14:00:14 +01:00
|
|
|
THRIFT_INSTALL_STAGING = YES
|
2015-04-08 22:26:21 +02:00
|
|
|
HOST_THRIFT_DEPENDENCIES = host-autoconf-archive host-bison host-boost \
|
|
|
|
host-flex host-libevent host-openssl host-pkgconf host-zlib
|
2015-04-06 18:57:27 +02:00
|
|
|
|
2014-12-05 20:12:42 +01:00
|
|
|
THRIFT_CONF_OPTS = --with-sysroot=$(STAGING_DIR) \
|
2015-02-24 00:29:07 +01:00
|
|
|
--with-boost \
|
|
|
|
--with-boost-libdir=$(STAGING_DIR)/usr/lib \
|
2014-12-09 20:13:05 +01:00
|
|
|
--disable-tests \
|
|
|
|
--disable-tutorial
|
2014-12-05 20:12:42 +01:00
|
|
|
HOST_THRIFT_CONF_OPTS = --with-sysroot=$(HOST_DIR) \
|
2014-12-09 20:13:05 +01:00
|
|
|
--disable-tests \
|
|
|
|
--disable-tutorial
|
2013-12-02 14:00:14 +01:00
|
|
|
THRIFT_AUTORECONF = YES
|
host-autoconf-archive: install to a non-standard location
The host-autoconf-archive package was added to provide the necessary
autoconf macros for the libsigrok package, and later also used for the
thrift package.
However, it installs its autoconf macro in
$(HOST_DIR)/usr/share/aclocal, which is part of the include directory
of autoconf macros used for all autoreconf invocations. Unfortunately,
using those macros for all packages is causing a number of
regressions: one on host-ola fixed in commit
884af65fd5ddc548f19a26162f905a32ef0b53b3, and one in snmpp. Those
packages are autoreconf'ed, but if they are autoreconf'ed with the
autoconf-archive macros installed, they no longer work.
To solve this problem, this commit implements a simple solution that
makes using host-autoconf-archive macros an opt-in mechanism. To
achieve this, the autoconf-archive package is modified to install its
macros in a special directory, and only the packages that really want
to use those macros will have to pass a -I flag pointing to this
directory in their <pkg>_AUTORECONF_OPTS variable.
Fixes:
http://autobuild.buildroot.org/results/712/712c8083b9eeafa41b60790961028c40b28f59ad/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Romain Naour <romain.naour@openwide.fr>
Tested-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-05-14 22:57:15 +02:00
|
|
|
THRIFT_AUTORECONF_OPTS = -I $(HOST_DIR)/usr/share/autoconf-archive
|
2014-01-02 14:01:48 +01:00
|
|
|
THRIFT_LICENSE = Apache-2.0
|
2013-12-02 14:00:14 +01:00
|
|
|
THRIFT_LICENSE_FILES = LICENSE
|
|
|
|
|
2016-08-08 06:47:48 +02:00
|
|
|
# relocation truncated to fit: R_68K_GOT16O
|
|
|
|
ifeq ($(BR2_m68k_cf),y)
|
|
|
|
THRIFT_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -mxgot"
|
|
|
|
endif
|
|
|
|
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2013-12-02 14:00:14 +01:00
|
|
|
# openssl uses zlib, so we need to explicitly link with it when static
|
|
|
|
THRIFT_CONF_ENV += LIBS=-lz
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Language selection
|
|
|
|
# The generator (host tool) works with all of them regardless
|
|
|
|
# This is just for the libraries / bindings
|
2014-09-27 21:32:44 +02:00
|
|
|
THRIFT_LANG_CONF_OPTS += --without-csharp --without-java --without-erlang \
|
2013-12-02 14:00:14 +01:00
|
|
|
--without-python --without-perl --without-php --without-php_extension \
|
2014-12-05 20:12:42 +01:00
|
|
|
--without-ruby --without-haskell --without-go --without-d \
|
|
|
|
--without-qt4 --without-lua
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_THRIFT_CONF_OPTS += $(THRIFT_LANG_CONF_OPTS) --without-c_glib
|
|
|
|
THRIFT_CONF_OPTS += $(THRIFT_LANG_CONF_OPTS)
|
2013-12-02 14:00:14 +01:00
|
|
|
|
|
|
|
# C bindings
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
|
|
|
|
THRIFT_DEPENDENCIES += libglib2
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
THRIFT_CONF_OPTS += --without-c_glib
|
2013-12-02 14:00:14 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
# De-hardcode THRIFT for cross compiling
|
|
|
|
define THRIFT_TOOL_NO_HARDCODE
|
|
|
|
for f in `find $(@D) -name Makefile.am -type f`; do \
|
|
|
|
$(SED) "/^THRIFT =/d" $$f; \
|
|
|
|
done
|
|
|
|
$(SED) "s:top_builddir)/compiler/cpp/thrift:THRIFT):" $(@D)/tutorial/Makefile.am
|
|
|
|
endef
|
|
|
|
|
|
|
|
THRIFT_POST_PATCH_HOOKS += THRIFT_TOOL_NO_HARDCODE
|
|
|
|
|
|
|
|
define THRIFT_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) THRIFT=$(HOST_DIR)/usr/bin/thrift -C $(@D)
|
|
|
|
endef
|
|
|
|
|
|
|
|
# Install runtime only
|
|
|
|
define THRIFT_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/lib DESTDIR=$(TARGET_DIR) install
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(autotools-package))
|
|
|
|
$(eval $(host-autotools-package))
|
|
|
|
|
|
|
|
# to be used by other packages
|
|
|
|
THRIFT = $(HOST_DIR)/usr/bin/thrift
|