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 # relocation truncated to fit: R_68K_GOT16O
29 ifeq ($(BR2_m68k_cf
),y
)
30 THRIFT_CONF_ENV
+= CXXFLAGS
="$(TARGET_CXXFLAGS) -mxgot"
33 ifeq ($(BR2_STATIC_LIBS
),y
)
34 # openssl uses zlib, so we need to explicitly link with it when static
35 THRIFT_CONF_ENV
+= LIBS
=-lz
39 # The generator (host tool) works with all of them regardless
40 # This is just for the libraries / bindings
41 THRIFT_LANG_CONF_OPTS
+= --without-csharp
--without-java
--without-erlang \
42 --without-python
--without-perl
--without-php
--without-php_extension \
43 --without-ruby
--without-haskell
--without-go
--without-d \
44 --without-qt4
--without-lua
45 HOST_THRIFT_CONF_OPTS
+= $(THRIFT_LANG_CONF_OPTS
) --without-c_glib
46 THRIFT_CONF_OPTS
+= $(THRIFT_LANG_CONF_OPTS
)
49 ifeq ($(BR2_PACKAGE_LIBGLIB2
),y
)
50 THRIFT_DEPENDENCIES
+= libglib2
52 THRIFT_CONF_OPTS
+= --without-c_glib
55 # De-hardcode THRIFT for cross compiling
56 define THRIFT_TOOL_NO_HARDCODE
57 for f in
`find $(@D) -name Makefile.am -type f`; do \
58 $(SED
) "/^THRIFT =/d" $$f; \
60 $(SED
) "s:top_builddir)/compiler/cpp/thrift:THRIFT):" $(@D
)/tutorial
/Makefile.am
63 THRIFT_POST_PATCH_HOOKS
+= THRIFT_TOOL_NO_HARDCODE
65 define THRIFT_BUILD_CMDS
66 $(TARGET_MAKE_ENV
) $(MAKE
) THRIFT
=$(HOST_DIR
)/usr
/bin
/thrift
-C
$(@D
)
69 # Install runtime only
70 define THRIFT_INSTALL_TARGET_CMDS
71 $(TARGET_MAKE_ENV
) $(MAKE
) -C
$(@D
)/lib DESTDIR
=$(TARGET_DIR
) install
74 $(eval
$(autotools-package
))
75 $(eval
$(host-autotools-package
))
77 # to be used by other packages
78 THRIFT
= $(HOST_DIR
)/usr
/bin
/thrift