All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCHv2 0/5] Add apache thrift
@ 2013-10-30  0:28 Gustavo Zacarias
  2013-10-30  0:28 ` [Buildroot] [PATCHv2 1/5] libevent: add host variant Gustavo Zacarias
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Gustavo Zacarias @ 2013-10-30  0:28 UTC (permalink / raw)
  To: buildroot

Add the apache thrift runtime and host tool.

Changes for v2:
* Fix indentation in python-thrift cross building
* Explicitly select/depend on zlib in thrift
* Patch Makefile.am instead of Makefile in thrift

Gustavo Zacarias (5):
  libevent: add host variant
  boost: add host variant
  python-thrift: fix cross building
  python-thrift: bump to version 0.9.1 and switch to apache
  thrift: new package

 package/Config.in                             |  1 +
 package/boost/boost.mk                        | 33 +++++++++++++++
 package/libevent/libevent.mk                  |  1 +
 package/python-thrift/python-thrift.mk        | 21 ++++++----
 package/thrift/Config.in                      | 23 ++++++++++
 package/thrift/thrift-01-libevent-cross.patch | 16 +++++++
 package/thrift/thrift-02-autoreconf.patch     | 22 ++++++++++
 package/thrift/thrift-03-zlib-cross.patch     | 16 +++++++
 package/thrift/thrift.mk                      | 60 +++++++++++++++++++++++++++
 9 files changed, 185 insertions(+), 8 deletions(-)
 create mode 100644 package/thrift/Config.in
 create mode 100644 package/thrift/thrift-01-libevent-cross.patch
 create mode 100644 package/thrift/thrift-02-autoreconf.patch
 create mode 100644 package/thrift/thrift-03-zlib-cross.patch
 create mode 100644 package/thrift/thrift.mk

-- 
1.8.1.5

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 1/5] libevent: add host variant
  2013-10-30  0:28 [Buildroot] [PATCHv2 0/5] Add apache thrift Gustavo Zacarias
@ 2013-10-30  0:28 ` Gustavo Zacarias
  2013-10-30  0:28 ` [Buildroot] [PATCHv2 2/5] boost: " Gustavo Zacarias
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Gustavo Zacarias @ 2013-10-30  0:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/libevent/libevent.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/libevent/libevent.mk b/package/libevent/libevent.mk
index a6def1a..14ebf72 100644
--- a/package/libevent/libevent.mk
+++ b/package/libevent/libevent.mk
@@ -20,3 +20,4 @@ LIBEVENT_POST_INSTALL_TARGET_HOOKS += LIBEVENT_REMOVE_PYSCRIPT
 endif
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 2/5] boost: add host variant
  2013-10-30  0:28 [Buildroot] [PATCHv2 0/5] Add apache thrift Gustavo Zacarias
  2013-10-30  0:28 ` [Buildroot] [PATCHv2 1/5] libevent: add host variant Gustavo Zacarias
@ 2013-10-30  0:28 ` Gustavo Zacarias
  2013-10-30  0:28 ` [Buildroot] [PATCHv2 3/5] python-thrift: fix cross building Gustavo Zacarias
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Gustavo Zacarias @ 2013-10-30  0:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/boost/boost.mk | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/package/boost/boost.mk b/package/boost/boost.mk
index b0b3352..b97d12b 100644
--- a/package/boost/boost.mk
+++ b/package/boost/boost.mk
@@ -11,11 +11,19 @@ BOOST_SITE = http://downloads.sourceforge.net/project/boost/boost/$(BOOST_VERSIO
 BOOST_INSTALL_STAGING = YES
 
 TARGET_CC_VERSION = $(shell $(TARGET_CC) -dumpversion)
+HOST_CC_VERSION = $(shell $(HOSTCC) -dumpversion)
 
 BOOST_DEPENDENCIES =
 
 BOOST_FLAGS =
 
+# keep host variant as minimal as possible
+HOST_BOOST_FLAGS = --without-icu \
+	--without-libraries=$(subst $(space),$(comma),atomic chrono context \
+	coroutine date_time exception filesystem graph graph_parallel \
+	iostreams locale log math mpi program_options python random regex \
+	serialization signals system test thread timer wave)
+
 # atomic library compile only with upstream version, wait for next release
 # coroutine breaks on some weak toolchains and it's new for 1.54+
 # log breaks with some toolchain combinations and it's new for 1.54+
@@ -54,6 +62,9 @@ ifeq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y)
 BOOST_DEPENDENCIES += bzip2 zlib
 endif
 
+HOST_BOOST_OPT += toolset=gcc threading=multi variant=release link=shared \
+	runtime-link=shared
+
 BOOST_OPT += toolset=gcc \
 	     threading=multi \
 	     variant=$(if $(BR2_ENABLE_DEBUG),debug,release) \
@@ -78,6 +89,12 @@ define BOOST_CONFIGURE_CMDS
 	echo "" >> $(@D)/user-config.jam
 endef
 
+define HOST_BOOST_CONFIGURE_CMDS
+	(cd $(@D) && ./bootstrap.sh $(HOST_BOOST_FLAGS))
+	echo "using gcc : $(HOST_CC_VERSION) : $(HOSTCXX) : <cxxflags>\"$(HOST_CXXFLAGS)\" <linkflags>\"$(HOST_LDFLAGS)\" ;" > $(@D)/user-config.jam
+	echo "" >> $(@D)/user-config.jam
+endef
+
 define BOOST_INSTALL_TARGET_CMDS
 	(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
 	--user-config=$(@D)/user-config.jam \
@@ -86,6 +103,21 @@ define BOOST_INSTALL_TARGET_CMDS
 	--layout=system install )
 endef
 
+define HOST_BOOST_BUILD_CMDS
+	(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
+	--user-config=$(@D)/user-config.jam \
+	$(HOST_BOOST_OPT) \
+	--prefix=$(HOST_DIR)/usr )
+endef
+
+define HOST_BOOST_INSTALL_CMDS
+	(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
+	--user-config=$(@D)/user-config.jam \
+	$(HOST_BOOST_OPT) \
+	--prefix=$(HOST_DIR)/usr \
+	--layout=system install )
+endef
+
 define BOOST_INSTALL_STAGING_CMDS
 	(cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -d+1 \
 	--user-config=$(@D)/user-config.jam \
@@ -95,3 +127,4 @@ define BOOST_INSTALL_STAGING_CMDS
 endef
 
 $(eval $(generic-package))
+$(eval $(host-generic-package))
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 3/5] python-thrift: fix cross building
  2013-10-30  0:28 [Buildroot] [PATCHv2 0/5] Add apache thrift Gustavo Zacarias
  2013-10-30  0:28 ` [Buildroot] [PATCHv2 1/5] libevent: add host variant Gustavo Zacarias
  2013-10-30  0:28 ` [Buildroot] [PATCHv2 2/5] boost: " Gustavo Zacarias
@ 2013-10-30  0:28 ` Gustavo Zacarias
  2013-10-30  0:28 ` [Buildroot] [PATCHv2 4/5] python-thrift: bump to version 0.9.1 and switch to apache Gustavo Zacarias
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Gustavo Zacarias @ 2013-10-30  0:28 UTC (permalink / raw)
  To: buildroot

The C code (fastbinary.so) wasn't built using the cross compiler, hence
it was unusable. Fix it.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/python-thrift/python-thrift.mk | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/package/python-thrift/python-thrift.mk b/package/python-thrift/python-thrift.mk
index 4cd35e5..65733d4 100644
--- a/package/python-thrift/python-thrift.mk
+++ b/package/python-thrift/python-thrift.mk
@@ -9,13 +9,18 @@ PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_VERSION).tar.gz
 PYTHON_THRIFT_SITE = http://pypi.python.org/packages/source/t/thrift
 PYTHON_THRIFT_LICENSE = Apache-2.0
 PYTHON_THRIFT_LICENSE_FILES = README
-
 PYTHON_THRIFT_DEPENDENCIES = python
 
 define PYTHON_THRIFT_BUILD_CMDS
 	(cd $(@D); \
-		PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
-		LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
+		CC="$(TARGET_CC)" \
+		CFLAGS="$(TARGET_CFLAGS)" \
+		LDSHARED="$(TARGET_CROSS)gcc -shared" \
+		CROSS_COMPILING=yes \
+		_python_sysroot=$(STAGING_DIR) \
+		_python_srcdir=$(BUILD_DIR)/python$(PYTHON_VERSION) \
+		_python_prefix=/usr \
+		_python_exec_prefix=/usr \
 		$(HOST_DIR)/usr/bin/python setup.py build)
 endef
 
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 4/5] python-thrift: bump to version 0.9.1 and switch to apache
  2013-10-30  0:28 [Buildroot] [PATCHv2 0/5] Add apache thrift Gustavo Zacarias
                   ` (2 preceding siblings ...)
  2013-10-30  0:28 ` [Buildroot] [PATCHv2 3/5] python-thrift: fix cross building Gustavo Zacarias
@ 2013-10-30  0:28 ` Gustavo Zacarias
  2013-10-30  0:28 ` [Buildroot] [PATCHv2 5/5] thrift: new package Gustavo Zacarias
  2013-10-30  0:51 ` [Buildroot] [PATCHv2 0/5] Add apache thrift rjbarnet at rockwellcollins.com
  5 siblings, 0 replies; 9+ messages in thread
From: Gustavo Zacarias @ 2013-10-30  0:28 UTC (permalink / raw)
  To: buildroot

Switch away from the PyPI subset version since it has a great filename
clash with the full upstream apache version.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/python-thrift/python-thrift.mk | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/python-thrift/python-thrift.mk b/package/python-thrift/python-thrift.mk
index 65733d4..91e14e5 100644
--- a/package/python-thrift/python-thrift.mk
+++ b/package/python-thrift/python-thrift.mk
@@ -4,15 +4,15 @@
 #
 ################################################################################
 
-PYTHON_THRIFT_VERSION = 0.9.0
+PYTHON_THRIFT_VERSION = 0.9.1
 PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_VERSION).tar.gz
-PYTHON_THRIFT_SITE = http://pypi.python.org/packages/source/t/thrift
+PYTHON_THRIFT_SITE = http://www.us.apache.org/dist/thrift/$(PYTHON_THRIFT_VERSION)
 PYTHON_THRIFT_LICENSE = Apache-2.0
-PYTHON_THRIFT_LICENSE_FILES = README
+PYTHON_THRIFT_LICENSE_FILES = LICENSE
 PYTHON_THRIFT_DEPENDENCIES = python
 
 define PYTHON_THRIFT_BUILD_CMDS
-	(cd $(@D); \
+	(cd $(@D)/lib/py; \
 		CC="$(TARGET_CC)" \
 		CFLAGS="$(TARGET_CFLAGS)" \
 		LDSHARED="$(TARGET_CROSS)gcc -shared" \
@@ -28,7 +28,7 @@ endef
 # the installation directory is in python's load path. For host-python,
 # it is not, so add it explicitly while installing to target.
 define PYTHON_THRIFT_INSTALL_TARGET_CMDS
-	(cd $(@D); PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
+	(cd $(@D)/lib/py; PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \
 		$(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr)
 endef
 
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 5/5] thrift: new package
  2013-10-30  0:28 [Buildroot] [PATCHv2 0/5] Add apache thrift Gustavo Zacarias
                   ` (3 preceding siblings ...)
  2013-10-30  0:28 ` [Buildroot] [PATCHv2 4/5] python-thrift: bump to version 0.9.1 and switch to apache Gustavo Zacarias
@ 2013-10-30  0:28 ` Gustavo Zacarias
  2013-10-30  0:51 ` [Buildroot] [PATCHv2 0/5] Add apache thrift rjbarnet at rockwellcollins.com
  5 siblings, 0 replies; 9+ messages in thread
From: Gustavo Zacarias @ 2013-10-30  0:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/Config.in                             |  1 +
 package/thrift/Config.in                      | 23 ++++++++++
 package/thrift/thrift-01-libevent-cross.patch | 16 +++++++
 package/thrift/thrift-02-autoreconf.patch     | 22 ++++++++++
 package/thrift/thrift-03-zlib-cross.patch     | 16 +++++++
 package/thrift/thrift.mk                      | 60 +++++++++++++++++++++++++++
 6 files changed, 138 insertions(+)
 create mode 100644 package/thrift/Config.in
 create mode 100644 package/thrift/thrift-01-libevent-cross.patch
 create mode 100644 package/thrift/thrift-02-autoreconf.patch
 create mode 100644 package/thrift/thrift-03-zlib-cross.patch
 create mode 100644 package/thrift/thrift.mk

diff --git a/package/Config.in b/package/Config.in
index f3dc65e..eb667a6 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -660,6 +660,7 @@ source "package/openpgm/Config.in"
 source "package/ortp/Config.in"
 source "package/slirp/Config.in"
 source "package/snmppp/Config.in"
+source "package/thrift/Config.in"
 source "package/usbredir/Config.in"
 source "package/wvstreams/Config.in"
 source "package/zeromq/Config.in"
diff --git a/package/thrift/Config.in b/package/thrift/Config.in
new file mode 100644
index 0000000..a7f3479
--- /dev/null
+++ b/package/thrift/Config.in
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_THRIFT
+	bool "thrift"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_WCHAR
+	depends on BR2_LARGEFILE
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_LIBEVENT
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_ZLIB
+	help
+	  The Apache Thrift software framework, for scalable cross-language
+	  services development, combines a software stack with a
+	  code generation engine to build services that work
+	  efficiently and seamlessly between C++, Java, Python, PHP, Ruby,
+	  Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk,
+	  OCaml and Delphi and other languages.
+
+	  http://thrift.apache.org/
+
+comment "thrift needs a toolchain w/ C++, largefile, wchar, threads"
+	depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || \
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
diff --git a/package/thrift/thrift-01-libevent-cross.patch b/package/thrift/thrift-01-libevent-cross.patch
new file mode 100644
index 0000000..f07caa7
--- /dev/null
+++ b/package/thrift/thrift-01-libevent-cross.patch
@@ -0,0 +1,16 @@
+Make it cross-compile happy the hard way, there's no clean way.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura thrift-0.9.1.orig/aclocal/ax_lib_event.m4 thrift-0.9.1/aclocal/ax_lib_event.m4
+--- thrift-0.9.1.orig/aclocal/ax_lib_event.m4	2013-08-15 11:04:29.000000000 -0300
++++ thrift-0.9.1/aclocal/ax_lib_event.m4	2013-10-07 20:40:44.076435613 -0300
+@@ -75,7 +75,7 @@
+           AC_LANG_PUSH([C])
+           dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling,
+           dnl but then the version cannot be checked.
+-          AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++          AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+           #include <sys/types.h>
+           #include <event.h>
+           ]], [[
diff --git a/package/thrift/thrift-02-autoreconf.patch b/package/thrift/thrift-02-autoreconf.patch
new file mode 100644
index 0000000..d56212a
--- /dev/null
+++ b/package/thrift/thrift-02-autoreconf.patch
@@ -0,0 +1,22 @@
+Fillers to make autoreconf (automake) happy.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura thrift-0.9.1.orig/AUTHORS thrift-0.9.1/AUTHORS
+--- thrift-0.9.1.orig/AUTHORS	1969-12-31 21:00:00.000000000 -0300
++++ thrift-0.9.1/AUTHORS	2013-10-07 20:45:15.745315148 -0300
+@@ -0,0 +1,2 @@
++
++
+diff -Nura thrift-0.9.1.orig/ChangeLog thrift-0.9.1/ChangeLog
+--- thrift-0.9.1.orig/ChangeLog	1969-12-31 21:00:00.000000000 -0300
++++ thrift-0.9.1/ChangeLog	2013-10-07 20:45:23.078554836 -0300
+@@ -0,0 +1,2 @@
++
++
+diff -Nura thrift-0.9.1.orig/NEWS thrift-0.9.1/NEWS
+--- thrift-0.9.1.orig/NEWS	1969-12-31 21:00:00.000000000 -0300
++++ thrift-0.9.1/NEWS	2013-10-07 20:45:20.351465699 -0300
+@@ -0,0 +1,2 @@
++
++
diff --git a/package/thrift/thrift-03-zlib-cross.patch b/package/thrift/thrift-03-zlib-cross.patch
new file mode 100644
index 0000000..3af39c4
--- /dev/null
+++ b/package/thrift/thrift-03-zlib-cross.patch
@@ -0,0 +1,16 @@
+Make zlib version detection cross-compile happy.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4 thrift-0.9.1/aclocal/ax_lib_zlib.m4
+--- thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4	2013-08-15 11:04:29.000000000 -0300
++++ thrift-0.9.1/aclocal/ax_lib_zlib.m4	2013-10-07 20:47:44.523177973 -0300
+@@ -73,7 +73,7 @@
+           #   (defined in the library).
+           AC_LANG_PUSH([C])
+           dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling.
+-          AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++          AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+           #include <zlib.h>
+           #if ZLIB_VERNUM >= 0x$WANT_ZLIB_VERSION
+           #else
diff --git a/package/thrift/thrift.mk b/package/thrift/thrift.mk
new file mode 100644
index 0000000..850d3f4
--- /dev/null
+++ b/package/thrift/thrift.mk
@@ -0,0 +1,60 @@
+################################################################################
+#
+# thrift
+#
+################################################################################
+
+THRIFT_VERSION = 0.9.1
+THRIFT_SITE = http://www.us.apache.org/dist/thrift/$(THRIFT_VERSION)
+THRIFT_DEPENDENCIES = host-pkgconf host-thrift boost libevent openssl zlib
+HOST_THRIFT_DEPENDENCIES = host-boost host-libevent host-openssl host-pkgconf \
+	host-zlib
+THRIFT_CONF_OPT = --with-sysroot=$(STAGING_DIR) --with-tests=no \
+	--with-boost=$(STAGING_DIR)
+HOST_THRIFT_CONF_OPT = --with-sysroot=$(HOST_DIR) --with-tests=no
+THRIFT_AUTORECONF = YES
+THRIFT_LICENSE = Apache 2.0
+THRIFT_LICENSE_FILES = LICENSE
+
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+# 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
+THRIFT_LANG_CONF_OPT += --without-csharp --without-java --without-erlang \
+	--without-python --without-perl --without-php --without-php_extension \
+	--without-ruby --without-haskell --without-go --without-d
+HOST_THRIFT_CONF_OPT += $(THRIFT_LANG_CONF_OPT) --without-c_glib
+THRIFT_CONF_OPT += $(THRIFT_LANG_CONF_OPT)
+
+# C bindings
+ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
+THRIFT_DEPENDENCIES += libglib2
+else
+THRIFT_CONF_OPT += --without-c_glib
+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))
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 0/5] Add apache thrift
  2013-10-30  0:28 [Buildroot] [PATCHv2 0/5] Add apache thrift Gustavo Zacarias
                   ` (4 preceding siblings ...)
  2013-10-30  0:28 ` [Buildroot] [PATCHv2 5/5] thrift: new package Gustavo Zacarias
@ 2013-10-30  0:51 ` rjbarnet at rockwellcollins.com
  2013-10-30 14:39   ` Gustavo Zacarias
  5 siblings, 1 reply; 9+ messages in thread
From: rjbarnet at rockwellcollins.com @ 2013-10-30  0:51 UTC (permalink / raw)
  To: buildroot

Gustavo,

Gustavo Zacarias <gustavo@zacarias.com.ar> wrote on 10/29/2013 07:28:31 
PM:

> Add the apache thrift runtime and host tool.
> 
> Changes for v2:
> * Fix indentation in python-thrift cross building
> * Explicitly select/depend on zlib in thrift
> * Patch Makefile.am instead of Makefile in thrift

So how do you envision a new person to add a package that utilizes thrift 
as their complier? I guess what I'm trying to get at here is I just want 
to try to understand how the thrift package will be used. I'm pretty sure 
how you are going to do it but without an example in this patchset I can't 
be sure.

Here is how I'm envisioning it with the packages you have submitted.

Config.in
----------
has "select BR2_PACKAGE_THRIFT"


foo.mk
--------
FOO_DEPENDENCIES = host-thrift

define FOO_BUILD_CMDS
        # This assumes that the package's Makefile uses THRIFT for the 
compiler
        $(TARGET_MAKE_ENV) $(MAKE) THRIFT=$(HOST_DIR)/usr/bin/thrift -C 
$(@D)
endif

Granted there is more each of the packages but this covers the thrift 
specific parts. Please correct me if I have made incorrect assumptions 
with how you envisioned utilizing THRIFT.

Thanks,
-Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131029/867114c9/attachment.html>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 0/5] Add apache thrift
  2013-10-30  0:51 ` [Buildroot] [PATCHv2 0/5] Add apache thrift rjbarnet at rockwellcollins.com
@ 2013-10-30 14:39   ` Gustavo Zacarias
  2013-10-30 15:34     ` Ryan Barnett
  0 siblings, 1 reply; 9+ messages in thread
From: Gustavo Zacarias @ 2013-10-30 14:39 UTC (permalink / raw)
  To: buildroot

On 10/29/2013 09:51 PM, rjbarnet at rockwellcollins.com wrote:

> So how do you envision a new person to add a package that utilizes
> thrift as their complier? I guess what I'm trying to get at here is I
> just want to try to understand how the thrift package will be used. I'm
> pretty sure how you are going to do it but without an example in this
> patchset I can't be sure.
> 
> Here is how I'm envisioning it with the packages you have submitted.
> 
> Config.in
> ----------
> has "select BR2_PACKAGE_THRIFT"
> 
> 
> foo.mk
> --------
> FOO_DEPENDENCIES = host-thrift

FOO_DEPENDENCIES = thrift
You'll need the runtime libs which implement all the networking stack
besides the host tool to compile.
A thrift definition file assembles into target source code with the tool
with the chosen language. This could ostensibly be done outside
buildroot, but very few distributions ship the thrift tool.
Coarsely speaking it would fit in a build process like bison or flex.

> define FOO_BUILD_CMDS
>         # This assumes that the package's Makefile uses THRIFT for the
> compiler
>         $(TARGET_MAKE_ENV) $(MAKE) THRIFT=$(HOST_DIR)/usr/bin/thrift -C
> $(@D)
> endif

Not really, for a package/project with a proper Makefile you'd just
point THRIFT=$(HOST_DIR)/usr/bin/thrift to it and be handled internally
as part of the overall build process.

> Granted there is more each of the packages but this covers the thrift
> specific parts. Please correct me if I have made incorrect assumptions
> with how you envisioned utilizing THRIFT.

We can always define $(THRIFT) to make it handy for developers like it's
done for QT_QMAKE for example - but being generally used with specific
parameters (target language mostly) it would just point to the binary
since it's pretty much self-contained.
Regards.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 0/5] Add apache thrift
  2013-10-30 14:39   ` Gustavo Zacarias
@ 2013-10-30 15:34     ` Ryan Barnett
  0 siblings, 0 replies; 9+ messages in thread
From: Ryan Barnett @ 2013-10-30 15:34 UTC (permalink / raw)
  To: buildroot

Gustavo,

Gustavo Zacarias <gustavo@zacarias.com.ar> wrote on 10/30/2013 09:39:24 
AM:

> On 10/29/2013 09:51 PM, rjbarnet at rockwellcollins.com wrote:

> FOO_DEPENDENCIES = thrift
> You'll need the runtime libs which implement all the networking stack
> besides the host tool to compile.
> A thrift definition file assembles into target source code with the tool
> with the chosen language. This could ostensibly be done outside
> buildroot, but very few distributions ship the thrift tool.
> Coarsely speaking it would fit in a build process like bison or flex.

Ok, thanks for the insight and yes of course I forgot about the target 
version.
 
> > define FOO_BUILD_CMDS
> >         # This assumes that the package's Makefile uses THRIFT for the
> > compiler
> >         $(TARGET_MAKE_ENV) $(MAKE) THRIFT=$(HOST_DIR)/usr/bin/thrift 
-C
> > $(@D)
> > endif
> 
> Not really, for a package/project with a proper Makefile you'd just
> point THRIFT=$(HOST_DIR)/usr/bin/thrift to it and be handled internally
> as part of the overall build process.
> 
> > Granted there is more each of the packages but this covers the thrift
> > specific parts. Please correct me if I have made incorrect assumptions
> > with how you envisioned utilizing THRIFT.
> 
> We can always define $(THRIFT) to make it handy for developers like it's
> done for QT_QMAKE for example - but being generally used with specific
> parameters (target language mostly) it would just point to the binary
> since it's pretty much self-contained.

Thank for you clarifying this for me. I will try to get around to testing 
out your patches here by the end of the week.

Thanks,
-Ryan 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-10-30 15:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-30  0:28 [Buildroot] [PATCHv2 0/5] Add apache thrift Gustavo Zacarias
2013-10-30  0:28 ` [Buildroot] [PATCHv2 1/5] libevent: add host variant Gustavo Zacarias
2013-10-30  0:28 ` [Buildroot] [PATCHv2 2/5] boost: " Gustavo Zacarias
2013-10-30  0:28 ` [Buildroot] [PATCHv2 3/5] python-thrift: fix cross building Gustavo Zacarias
2013-10-30  0:28 ` [Buildroot] [PATCHv2 4/5] python-thrift: bump to version 0.9.1 and switch to apache Gustavo Zacarias
2013-10-30  0:28 ` [Buildroot] [PATCHv2 5/5] thrift: new package Gustavo Zacarias
2013-10-30  0:51 ` [Buildroot] [PATCHv2 0/5] Add apache thrift rjbarnet at rockwellcollins.com
2013-10-30 14:39   ` Gustavo Zacarias
2013-10-30 15:34     ` Ryan Barnett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.