Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs
@ 2015-07-11 14:15 Luca Ceresoli
  2015-07-11 14:15 ` [Buildroot] [PATCH 2/7] docs/manual: document <PKG>_STRIP_COMPONENTS Luca Ceresoli
                   ` (9 more replies)
  0 siblings, 10 replies; 23+ messages in thread
From: Luca Ceresoli @ 2015-07-11 14:15 UTC (permalink / raw)
  To: buildroot

Usually package tarballs contain only a directory named
"<pkg-name>-<pkg-version>" which contains the actual source tree. To properly
extract the source files in $(BUILD_DIR), Buildroot passes the
--strip-components=1 option to tar.

Unfortunately a few packages ship in a non-standard way, with no root
directory or with more than one. In Buildroot these packages must be handled by
overriding the <PKG>_DOWNLOAD_CMDS.

As the number of such packages is growing, introduce a <PKG>_STRIP_COMPONENTS
variable for packages to request a number of components to strip different
from 1.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
 package/pkg-generic.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 9fe01b8d4d12..8aad1b4acc23 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -322,6 +322,14 @@ ifndef $(2)_SUBDIR
  endif
 endif
 
+ifndef $(2)_STRIP_COMPONENTS
+ ifdef $(3)_STRIP_COMPONENTS
+  $(2)_STRIP_COMPONENTS = $$($(3)_STRIP_COMPONENTS)
+ else
+  $(2)_STRIP_COMPONENTS ?= 1
+ endif
+endif
+
 $(2)_SRCDIR		       = $$($(2)_DIR)/$$($(2)_SUBDIR)
 $(2)_BUILDDIR		       ?= $$($(2)_SRCDIR)
 
@@ -431,7 +439,7 @@ $(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
 # default extract command
 $(2)_EXTRACT_CMDS ?= \
 	$$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $$(DL_DIR)/$$($(2)_SOURCE) | \
-	$$(TAR) $$(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $$(TAR_OPTIONS) -)
+	$$(TAR) $$(TAR_STRIP_COMPONENTS)=$$($(2)_STRIP_COMPONENTS) -C $$($(2)_DIR) $$(TAR_OPTIONS) -)
 
 # pre/post-steps hooks
 $(2)_PRE_DOWNLOAD_HOOKS         ?=
-- 
1.9.1

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

* [Buildroot] [PATCH 2/7] docs/manual: document <PKG>_STRIP_COMPONENTS
  2015-07-11 14:15 [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Luca Ceresoli
@ 2015-07-11 14:15 ` Luca Ceresoli
  2015-07-11 22:29   ` Arnout Vandecappelle
  2015-07-11 14:15 ` [Buildroot] [PATCH 3/7] intel-microcode: use <PKG>_STRIP_COMPONENTS Luca Ceresoli
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 23+ messages in thread
From: Luca Ceresoli @ 2015-07-11 14:15 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
 docs/manual/adding-packages-generic.txt | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
index bc07667a01c8..4c12b42da862 100644
--- a/docs/manual/adding-packages-generic.txt
+++ b/docs/manual/adding-packages-generic.txt
@@ -303,6 +303,15 @@ information is (assuming the package name is +libfoo+) :
      the package source code. Buildroot copies the contents of the
      source directory into the package's build directory.
 
+* +LIBFOO_STRIP_COMPONENTS+ is the number of leading components
+  (directories) that tar must strip from file names on extraction.
+  The tarball for most packages has one leading component named
+  "<pkg-name>-<pkg-version>", thus Buildroot passes
+  --strip-components=1 to tar to remove it.
+  For non-standard packages that don't have this component, or
+  that have more than one leading component to strip, set this
+  variable with the value to be passed to tar. Default: 1.
+
 * +LIBFOO_DEPENDENCIES+ lists the dependencies (in terms of package
   name) that are required for the current target package to
   compile. These dependencies are guaranteed to be compiled and
-- 
1.9.1

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

* [Buildroot] [PATCH 3/7] intel-microcode: use <PKG>_STRIP_COMPONENTS
  2015-07-11 14:15 [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Luca Ceresoli
  2015-07-11 14:15 ` [Buildroot] [PATCH 2/7] docs/manual: document <PKG>_STRIP_COMPONENTS Luca Ceresoli
@ 2015-07-11 14:15 ` Luca Ceresoli
  2015-07-11 22:30   ` Arnout Vandecappelle
  2015-07-11 14:15 ` [Buildroot] [PATCH 4/7] nanocom: " Luca Ceresoli
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 23+ messages in thread
From: Luca Ceresoli @ 2015-07-11 14:15 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/intel-microcode/intel-microcode.mk | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/intel-microcode/intel-microcode.mk b/package/intel-microcode/intel-microcode.mk
index 4e8ea906c624..23c4b3ebfb47 100644
--- a/package/intel-microcode/intel-microcode.mk
+++ b/package/intel-microcode/intel-microcode.mk
@@ -7,17 +7,17 @@
 INTEL_MICROCODE_VERSION = 20150107
 INTEL_MICROCODE_SOURCE = microcode-$(INTEL_MICROCODE_VERSION).tgz
 INTEL_MICROCODE_SITE = http://downloadmirror.intel.com/24616/eng
+INTEL_MICROCODE_STRIP_COMPONENTS = 0
 INTEL_MICROCODE_LICENSE = PROPRIETARY
 INTEL_MICROCODE_LICENSE_FILES = license.txt
 INTEL_MICROCODE_REDISTRIBUTE = NO
 
-# N.B. Don't strip any path components during extraction.
-define INTEL_MICROCODE_EXTRACT_CMDS
-	gzip -d -c $(DL_DIR)/$(INTEL_MICROCODE_SOURCE) | \
-	tar --strip-components=0 -C $(@D) -xf -
+define INTEL_MICROCODE_EXTRACT_LICENSE
 	head -n 33 $(@D)/microcode.dat > $(@D)/license.txt
 endef
 
+INTEL_MICROCODE_POST_EXTRACT_HOOKS += INTEL_MICROCODE_EXTRACT_LICENSE
+
 define INTEL_MICROCODE_INSTALL_TARGET_CMDS
 	$(INSTALL) -D -m 0644 $(@D)/microcode.dat \
 		$(TARGET_DIR)/usr/share/misc/intel-microcode.dat
-- 
1.9.1

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

* [Buildroot] [PATCH 4/7] nanocom: use <PKG>_STRIP_COMPONENTS
  2015-07-11 14:15 [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Luca Ceresoli
  2015-07-11 14:15 ` [Buildroot] [PATCH 2/7] docs/manual: document <PKG>_STRIP_COMPONENTS Luca Ceresoli
  2015-07-11 14:15 ` [Buildroot] [PATCH 3/7] intel-microcode: use <PKG>_STRIP_COMPONENTS Luca Ceresoli
@ 2015-07-11 14:15 ` Luca Ceresoli
  2015-07-11 22:30   ` Arnout Vandecappelle
  2015-07-11 14:15 ` [Buildroot] [PATCH 5/7] tzdata: " Luca Ceresoli
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 23+ messages in thread
From: Luca Ceresoli @ 2015-07-11 14:15 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/nanocom/nanocom.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/nanocom/nanocom.mk b/package/nanocom/nanocom.mk
index f723951281f7..293dd091fc9d 100644
--- a/package/nanocom/nanocom.mk
+++ b/package/nanocom/nanocom.mk
@@ -7,14 +7,10 @@
 NANOCOM_VERSION = 1.0
 NANOCOM_SOURCE = nanocom.tar.gz
 NANOCOM_SITE = http://downloads.sourceforge.net/project/nanocom/nanocom/v$(NANOCOM_VERSION)
+NANOCOM_STRIP_COMPONENTS = 0
 NANOCOM_LICENSE = GPLv2+
 NANOCOM_LICENSE_FILES = COPYING
 
-# N.B. Don't strip any path components during extraction.
-define NANOCOM_EXTRACT_CMDS
-	gzip -d -c $(DL_DIR)/$(NANOCOM_SOURCE) | tar --strip-components=0 -C $(NANOCOM_DIR) -xf -
-endef
-
 define NANOCOM_BUILD_CMDS
 	$(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" -C $(@D)
 endef
-- 
1.9.1

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

* [Buildroot] [PATCH 5/7] tzdata: use <PKG>_STRIP_COMPONENTS
  2015-07-11 14:15 [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Luca Ceresoli
                   ` (2 preceding siblings ...)
  2015-07-11 14:15 ` [Buildroot] [PATCH 4/7] nanocom: " Luca Ceresoli
@ 2015-07-11 14:15 ` Luca Ceresoli
  2015-07-11 22:36   ` Arnout Vandecappelle
  2015-07-12 12:22   ` Arnout Vandecappelle
  2015-07-11 14:15 ` [Buildroot] [PATCH 6/7] zic: " Luca Ceresoli
                   ` (5 subsequent siblings)
  9 siblings, 2 replies; 23+ messages in thread
From: Luca Ceresoli @ 2015-07-11 14:15 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/tzdata/tzdata.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
index eb6da6ce3375..c38d4fe8cd2b 100644
--- a/package/tzdata/tzdata.mk
+++ b/package/tzdata/tzdata.mk
@@ -7,6 +7,7 @@
 TZDATA_VERSION = 2015e
 TZDATA_SOURCE = tzdata$(TZDATA_VERSION).tar.gz
 TZDATA_SITE = ftp://ftp.iana.org/tz/releases
+TZDATA_STRIP_COMPONENTS = 0
 TZDATA_DEPENDENCIES = host-tzdata
 HOST_TZDATA_DEPENDENCIES = host-zic
 TZDATA_LICENSE = Public domain
@@ -45,11 +46,6 @@ define TZDATA_INSTALL_TARGET_CMDS
 	fi
 endef
 
-define HOST_TZDATA_EXTRACT_CMDS
-	gzip -d -c $(DL_DIR)/$(TZDATA_SOURCE) \
-		| $(TAR) --strip-components=0 -C $(@D) -xf -
-endef
-
 define HOST_TZDATA_BUILD_CMDS
 	(cd $(@D); \
 		for zone in $(TZDATA_ZONELIST); do \
-- 
1.9.1

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

* [Buildroot] [PATCH 6/7] zic: use <PKG>_STRIP_COMPONENTS
  2015-07-11 14:15 [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Luca Ceresoli
                   ` (3 preceding siblings ...)
  2015-07-11 14:15 ` [Buildroot] [PATCH 5/7] tzdata: " Luca Ceresoli
@ 2015-07-11 14:15 ` Luca Ceresoli
  2015-07-11 22:40   ` Arnout Vandecappelle
  2015-07-11 14:15 ` [Buildroot] [PATCH 7/7] qpid-proton: new package Luca Ceresoli
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 23+ messages in thread
From: Luca Ceresoli @ 2015-07-11 14:15 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/zic/zic.mk | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/package/zic/zic.mk b/package/zic/zic.mk
index a768ac6cfd59..03e023ae4ff4 100644
--- a/package/zic/zic.mk
+++ b/package/zic/zic.mk
@@ -7,14 +7,9 @@
 ZIC_VERSION = 2015e
 ZIC_SOURCE = tzcode$(ZIC_VERSION).tar.gz
 ZIC_SITE = ftp://ftp.iana.org/tz/releases
+ZIC_STRIP_COMPONENTS = 0
 ZIC_LICENSE = Public domain
 
-# Don't strip any path components during extraction.
-define HOST_ZIC_EXTRACT_CMDS
-	gzip -d -c $(DL_DIR)/$(ZIC_SOURCE) \
-		| $(TAR) --strip-components=0 -C $(@D) -xf -
-endef
-
 define HOST_ZIC_BUILD_CMDS
 	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) zic
 endef
-- 
1.9.1

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

* [Buildroot] [PATCH 7/7] qpid-proton: new package
  2015-07-11 14:15 [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Luca Ceresoli
                   ` (4 preceding siblings ...)
  2015-07-11 14:15 ` [Buildroot] [PATCH 6/7] zic: " Luca Ceresoli
@ 2015-07-11 14:15 ` Luca Ceresoli
  2015-07-11 14:20   ` Luca Ceresoli
                     ` (2 more replies)
  2015-07-11 22:28 ` [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Arnout Vandecappelle
                   ` (3 subsequent siblings)
  9 siblings, 3 replies; 23+ messages in thread
From: Luca Ceresoli @ 2015-07-11 14:15 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/Config.in                                  |  1 +
 ...fix-C-compiler-detection-with-_ARG1-_ARG2.patch | 52 ++++++++++++++++++++++
 package/qpid-proton/Config.in                      | 17 +++++++
 package/qpid-proton/qpid-proton.hash               |  2 +
 package/qpid-proton/qpid-proton.mk                 | 28 ++++++++++++
 5 files changed, 100 insertions(+)
 create mode 100644 package/qpid-proton/0001-proton-c-fix-C-compiler-detection-with-_ARG1-_ARG2.patch
 create mode 100644 package/qpid-proton/Config.in
 create mode 100644 package/qpid-proton/qpid-proton.hash
 create mode 100644 package/qpid-proton/qpid-proton.mk

diff --git a/package/Config.in b/package/Config.in
index d9b07942791a..21ead51b3697 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -995,6 +995,7 @@ menu "Networking"
 	source "package/openpgm/Config.in"
 	source "package/ortp/Config.in"
 	source "package/qdecoder/Config.in"
+	source "package/qpid-proton/Config.in"
 	source "package/rtmpdump/Config.in"
 	source "package/slirp/Config.in"
 	source "package/snmppp/Config.in"
diff --git a/package/qpid-proton/0001-proton-c-fix-C-compiler-detection-with-_ARG1-_ARG2.patch b/package/qpid-proton/0001-proton-c-fix-C-compiler-detection-with-_ARG1-_ARG2.patch
new file mode 100644
index 000000000000..16f4aba52102
--- /dev/null
+++ b/package/qpid-proton/0001-proton-c-fix-C-compiler-detection-with-_ARG1-_ARG2.patch
@@ -0,0 +1,52 @@
+From f24be9ae9ab01c7507a366e9d5529c444f0b7edd Mon Sep 17 00:00:00 2001
+From: Luca Ceresoli <luca@lucaceresoli.net>
+Date: Fri, 10 Jul 2015 10:13:47 +0200
+Subject: [PATCH] proton-c: fix C compiler detection with _ARG1/_ARG2
+
+The C compiler commandline in CMake is composed by the concatenation of
+CMAKE_C_COMPILER + CMAKE_C_COMPILER_ARG1 + CMAKE_C_COMPILER_ARG2.
+
+In most use cases the two additional argument variables are empty, thus
+CMAKE_C_COMPILER can be used without any noticeable difference.
+
+The Buildroot embedded Linux build system [0], however, optionally exploits the
+CMAKE_C_COMPILER_ARG1 variable to speed up the cross-compilation of CMake-based
+packages using ccache. It does so by setting [1]:
+
+  CMAKE_C_COMPILER      = /path/to/ccache
+  CMAKE_C_COMPILER_ARG1 = /path/to/cross-gcc
+
+This works fine with other CMake-based packages, but proton-c's CMakeLists.txt
+calls gcc to extract the compiler version. It does so by calling
+"${CMAKE_C_COMPILER} -dumpversion", without honoring the two extra arguments.
+Within Buildroot with ccache enabled, this means calling
+"/path/to/ccache -dumpversion", which fails with the error:
+
+  ccache: invalid option -- 'd'
+
+Fix the compiler check by adding the two arguments.
+
+[0] http://buildroot.net/
+[1] http://git.buildroot.net/buildroot/tree/support/misc/toolchainfile.cmake.in?id=2015.05
+
+Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
+---
+ proton-c/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt
+index 93449a9..8c31a89 100644
+--- a/proton-c/CMakeLists.txt
++++ b/proton-c/CMakeLists.txt
+@@ -218,7 +218,7 @@ if (CMAKE_COMPILER_IS_GNUCC)
+     set (COMPILE_LANGUAGE_FLAGS "-std=c99")
+     set (COMPILE_PLATFORM_FLAGS "-std=gnu99")
+ 
+-    execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION
++    execute_process(COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} ${CMAKE_C_COMPILER_ARG2} -dumpversion OUTPUT_VARIABLE GCC_VERSION
+       OUTPUT_STRIP_TRAILING_WHITESPACE)
+     if (${GCC_VERSION} VERSION_LESS "4.3.0")
+       # Only a concern if contibuting code back.
+-- 
+1.9.1
+
diff --git a/package/qpid-proton/Config.in b/package/qpid-proton/Config.in
new file mode 100644
index 000000000000..b6a1aa9821a7
--- /dev/null
+++ b/package/qpid-proton/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_QPID_PROTON
+	bool "qpid-proton"
+	depends on BR2_USE_WCHAR # util-linux
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	help
+	  The AMQP messaging toolkit
+
+	  Qpid Proton is a high-performance, lightweight messaging library.
+	  It can be used in the widest range of messaging applications,
+	  including brokers, client libraries, routers, bridges, proxies, and
+	  more.
+
+	  https://qpid.apache.org/proton/
+
+comment "qpid-proton needs a toolchain w/ wchar"
+	depends on !BR2_USE_WCHAR
diff --git a/package/qpid-proton/qpid-proton.hash b/package/qpid-proton/qpid-proton.hash
new file mode 100644
index 000000000000..8c2cc4f3503d
--- /dev/null
+++ b/package/qpid-proton/qpid-proton.hash
@@ -0,0 +1,2 @@
+# Hash from: http://www.apache.org/dist/qpid/proton/0.9.1/qpid-proton-0.9.1.tar.gz.sha
+sha1  98008d90acd0d47cbd7ac1572a2bb50b452338ed  qpid-proton-0.9.1.tar.gz
diff --git a/package/qpid-proton/qpid-proton.mk b/package/qpid-proton/qpid-proton.mk
new file mode 100644
index 000000000000..8ff05a94f3d1
--- /dev/null
+++ b/package/qpid-proton/qpid-proton.mk
@@ -0,0 +1,28 @@
+################################################################################
+#
+# qpid-proton
+#
+################################################################################
+
+QPID_PROTON_VERSION_MAJOR = 0.9
+QPID_PROTON_VERSION = $(QPID_PROTON_VERSION_MAJOR).1
+QPID_PROTON_SITE = http://apache.panu.it/qpid/proton/0.9.1
+QPID_PROTON_STRIP_COMPONENTS = 2
+QPID_PROTON_LICENSE = Apache-2.0
+QPID_PROTON_LICENSE_FILES = LICENSE
+QPID_PROTON_INSTALL_STAGING = YES
+QPID_PROTON_DEPENDENCIES = \
+	util-linux \
+	$(if $(BR2_PACKAGE_OPENSSL),openssl,)
+QPID_PROTON_CONF_OPTS = \
+	-DBUILD_JAVA=OFF \
+	-DENABLE_VALGRIND=OFF \
+	-DENABLE_WARNING_ERROR=OFF
+
+define QPID_PROTON_REMOVE_EXAMPLES
+	rm -fr $(TARGET_DIR)/usr/share/proton-$(QPID_PROTON_VERSION_MAJOR)/examples
+endef
+
+QPID_PROTON_POST_INSTALL_TARGET_HOOKS += QPID_PROTON_REMOVE_EXAMPLES
+
+$(eval $(cmake-package))
-- 
1.9.1

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

* [Buildroot] [PATCH 7/7] qpid-proton: new package
  2015-07-11 14:15 ` [Buildroot] [PATCH 7/7] qpid-proton: new package Luca Ceresoli
@ 2015-07-11 14:20   ` Luca Ceresoli
  2015-07-11 23:22   ` Arnout Vandecappelle
  2015-07-12 12:41   ` Thomas Petazzoni
  2 siblings, 0 replies; 23+ messages in thread
From: Luca Ceresoli @ 2015-07-11 14:20 UTC (permalink / raw)
  To: buildroot

Hi,

sorry for having noticed only after sending, but this is a v2.

The rest of the series is brand new, so I forgot to mark only this patch
as v2...

BTW, I just marked the previously-sent patch as Superseded in patchwork.

Luca Ceresoli wrote:
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
>   package/Config.in                                  |  1 +
>   ...fix-C-compiler-detection-with-_ARG1-_ARG2.patch | 52 ++++++++++++++++++++++
>   package/qpid-proton/Config.in                      | 17 +++++++
>   package/qpid-proton/qpid-proton.hash               |  2 +
>   package/qpid-proton/qpid-proton.mk                 | 28 ++++++++++++
>   5 files changed, 100 insertions(+)
>   create mode 100644 package/qpid-proton/0001-proton-c-fix-C-compiler-detection-with-_ARG1-_ARG2.patch
>   create mode 100644 package/qpid-proton/Config.in
>   create mode 100644 package/qpid-proton/qpid-proton.hash
>   create mode 100644 package/qpid-proton/qpid-proton.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index d9b07942791a..21ead51b3697 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -995,6 +995,7 @@ menu "Networking"
>   	source "package/openpgm/Config.in"
>   	source "package/ortp/Config.in"
>   	source "package/qdecoder/Config.in"
> +	source "package/qpid-proton/Config.in"
>   	source "package/rtmpdump/Config.in"
>   	source "package/slirp/Config.in"
>   	source "package/snmppp/Config.in"
> diff --git a/package/qpid-proton/0001-proton-c-fix-C-compiler-detection-with-_ARG1-_ARG2.patch b/package/qpid-proton/0001-proton-c-fix-C-compiler-detection-with-_ARG1-_ARG2.patch
> new file mode 100644
> index 000000000000..16f4aba52102
> --- /dev/null
> +++ b/package/qpid-proton/0001-proton-c-fix-C-compiler-detection-with-_ARG1-_ARG2.patch
> @@ -0,0 +1,52 @@
> +From f24be9ae9ab01c7507a366e9d5529c444f0b7edd Mon Sep 17 00:00:00 2001
> +From: Luca Ceresoli <luca@lucaceresoli.net>
> +Date: Fri, 10 Jul 2015 10:13:47 +0200
> +Subject: [PATCH] proton-c: fix C compiler detection with _ARG1/_ARG2
> +
> +The C compiler commandline in CMake is composed by the concatenation of
> +CMAKE_C_COMPILER + CMAKE_C_COMPILER_ARG1 + CMAKE_C_COMPILER_ARG2.
> +
> +In most use cases the two additional argument variables are empty, thus
> +CMAKE_C_COMPILER can be used without any noticeable difference.
> +
> +The Buildroot embedded Linux build system [0], however, optionally exploits the
> +CMAKE_C_COMPILER_ARG1 variable to speed up the cross-compilation of CMake-based
> +packages using ccache. It does so by setting [1]:
> +
> +  CMAKE_C_COMPILER      = /path/to/ccache
> +  CMAKE_C_COMPILER_ARG1 = /path/to/cross-gcc
> +
> +This works fine with other CMake-based packages, but proton-c's CMakeLists.txt
> +calls gcc to extract the compiler version. It does so by calling
> +"${CMAKE_C_COMPILER} -dumpversion", without honoring the two extra arguments.
> +Within Buildroot with ccache enabled, this means calling
> +"/path/to/ccache -dumpversion", which fails with the error:
> +
> +  ccache: invalid option -- 'd'
> +
> +Fix the compiler check by adding the two arguments.
> +
> +[0] http://buildroot.net/
> +[1] http://git.buildroot.net/buildroot/tree/support/misc/toolchainfile.cmake.in?id=2015.05
> +
> +Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> +---
> + proton-c/CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt
> +index 93449a9..8c31a89 100644
> +--- a/proton-c/CMakeLists.txt
> ++++ b/proton-c/CMakeLists.txt
> +@@ -218,7 +218,7 @@ if (CMAKE_COMPILER_IS_GNUCC)
> +     set (COMPILE_LANGUAGE_FLAGS "-std=c99")
> +     set (COMPILE_PLATFORM_FLAGS "-std=gnu99")
> +
> +-    execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION
> ++    execute_process(COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} ${CMAKE_C_COMPILER_ARG2} -dumpversion OUTPUT_VARIABLE GCC_VERSION
> +       OUTPUT_STRIP_TRAILING_WHITESPACE)
> +     if (${GCC_VERSION} VERSION_LESS "4.3.0")
> +       # Only a concern if contibuting code back.
> +--
> +1.9.1
> +
> diff --git a/package/qpid-proton/Config.in b/package/qpid-proton/Config.in
> new file mode 100644
> index 000000000000..b6a1aa9821a7
> --- /dev/null
> +++ b/package/qpid-proton/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_PACKAGE_QPID_PROTON
> +	bool "qpid-proton"
> +	depends on BR2_USE_WCHAR # util-linux
> +	select BR2_PACKAGE_UTIL_LINUX
> +	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
> +	help
> +	  The AMQP messaging toolkit
> +
> +	  Qpid Proton is a high-performance, lightweight messaging library.
> +	  It can be used in the widest range of messaging applications,
> +	  including brokers, client libraries, routers, bridges, proxies, and
> +	  more.
> +
> +	  https://qpid.apache.org/proton/
> +
> +comment "qpid-proton needs a toolchain w/ wchar"
> +	depends on !BR2_USE_WCHAR
> diff --git a/package/qpid-proton/qpid-proton.hash b/package/qpid-proton/qpid-proton.hash
> new file mode 100644
> index 000000000000..8c2cc4f3503d
> --- /dev/null
> +++ b/package/qpid-proton/qpid-proton.hash
> @@ -0,0 +1,2 @@
> +# Hash from: http://www.apache.org/dist/qpid/proton/0.9.1/qpid-proton-0.9.1.tar.gz.sha
> +sha1  98008d90acd0d47cbd7ac1572a2bb50b452338ed  qpid-proton-0.9.1.tar.gz
> diff --git a/package/qpid-proton/qpid-proton.mk b/package/qpid-proton/qpid-proton.mk
> new file mode 100644
> index 000000000000..8ff05a94f3d1
> --- /dev/null
> +++ b/package/qpid-proton/qpid-proton.mk
> @@ -0,0 +1,28 @@
> +################################################################################
> +#
> +# qpid-proton
> +#
> +################################################################################
> +
> +QPID_PROTON_VERSION_MAJOR = 0.9
> +QPID_PROTON_VERSION = $(QPID_PROTON_VERSION_MAJOR).1
> +QPID_PROTON_SITE = http://apache.panu.it/qpid/proton/0.9.1
> +QPID_PROTON_STRIP_COMPONENTS = 2
> +QPID_PROTON_LICENSE = Apache-2.0
> +QPID_PROTON_LICENSE_FILES = LICENSE
> +QPID_PROTON_INSTALL_STAGING = YES
> +QPID_PROTON_DEPENDENCIES = \
> +	util-linux \
> +	$(if $(BR2_PACKAGE_OPENSSL),openssl,)
> +QPID_PROTON_CONF_OPTS = \
> +	-DBUILD_JAVA=OFF \
> +	-DENABLE_VALGRIND=OFF \
> +	-DENABLE_WARNING_ERROR=OFF
> +
> +define QPID_PROTON_REMOVE_EXAMPLES
> +	rm -fr $(TARGET_DIR)/usr/share/proton-$(QPID_PROTON_VERSION_MAJOR)/examples
> +endef
> +
> +QPID_PROTON_POST_INSTALL_TARGET_HOOKS += QPID_PROTON_REMOVE_EXAMPLES
> +
> +$(eval $(cmake-package))
>


-- 
Luca

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

* [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs
  2015-07-11 14:15 [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Luca Ceresoli
                   ` (5 preceding siblings ...)
  2015-07-11 14:15 ` [Buildroot] [PATCH 7/7] qpid-proton: new package Luca Ceresoli
@ 2015-07-11 22:28 ` Arnout Vandecappelle
  2015-07-11 22:52 ` Thomas Petazzoni
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 23+ messages in thread
From: Arnout Vandecappelle @ 2015-07-11 22:28 UTC (permalink / raw)
  To: buildroot

On 07/11/15 16:15, Luca Ceresoli wrote:
> Usually package tarballs contain only a directory named
> "<pkg-name>-<pkg-version>" which contains the actual source tree. To properly
> extract the source files in $(BUILD_DIR), Buildroot passes the
> --strip-components=1 option to tar.
> 
> Unfortunately a few packages ship in a non-standard way, with no root
> directory or with more than one. In Buildroot these packages must be handled by
> overriding the <PKG>_DOWNLOAD_CMDS.
> 
> As the number of such packages is growing, introduce a <PKG>_STRIP_COMPONENTS
> variable for packages to request a number of components to strip different
> from 1.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Arnout Vandecappelle <arnout@mind.be>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>


 Regards,
 Arnout

> ---
>  package/pkg-generic.mk | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 9fe01b8d4d12..8aad1b4acc23 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -322,6 +322,14 @@ ifndef $(2)_SUBDIR
>   endif
>  endif
>  
> +ifndef $(2)_STRIP_COMPONENTS
> + ifdef $(3)_STRIP_COMPONENTS
> +  $(2)_STRIP_COMPONENTS = $$($(3)_STRIP_COMPONENTS)
> + else
> +  $(2)_STRIP_COMPONENTS ?= 1
> + endif
> +endif
> +
>  $(2)_SRCDIR		       = $$($(2)_DIR)/$$($(2)_SUBDIR)
>  $(2)_BUILDDIR		       ?= $$($(2)_SRCDIR)
>  
> @@ -431,7 +439,7 @@ $(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
>  # default extract command
>  $(2)_EXTRACT_CMDS ?= \
>  	$$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $$(DL_DIR)/$$($(2)_SOURCE) | \
> -	$$(TAR) $$(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $$(TAR_OPTIONS) -)
> +	$$(TAR) $$(TAR_STRIP_COMPONENTS)=$$($(2)_STRIP_COMPONENTS) -C $$($(2)_DIR) $$(TAR_OPTIONS) -)
>  
>  # pre/post-steps hooks
>  $(2)_PRE_DOWNLOAD_HOOKS         ?=
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 2/7] docs/manual: document <PKG>_STRIP_COMPONENTS
  2015-07-11 14:15 ` [Buildroot] [PATCH 2/7] docs/manual: document <PKG>_STRIP_COMPONENTS Luca Ceresoli
@ 2015-07-11 22:29   ` Arnout Vandecappelle
  0 siblings, 0 replies; 23+ messages in thread
From: Arnout Vandecappelle @ 2015-07-11 22:29 UTC (permalink / raw)
  To: buildroot

On 07/11/15 16:15, Luca Ceresoli wrote:
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Arnout Vandecappelle <arnout@mind.be>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Although perhaps I shouldn't be doing this at this hour :-)

 Regards,
 Arnout

> ---
>  docs/manual/adding-packages-generic.txt | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
> index bc07667a01c8..4c12b42da862 100644
> --- a/docs/manual/adding-packages-generic.txt
> +++ b/docs/manual/adding-packages-generic.txt
> @@ -303,6 +303,15 @@ information is (assuming the package name is +libfoo+) :
>       the package source code. Buildroot copies the contents of the
>       source directory into the package's build directory.
>  
> +* +LIBFOO_STRIP_COMPONENTS+ is the number of leading components
> +  (directories) that tar must strip from file names on extraction.
> +  The tarball for most packages has one leading component named
> +  "<pkg-name>-<pkg-version>", thus Buildroot passes
> +  --strip-components=1 to tar to remove it.
> +  For non-standard packages that don't have this component, or
> +  that have more than one leading component to strip, set this
> +  variable with the value to be passed to tar. Default: 1.
> +
>  * +LIBFOO_DEPENDENCIES+ lists the dependencies (in terms of package
>    name) that are required for the current target package to
>    compile. These dependencies are guaranteed to be compiled and
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 3/7] intel-microcode: use <PKG>_STRIP_COMPONENTS
  2015-07-11 14:15 ` [Buildroot] [PATCH 3/7] intel-microcode: use <PKG>_STRIP_COMPONENTS Luca Ceresoli
@ 2015-07-11 22:30   ` Arnout Vandecappelle
  0 siblings, 0 replies; 23+ messages in thread
From: Arnout Vandecappelle @ 2015-07-11 22:30 UTC (permalink / raw)
  To: buildroot

On 07/11/15 16:15, Luca Ceresoli wrote:
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> ---
>  package/intel-microcode/intel-microcode.mk | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/package/intel-microcode/intel-microcode.mk b/package/intel-microcode/intel-microcode.mk
> index 4e8ea906c624..23c4b3ebfb47 100644
> --- a/package/intel-microcode/intel-microcode.mk
> +++ b/package/intel-microcode/intel-microcode.mk
> @@ -7,17 +7,17 @@
>  INTEL_MICROCODE_VERSION = 20150107
>  INTEL_MICROCODE_SOURCE = microcode-$(INTEL_MICROCODE_VERSION).tgz
>  INTEL_MICROCODE_SITE = http://downloadmirror.intel.com/24616/eng
> +INTEL_MICROCODE_STRIP_COMPONENTS = 0
>  INTEL_MICROCODE_LICENSE = PROPRIETARY
>  INTEL_MICROCODE_LICENSE_FILES = license.txt
>  INTEL_MICROCODE_REDISTRIBUTE = NO
>  
> -# N.B. Don't strip any path components during extraction.
> -define INTEL_MICROCODE_EXTRACT_CMDS
> -	gzip -d -c $(DL_DIR)/$(INTEL_MICROCODE_SOURCE) | \
> -	tar --strip-components=0 -C $(@D) -xf -
> +define INTEL_MICROCODE_EXTRACT_LICENSE
>  	head -n 33 $(@D)/microcode.dat > $(@D)/license.txt
>  endef
>  
> +INTEL_MICROCODE_POST_EXTRACT_HOOKS += INTEL_MICROCODE_EXTRACT_LICENSE
> +
>  define INTEL_MICROCODE_INSTALL_TARGET_CMDS
>  	$(INSTALL) -D -m 0644 $(@D)/microcode.dat \
>  		$(TARGET_DIR)/usr/share/misc/intel-microcode.dat
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 4/7] nanocom: use <PKG>_STRIP_COMPONENTS
  2015-07-11 14:15 ` [Buildroot] [PATCH 4/7] nanocom: " Luca Ceresoli
@ 2015-07-11 22:30   ` Arnout Vandecappelle
  0 siblings, 0 replies; 23+ messages in thread
From: Arnout Vandecappelle @ 2015-07-11 22:30 UTC (permalink / raw)
  To: buildroot

On 07/11/15 16:15, Luca Ceresoli wrote:
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> ---
>  package/nanocom/nanocom.mk | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/package/nanocom/nanocom.mk b/package/nanocom/nanocom.mk
> index f723951281f7..293dd091fc9d 100644
> --- a/package/nanocom/nanocom.mk
> +++ b/package/nanocom/nanocom.mk
> @@ -7,14 +7,10 @@
>  NANOCOM_VERSION = 1.0
>  NANOCOM_SOURCE = nanocom.tar.gz
>  NANOCOM_SITE = http://downloads.sourceforge.net/project/nanocom/nanocom/v$(NANOCOM_VERSION)
> +NANOCOM_STRIP_COMPONENTS = 0
>  NANOCOM_LICENSE = GPLv2+
>  NANOCOM_LICENSE_FILES = COPYING
>  
> -# N.B. Don't strip any path components during extraction.
> -define NANOCOM_EXTRACT_CMDS
> -	gzip -d -c $(DL_DIR)/$(NANOCOM_SOURCE) | tar --strip-components=0 -C $(NANOCOM_DIR) -xf -
> -endef
> -
>  define NANOCOM_BUILD_CMDS
>  	$(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" -C $(@D)
>  endef
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 5/7] tzdata: use <PKG>_STRIP_COMPONENTS
  2015-07-11 14:15 ` [Buildroot] [PATCH 5/7] tzdata: " Luca Ceresoli
@ 2015-07-11 22:36   ` Arnout Vandecappelle
  2015-07-12 12:22   ` Arnout Vandecappelle
  1 sibling, 0 replies; 23+ messages in thread
From: Arnout Vandecappelle @ 2015-07-11 22:36 UTC (permalink / raw)
  To: buildroot

On 07/11/15 16:15, Luca Ceresoli wrote:
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> ---
>  package/tzdata/tzdata.mk | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
> index eb6da6ce3375..c38d4fe8cd2b 100644
> --- a/package/tzdata/tzdata.mk
> +++ b/package/tzdata/tzdata.mk
> @@ -7,6 +7,7 @@
>  TZDATA_VERSION = 2015e
>  TZDATA_SOURCE = tzdata$(TZDATA_VERSION).tar.gz
>  TZDATA_SITE = ftp://ftp.iana.org/tz/releases
> +TZDATA_STRIP_COMPONENTS = 0
>  TZDATA_DEPENDENCIES = host-tzdata
>  HOST_TZDATA_DEPENDENCIES = host-zic
>  TZDATA_LICENSE = Public domain
> @@ -45,11 +46,6 @@ define TZDATA_INSTALL_TARGET_CMDS
>  	fi
>  endef
>  
> -define HOST_TZDATA_EXTRACT_CMDS
> -	gzip -d -c $(DL_DIR)/$(TZDATA_SOURCE) \
> -		| $(TAR) --strip-components=0 -C $(@D) -xf -
> -endef
> -
>  define HOST_TZDATA_BUILD_CMDS
>  	(cd $(@D); \
>  		for zone in $(TZDATA_ZONELIST); do \
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 6/7] zic: use <PKG>_STRIP_COMPONENTS
  2015-07-11 14:15 ` [Buildroot] [PATCH 6/7] zic: " Luca Ceresoli
@ 2015-07-11 22:40   ` Arnout Vandecappelle
  0 siblings, 0 replies; 23+ messages in thread
From: Arnout Vandecappelle @ 2015-07-11 22:40 UTC (permalink / raw)
  To: buildroot

On 07/11/15 16:15, Luca Ceresoli wrote:
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> ---
>  package/zic/zic.mk | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/package/zic/zic.mk b/package/zic/zic.mk
> index a768ac6cfd59..03e023ae4ff4 100644
> --- a/package/zic/zic.mk
> +++ b/package/zic/zic.mk
> @@ -7,14 +7,9 @@
>  ZIC_VERSION = 2015e
>  ZIC_SOURCE = tzcode$(ZIC_VERSION).tar.gz
>  ZIC_SITE = ftp://ftp.iana.org/tz/releases
> +ZIC_STRIP_COMPONENTS = 0
>  ZIC_LICENSE = Public domain
>  
> -# Don't strip any path components during extraction.
> -define HOST_ZIC_EXTRACT_CMDS
> -	gzip -d -c $(DL_DIR)/$(ZIC_SOURCE) \
> -		| $(TAR) --strip-components=0 -C $(@D) -xf -
> -endef
> -
>  define HOST_ZIC_BUILD_CMDS
>  	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) zic
>  endef
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs
  2015-07-11 14:15 [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Luca Ceresoli
                   ` (6 preceding siblings ...)
  2015-07-11 22:28 ` [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Arnout Vandecappelle
@ 2015-07-11 22:52 ` Thomas Petazzoni
  2015-07-11 22:56 ` Arnout Vandecappelle
  2015-07-12 11:44 ` Thomas Petazzoni
  9 siblings, 0 replies; 23+ messages in thread
From: Thomas Petazzoni @ 2015-07-11 22:52 UTC (permalink / raw)
  To: buildroot

Dear Luca Ceresoli,

On Sat, 11 Jul 2015 16:15:04 +0200, Luca Ceresoli wrote:
> Usually package tarballs contain only a directory named
> "<pkg-name>-<pkg-version>" which contains the actual source tree. To properly
> extract the source files in $(BUILD_DIR), Buildroot passes the
> --strip-components=1 option to tar.
> 
> Unfortunately a few packages ship in a non-standard way, with no root
> directory or with more than one. In Buildroot these packages must be handled by
> overriding the <PKG>_DOWNLOAD_CMDS.
> 
> As the number of such packages is growing, introduce a <PKG>_STRIP_COMPONENTS
> variable for packages to request a number of components to strip different
> from 1.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> ---
>  package/pkg-generic.mk | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)

Patches 1 to 6 applied.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs
  2015-07-11 14:15 [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Luca Ceresoli
                   ` (7 preceding siblings ...)
  2015-07-11 22:52 ` Thomas Petazzoni
@ 2015-07-11 22:56 ` Arnout Vandecappelle
  2015-07-12 14:26   ` Luca Ceresoli
  2015-07-12 11:44 ` Thomas Petazzoni
  9 siblings, 1 reply; 23+ messages in thread
From: Arnout Vandecappelle @ 2015-07-11 22:56 UTC (permalink / raw)
  To: buildroot

 Since the cover letter is missing, I'll reply to this one...

On 07/11/15 16:15, Luca Ceresoli wrote:
> Usually package tarballs contain only a directory named
> "<pkg-name>-<pkg-version>" which contains the actual source tree. To properly
> extract the source files in $(BUILD_DIR), Buildroot passes the
> --strip-components=1 option to tar.

 Great work.

 I think the following packages could also be converted:

flite
nvidia-tegra23-codecs

but admittedly, they look a little more complicated.

 Regards,
 Arnout



-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 7/7] qpid-proton: new package
  2015-07-11 14:15 ` [Buildroot] [PATCH 7/7] qpid-proton: new package Luca Ceresoli
  2015-07-11 14:20   ` Luca Ceresoli
@ 2015-07-11 23:22   ` Arnout Vandecappelle
  2015-07-12 13:34     ` Luca Ceresoli
  2015-07-12 12:41   ` Thomas Petazzoni
  2 siblings, 1 reply; 23+ messages in thread
From: Arnout Vandecappelle @ 2015-07-11 23:22 UTC (permalink / raw)
  To: buildroot

On 07/11/15 16:15, Luca Ceresoli wrote:
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>

 What's the upstream status of the patch?

 One more comment below:

[snip]
> diff --git a/package/qpid-proton/qpid-proton.hash b/package/qpid-proton/qpid-proton.hash
> new file mode 100644
> index 000000000000..8c2cc4f3503d
> --- /dev/null
> +++ b/package/qpid-proton/qpid-proton.hash
> @@ -0,0 +1,2 @@
> +# Hash from: http://www.apache.org/dist/qpid/proton/0.9.1/qpid-proton-0.9.1.tar.gz.sha
> +sha1  98008d90acd0d47cbd7ac1572a2bb50b452338ed  qpid-proton-0.9.1.tar.gz
> diff --git a/package/qpid-proton/qpid-proton.mk b/package/qpid-proton/qpid-proton.mk
> new file mode 100644
> index 000000000000..8ff05a94f3d1
> --- /dev/null
> +++ b/package/qpid-proton/qpid-proton.mk
> @@ -0,0 +1,28 @@
> +################################################################################
> +#
> +# qpid-proton
> +#
> +################################################################################
> +
> +QPID_PROTON_VERSION_MAJOR = 0.9
> +QPID_PROTON_VERSION = $(QPID_PROTON_VERSION_MAJOR).1
> +QPID_PROTON_SITE = http://apache.panu.it/qpid/proton/0.9.1

 Use _VERSION here.

> +QPID_PROTON_STRIP_COMPONENTS = 2
> +QPID_PROTON_LICENSE = Apache-2.0
> +QPID_PROTON_LICENSE_FILES = LICENSE
> +QPID_PROTON_INSTALL_STAGING = YES
> +QPID_PROTON_DEPENDENCIES = \
> +	util-linux \
> +	$(if $(BR2_PACKAGE_OPENSSL),openssl,)

 The final , is not needed.

> +QPID_PROTON_CONF_OPTS = \
> +	-DBUILD_JAVA=OFF \
> +	-DENABLE_VALGRIND=OFF \
> +	-DENABLE_WARNING_ERROR=OFF
> +
> +define QPID_PROTON_REMOVE_EXAMPLES
> +	rm -fr $(TARGET_DIR)/usr/share/proton-$(QPID_PROTON_VERSION_MAJOR)/examples

 To avoid the need for defining _MAJOR (which is a pain IMHO), you could just do
proton-*/examples.

 Regards,
 Arnout

> +endef
> +
> +QPID_PROTON_POST_INSTALL_TARGET_HOOKS += QPID_PROTON_REMOVE_EXAMPLES
> +
> +$(eval $(cmake-package))
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs
  2015-07-11 14:15 [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Luca Ceresoli
                   ` (8 preceding siblings ...)
  2015-07-11 22:56 ` Arnout Vandecappelle
@ 2015-07-12 11:44 ` Thomas Petazzoni
  2015-07-12 13:30   ` Luca Ceresoli
  9 siblings, 1 reply; 23+ messages in thread
From: Thomas Petazzoni @ 2015-07-12 11:44 UTC (permalink / raw)
  To: buildroot

Dear Luca Ceresoli,

On Sat, 11 Jul 2015 16:15:04 +0200, Luca Ceresoli wrote:
> Usually package tarballs contain only a directory named
> "<pkg-name>-<pkg-version>" which contains the actual source tree. To properly
> extract the source files in $(BUILD_DIR), Buildroot passes the
> --strip-components=1 option to tar.
> 
> Unfortunately a few packages ship in a non-standard way, with no root
> directory or with more than one. In Buildroot these packages must be handled by
> overriding the <PKG>_DOWNLOAD_CMDS.
> 
> As the number of such packages is growing, introduce a <PKG>_STRIP_COMPONENTS
> variable for packages to request a number of components to strip different
> from 1.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> ---
>  package/pkg-generic.mk | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)

This actually triggered a failure in the build of the tar package:

   http://autobuild.buildroot.org/results/ae2/ae20df67f99f75b1ba5d5b7316ad265d66f3aa66/build-end.log

We have already fixed it, it was quite interesting:

   http://git.buildroot.net/buildroot/commit/?id=ef7cc99c7a432aa3929015183f7c7476b7cd1b68

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 5/7] tzdata: use <PKG>_STRIP_COMPONENTS
  2015-07-11 14:15 ` [Buildroot] [PATCH 5/7] tzdata: " Luca Ceresoli
  2015-07-11 22:36   ` Arnout Vandecappelle
@ 2015-07-12 12:22   ` Arnout Vandecappelle
  1 sibling, 0 replies; 23+ messages in thread
From: Arnout Vandecappelle @ 2015-07-12 12:22 UTC (permalink / raw)
  To: buildroot

On 07/11/15 16:15, Luca Ceresoli wrote:
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> ---
>  package/tzdata/tzdata.mk | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk
> index eb6da6ce3375..c38d4fe8cd2b 100644
> --- a/package/tzdata/tzdata.mk
> +++ b/package/tzdata/tzdata.mk
> @@ -7,6 +7,7 @@
>  TZDATA_VERSION = 2015e
>  TZDATA_SOURCE = tzdata$(TZDATA_VERSION).tar.gz
>  TZDATA_SITE = ftp://ftp.iana.org/tz/releases
> +TZDATA_STRIP_COMPONENTS = 0
>  TZDATA_DEPENDENCIES = host-tzdata
>  HOST_TZDATA_DEPENDENCIES = host-zic
>  TZDATA_LICENSE = Public domain
> @@ -45,11 +46,6 @@ define TZDATA_INSTALL_TARGET_CMDS
>  	fi
>  endef
>  
> -define HOST_TZDATA_EXTRACT_CMDS
> -	gzip -d -c $(DL_DIR)/$(TZDATA_SOURCE) \
> -		| $(TAR) --strip-components=0 -C $(@D) -xf -
> -endef
> -
>  define HOST_TZDATA_BUILD_CMDS
>  	(cd $(@D); \
>  		for zone in $(TZDATA_ZONELIST); do \
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 7/7] qpid-proton: new package
  2015-07-11 14:15 ` [Buildroot] [PATCH 7/7] qpid-proton: new package Luca Ceresoli
  2015-07-11 14:20   ` Luca Ceresoli
  2015-07-11 23:22   ` Arnout Vandecappelle
@ 2015-07-12 12:41   ` Thomas Petazzoni
  2 siblings, 0 replies; 23+ messages in thread
From: Thomas Petazzoni @ 2015-07-12 12:41 UTC (permalink / raw)
  To: buildroot

Dear Luca Ceresoli,

On Sat, 11 Jul 2015 16:15:10 +0200, Luca Ceresoli wrote:
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
>  package/Config.in                                  |  1 +
>  ...fix-C-compiler-detection-with-_ARG1-_ARG2.patch | 52 ++++++++++++++++++++++
>  package/qpid-proton/Config.in                      | 17 +++++++
>  package/qpid-proton/qpid-proton.hash               |  2 +
>  package/qpid-proton/qpid-proton.mk                 | 28 ++++++++++++
>  5 files changed, 100 insertions(+)
>  create mode 100644 package/qpid-proton/0001-proton-c-fix-C-compiler-detection-with-_ARG1-_ARG2.patch
>  create mode 100644 package/qpid-proton/Config.in
>  create mode 100644 package/qpid-proton/qpid-proton.hash
>  create mode 100644 package/qpid-proton/qpid-proton.mk

Applied after doing a bunch of fixes:

    [Thomas:
       - Do not define QPID_PROTON_VERSION_MAJOR, and use proto-* instead,
         as suggested by Arnout.
       - Use QPID_PROTO_VERSION in QPID_PROTON_SITE, as suggested by
         Arnout
       - Remove useless comma in the openssl test, as suggested by Arnout
       - Change the post install target hook to remove the
         /usr/share/proton-*/ directory entirely, and not just the
         examples, since it only contains some license and documentation
         files.]

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs
  2015-07-12 11:44 ` Thomas Petazzoni
@ 2015-07-12 13:30   ` Luca Ceresoli
  0 siblings, 0 replies; 23+ messages in thread
From: Luca Ceresoli @ 2015-07-12 13:30 UTC (permalink / raw)
  To: buildroot

Dear Thomas,

Thomas Petazzoni wrote:
> Dear Luca Ceresoli,
>
> On Sat, 11 Jul 2015 16:15:04 +0200, Luca Ceresoli wrote:
>> Usually package tarballs contain only a directory named
>> "<pkg-name>-<pkg-version>" which contains the actual source tree. To properly
>> extract the source files in $(BUILD_DIR), Buildroot passes the
>> --strip-components=1 option to tar.
>>
>> Unfortunately a few packages ship in a non-standard way, with no root
>> directory or with more than one. In Buildroot these packages must be handled by
>> overriding the <PKG>_DOWNLOAD_CMDS.
>>
>> As the number of such packages is growing, introduce a <PKG>_STRIP_COMPONENTS
>> variable for packages to request a number of components to strip different
>> from 1.
>>
>> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
>> Cc: Arnout Vandecappelle <arnout@mind.be>
>> ---
>>   package/pkg-generic.mk | 10 +++++++++-
>>   1 file changed, 9 insertions(+), 1 deletion(-)
>
> This actually triggered a failure in the build of the tar package:
>
>     http://autobuild.buildroot.org/results/ae2/ae20df67f99f75b1ba5d5b7316ad265d66f3aa66/build-end.log
>
> We have already fixed it, it was quite interesting:
>
>     http://git.buildroot.net/buildroot/commit/?id=ef7cc99c7a432aa3929015183f7c7476b7cd1b68

Ouch. O:-)

Thanks for fixing it so quickly!

-- 
Luca

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

* [Buildroot] [PATCH 7/7] qpid-proton: new package
  2015-07-11 23:22   ` Arnout Vandecappelle
@ 2015-07-12 13:34     ` Luca Ceresoli
  0 siblings, 0 replies; 23+ messages in thread
From: Luca Ceresoli @ 2015-07-12 13:34 UTC (permalink / raw)
  To: buildroot

Dear Arnout, Thomas,

Arnout Vandecappelle wrote:
> On 07/11/15 16:15, Luca Ceresoli wrote:
>> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
>
>   What's the upstream status of the patch?

It's upstream [0], sorry for not having mentioned it in the patch
submission.

The rest of your comments have already been taken into account by Thomas
while committing. Thanks, Thomas.

[0] 
https://github.com/apache/qpid-proton/commit/ed8e0144a4fccec6d5270198d2dc3aa3e9b22b4b

-- 
Luca

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

* [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs
  2015-07-11 22:56 ` Arnout Vandecappelle
@ 2015-07-12 14:26   ` Luca Ceresoli
  0 siblings, 0 replies; 23+ messages in thread
From: Luca Ceresoli @ 2015-07-12 14:26 UTC (permalink / raw)
  To: buildroot

Dear Arnout,

Arnout Vandecappelle wrote:
>   Since the cover letter is missing, I'll reply to this one...
>
> On 07/11/15 16:15, Luca Ceresoli wrote:
>> Usually package tarballs contain only a directory named
>> "<pkg-name>-<pkg-version>" which contains the actual source tree. To properly
>> extract the source files in $(BUILD_DIR), Buildroot passes the
>> --strip-components=1 option to tar.
>
>   Great work.
>
>   I think the following packages could also be converted:
>
> flite

I gave it a try. Here it is, http://patchwork.ozlabs.org/patch/494116/
but I'm not sure it's exactly a lovely patch...

-- 
Luca

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

end of thread, other threads:[~2015-07-12 14:26 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-11 14:15 [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Luca Ceresoli
2015-07-11 14:15 ` [Buildroot] [PATCH 2/7] docs/manual: document <PKG>_STRIP_COMPONENTS Luca Ceresoli
2015-07-11 22:29   ` Arnout Vandecappelle
2015-07-11 14:15 ` [Buildroot] [PATCH 3/7] intel-microcode: use <PKG>_STRIP_COMPONENTS Luca Ceresoli
2015-07-11 22:30   ` Arnout Vandecappelle
2015-07-11 14:15 ` [Buildroot] [PATCH 4/7] nanocom: " Luca Ceresoli
2015-07-11 22:30   ` Arnout Vandecappelle
2015-07-11 14:15 ` [Buildroot] [PATCH 5/7] tzdata: " Luca Ceresoli
2015-07-11 22:36   ` Arnout Vandecappelle
2015-07-12 12:22   ` Arnout Vandecappelle
2015-07-11 14:15 ` [Buildroot] [PATCH 6/7] zic: " Luca Ceresoli
2015-07-11 22:40   ` Arnout Vandecappelle
2015-07-11 14:15 ` [Buildroot] [PATCH 7/7] qpid-proton: new package Luca Ceresoli
2015-07-11 14:20   ` Luca Ceresoli
2015-07-11 23:22   ` Arnout Vandecappelle
2015-07-12 13:34     ` Luca Ceresoli
2015-07-12 12:41   ` Thomas Petazzoni
2015-07-11 22:28 ` [Buildroot] [PATCH 1/7] Add <PKG>_STRIP_COMPONENTS for packages with non-standard tarballs Arnout Vandecappelle
2015-07-11 22:52 ` Thomas Petazzoni
2015-07-11 22:56 ` Arnout Vandecappelle
2015-07-12 14:26   ` Luca Ceresoli
2015-07-12 11:44 ` Thomas Petazzoni
2015-07-12 13:30   ` Luca Ceresoli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox