2013-12-02 14:00:14 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# thrift
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2019-01-29 10:39:17 +01:00
|
|
|
THRIFT_VERSION = 0.12.0
|
2013-12-02 14:00:14 +01:00
|
|
|
THRIFT_SITE = http://www.us.apache.org/dist/thrift/$(THRIFT_VERSION)
|
2019-01-29 10:39:17 +01:00
|
|
|
THRIFT_LICENSE = Apache-2.0
|
|
|
|
THRIFT_LICENSE_FILES = LICENSE
|
|
|
|
|
|
|
|
THRIFT_DEPENDENCIES = host-pkgconf host-thrift boost \
|
2015-04-08 22:26:21 +02:00
|
|
|
libevent openssl zlib
|
2013-12-02 14:00:14 +01:00
|
|
|
THRIFT_INSTALL_STAGING = YES
|
2019-01-29 10:39:17 +01:00
|
|
|
HOST_THRIFT_DEPENDENCIES = host-bison host-boost \
|
2015-04-08 22:26:21 +02:00
|
|
|
host-flex host-libevent host-openssl host-pkgconf host-zlib
|
2015-04-06 18:57:27 +02:00
|
|
|
|
2019-01-29 10:39:17 +01:00
|
|
|
THRIFT_COMMON_CONF_OPTS = -DBUILD_TUTORIALS=OFF \
|
|
|
|
-DBUILD_TESTING=OFF \
|
|
|
|
-DWITH_PYTHON=OFF \
|
|
|
|
-DWITH_JAVA=OFF \
|
|
|
|
-DWITH_QT5=OFF
|
|
|
|
|
|
|
|
THRIFT_CONF_OPTS = $(THRIFT_COMMON_CONF_OPTS) -DBUILD_COMPILER=OFF
|
|
|
|
HOST_THRIFT_CONF_OPTS = $(THRIFT_COMMON_CONF_OPTS) -DBUILD_COMPILER=ON
|
2013-12-02 14:00:14 +01:00
|
|
|
|
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
|
|
|
|
|
2019-01-29 10:39:17 +01:00
|
|
|
# thrift doesn't use the regular flags BUILD_{STATIC,SHARED}_LIBS
|
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
|
2019-01-29 10:39:17 +01:00
|
|
|
THRIFT_CONF_OPTS += -DWITH_STATIC_LIB=ON -DWITH_BOOST_STATIC=ON -DWITH_SHARED_LIB=OFF
|
|
|
|
else ifeq ($(BR2_SHARED_LIBS),y)
|
|
|
|
THRIFT_CONF_OPTS += -DWITH_STATIC_LIB=OFF -DWITH_BOOST_STATIC=OFF -DWITH_SHARED_LIB=ON
|
|
|
|
else
|
|
|
|
# BR2_SHARED_STATIC_LIBS
|
|
|
|
THRIFT_CONF_OPTS += -DWITH_STATIC_LIB=ON -DWITH_BOOST_STATIC=OFF -DWITH_SHARED_LIB=ON
|
2013-12-02 14:00:14 +01:00
|
|
|
endif
|
|
|
|
|
2019-01-29 10:39:17 +01:00
|
|
|
# Language selection for the compiler
|
|
|
|
HOST_THRIFT_CONF_OPTS += -DTHRIFT_COMPILER_CSHARP=OFF \
|
|
|
|
-DTHRIFT_COMPILER_JAVA=OFF \
|
|
|
|
-DTHRIFT_COMPILER_ERL=OFF \
|
|
|
|
-DTHRIFT_COMPILER_PY=OFF \
|
|
|
|
-DTHRIFT_COMPILER_PERL=OFF \
|
|
|
|
-DTHRIFT_COMPILER_PHP=OFF \
|
|
|
|
-DTHRIFT_COMPILER_RB=OFF \
|
|
|
|
-DTHRIFT_COMPILER_HS=OFF \
|
|
|
|
-DTHRIFT_COMPILER_GO=OFF \
|
|
|
|
-DTHRIFT_COMPILER_D=OFF \
|
|
|
|
-DTHRIFT_COMPILER_LUA=OFF \
|
|
|
|
-DBUILD_C_GLIB=OFF
|
2013-12-02 14:00:14 +01:00
|
|
|
|
|
|
|
# C bindings
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
|
|
|
|
THRIFT_DEPENDENCIES += libglib2
|
2019-01-29 10:39:17 +01:00
|
|
|
THRIFT_CONF_OPTS += -DBUILD_C_GLIB=ON
|
2013-12-02 14:00:14 +01:00
|
|
|
else
|
2019-01-29 10:39:17 +01:00
|
|
|
THRIFT_CONF_OPTS += -DBUILD_C_GLIB=OFF
|
2013-12-02 14:00:14 +01:00
|
|
|
endif
|
|
|
|
|
2019-01-29 10:39:17 +01:00
|
|
|
$(eval $(cmake-package))
|
|
|
|
$(eval $(host-cmake-package))
|
2013-12-02 14:00:14 +01:00
|
|
|
|
|
|
|
# to be used by other packages
|
2017-07-05 13:14:19 +02:00
|
|
|
THRIFT = $(HOST_DIR)/bin/thrift
|