All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 01/10] package/waf: new host package
  2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
@ 2016-10-30 16:02 ` Yann E. MORIN
  2016-10-30 16:21   ` Romain Naour
  2016-12-02 22:55   ` Thomas Petazzoni
  2016-10-30 16:02 ` [Buildroot] [PATCH 02/10] core: add waf-package infra Yann E. MORIN
                   ` (10 subsequent siblings)
  11 siblings, 2 replies; 38+ messages in thread
From: Yann E. MORIN @ 2016-10-30 16:02 UTC (permalink / raw)
  To: buildroot

host-waf will be used by waf-based packages that do not include it in
their release tarballs, like mpv.

mpv is currently the only case we have, but with the upcoming
waf-package infra, having host-waf available just makes the infra
complete from the onset.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@openwide.fr>
---
 package/waf/waf.hash |  3 +++
 package/waf/waf.mk   | 28 ++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 package/waf/waf.hash
 create mode 100644 package/waf/waf.mk

diff --git a/package/waf/waf.hash b/package/waf/waf.hash
new file mode 100644
index 0000000..9d610b2
--- /dev/null
+++ b/package/waf/waf.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha1    33d170c738ed8c92dda2945b445272972f558244                          waf-1.9.5
+sha256  101f14e0f47a6410c00b8feda094948516cd3989491c56eb8268907fcd164909  waf-1.9.5
diff --git a/package/waf/waf.mk b/package/waf/waf.mk
new file mode 100644
index 0000000..cd0c67e
--- /dev/null
+++ b/package/waf/waf.mk
@@ -0,0 +1,28 @@
+################################################################################
+#
+# waf
+#
+################################################################################
+
+WAF_VERSION = 1.9.5
+WAF_SOURCE = waf-$(WAF_VERSION)
+WAF_SITE = https://waf.io/
+
+# Waf is a python script, compatible with any python >= 2.6, but some
+# packages have wafscripts not compatible with python3. So always use
+# python2.
+#
+# We don't really need host-python to install host-waf, but having this
+# dependency here will hide it from packages themselves
+HOST_WAF_DEPENDENCIES = host-python
+
+# Not really needed, but here for consistency with other packages.
+define HOST_WAF_EXTRACT_CMDS
+	$(INSTALL) -D -m 0755 $(DL_DIR)/waf-$(WAF_VERSION) $(@D)/waf
+endef
+
+define HOST_WAF_INSTALL_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/waf $(HOST_DIR)/usr/bin/waf
+endef
+
+$(eval $(host-generic-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 02/10] core: add waf-package infra
  2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
  2016-10-30 16:02 ` [Buildroot] [PATCH 01/10] package/waf: new host package Yann E. MORIN
@ 2016-10-30 16:02 ` Yann E. MORIN
  2016-10-30 16:30   ` Romain Naour
                     ` (2 more replies)
  2016-10-30 16:02 ` [Buildroot] [PATCH 03/10] docs/manual: document the " Yann E. MORIN
                   ` (9 subsequent siblings)
  11 siblings, 3 replies; 38+ messages in thread
From: Yann E. MORIN @ 2016-10-30 16:02 UTC (permalink / raw)
  To: buildroot

This new waf-package infrastructure simplifies writing waf-based
packages. It can be used by our six current such packages, plus a
later-incoming one by Romain.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@openwide.fr>
---
 package/Makefile.in |   1 +
 package/pkg-waf.mk  | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 120 insertions(+)
 create mode 100644 package/pkg-waf.mk

diff --git a/package/Makefile.in b/package/Makefile.in
index 5d591e9..dd18d2b 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -398,3 +398,4 @@ include package/pkg-generic.mk
 include package/pkg-kconfig.mk
 include package/pkg-rebar.mk
 include package/pkg-kernel-module.mk
+include package/pkg-waf.mk
diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
new file mode 100644
index 0000000..b36f47a
--- /dev/null
+++ b/package/pkg-waf.mk
@@ -0,0 +1,119 @@
+################################################################################
+# WAF package infrastructure
+#
+# This file implements an infrastructure that eases development of package
+# .mk files for WAF packages. It should be used for all packages that use
+# WAF as their build system.
+#
+# See the Buildroot documentation for details on the usage of this
+# infrastructure
+#
+# In terms of implementation, this WAF infrastructure requires the .mk file
+# to only specify metadata information about the package: name, version,
+# download URL, etc.
+#
+# We still allow the package .mk file to override what the different steps
+# are doing, if needed. For example, if <PKG>_BUILD_CMDS is already defined,
+# it is used as the list of commands to perform to build the package,
+# instead of the default WAF behaviour. The package can also define some
+# post operation hooks.
+#
+################################################################################
+
+################################################################################
+# inner-waf-package -- defines how the configuration, compilation and
+# installation of a waf package should be done, implements a few hooks
+# to tune the build process for waf specifities and calls the generic
+# package infrastructure to generate the necessary make targets
+#
+#  argument 1 is the lowercase package name
+#  argument 2 is the uppercase package name, including a HOST_ prefix
+#             for host packages
+#  argument 3 is the uppercase package name, without the HOST_ prefix
+#             for host packages
+#  argument 4 is the type (target or host)
+################################################################################
+
+define inner-waf-package
+
+# If the package does not have its own waf, use our own.
+ifeq ($$($(2)_BUNDLED_WAF),NO)
+# Dependency on host-python is done by host-waf
+$(2)_DEPENDENCIES += host-waf
+$(2)_WAF = $(HOST_DIR)/usr/bin/waf
+else
+# We need host-python to run the package's waf
+$(2)_DEPENDENCIES += host-python
+$(2)_WAF = ./waf
+endif
+
+ifndef $(2)_MAKE
+ ifdef $(3)_MAKE
+  $(2)_MAKE = $$($(3)_MAKE)
+ else
+  $(2)_MAKE ?= $$(MAKE)
+ endif
+endif
+
+#
+# Configure step. Only define it if not already defined by the package
+# .mk file.
+#
+ifndef $(2)_CONFIGURE_CMDS
+define $(2)_CONFIGURE_CMDS
+	cd $$(@D) && \
+	$$(TARGET_CONFIGURE_OPTS) \
+	$$($(2)_CONF_ENV) \
+	$$(HOST_DIR)/usr/bin/python2 $$($(2)_WAF) configure \
+		--prefix=/usr \
+		--libdir=/usr/lib \
+		$$($(2)_CONF_OPTS)
+endef
+endif
+
+#
+# Build step. Only define it if not already defined by the package .mk
+# file.
+#
+ifndef $(2)_BUILD_CMDS
+define $(2)_BUILD_CMDS
+	cd $$(@D) && \
+	$$(TARGET_MAKE_ENV) $$(HOST_DIR)/usr/bin/python2 $$($(2)_WAF) build -j $$(PARALLEL_JOBS)
+endef
+endif
+
+#
+# Staging installation step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_INSTALL_STAGING_CMDS
+define $(2)_INSTALL_STAGING_CMDS
+	cd $$(@D) && \
+	$$(TARGET_MAKE_ENV) $$(HOST_DIR)/usr/bin/python2 $$($(2)_WAF) \
+		install --destdir=$$(STAGING_DIR)
+endef
+endif
+
+#
+# Target installation step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_INSTALL_TARGET_CMDS
+define $(2)_INSTALL_TARGET_CMDS
+	cd $$(@D) && \
+	$$(TARGET_MAKE_ENV) $$(HOST_DIR)/usr/bin/python2 $$($(2)_WAF) \
+		install --destdir=$$(TARGET_DIR)
+endef
+endif
+
+# Call the generic package infrastructure to generate the necessary
+# make targets
+$(call inner-generic-package,$(1),$(2),$(3),$(4))
+
+endef
+
+################################################################################
+# waf-package -- the target generator macro for WAF packages
+################################################################################
+
+waf-package = $(call inner-waf-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
-- 
2.7.4

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

* [Buildroot] [PATCH 03/10] docs/manual: document the waf-package infra
  2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
  2016-10-30 16:02 ` [Buildroot] [PATCH 01/10] package/waf: new host package Yann E. MORIN
  2016-10-30 16:02 ` [Buildroot] [PATCH 02/10] core: add waf-package infra Yann E. MORIN
@ 2016-10-30 16:02 ` Yann E. MORIN
  2016-10-30 16:31   ` Romain Naour
                     ` (2 more replies)
  2016-10-30 16:02 ` [Buildroot] [PATCH 04/10] developpers: add myself as pkg-waf devel Yann E. MORIN
                   ` (8 subsequent siblings)
  11 siblings, 3 replies; 38+ messages in thread
From: Yann E. MORIN @ 2016-10-30 16:02 UTC (permalink / raw)
  To: buildroot

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@openwide.fr>
---
 docs/manual/adding-packages-waf.txt | 67 +++++++++++++++++++++++++++++++++++++
 docs/manual/adding-packages.txt     |  2 ++
 2 files changed, 69 insertions(+)
 create mode 100644 docs/manual/adding-packages-waf.txt

diff --git a/docs/manual/adding-packages-waf.txt b/docs/manual/adding-packages-waf.txt
new file mode 100644
index 0000000..31c7167
--- /dev/null
+++ b/docs/manual/adding-packages-waf.txt
@@ -0,0 +1,67 @@
+// -*- mode:doc; -*-
+// vim: set syntax=asciidoc:
+
+=== Infrastructure for Waf-based packages
+
+[[waf-package-tutorial]]
+
+==== +waf-package+ tutorial
+
+First, let's see how to write a +.mk+ file for a Waf-based package, with
+an example :
+
+------------------------
+01: ################################################################################
+02: #
+03: # libfoo
+04: #
+05: ################################################################################
+06:
+07: LIBFOO_VERSION = 1.0
+08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
+09: LIBFOO_SITE = http://www.foosoftware.org/download
+10: LIBFOO_CONF_OPTS = --eanble-bar --disable-baz
+11: LIBFOO_DEPENDENCIES = bar
+12:
+13: $(eval $(waf-package))
+------------------------
+
+On line 7, we declare the version of the package.
+
+On line 8 and 9, we declare the name of the tarball (xz-ed tarball
+recommended) and the location of the tarball on the Web. Buildroot
+will automatically download the tarball from this location.
+
+On line 10, we tell Buildroot what options to enable for libfoo.
+
+On line 11, we tell Buildroot the depednencies of libfoo.
+
+Finally, on line line 13, we invoke the +waf-package+
+macro that generates all the Makefile rules that actually allows the
+package to be built.
+
+[[waf-package-reference]]
+
+==== +waf-package+ reference
+
+The main macro of the Waf package infrastructure is +waf-package+.
+It is similar to the +generic-package+ macro.
+
+Just like the generic infrastructure, the Waf infrastructure works
+by defining a number of variables before calling the +waf-package+
+macro.
+
+First, all the package metadata information variables that exist in
+the generic infrastructure also exist in the Waf infrastructure:
++LIBFOO_VERSION+, +LIBFOO_SOURCE+, +LIBFOO_PATCH+, +LIBFOO_SITE+,
++LIBFOO_SUBDIR+, +LIBFOO_DEPENDENCIES+, +LIBFOO_INSTALL_STAGING+,
++LIBFOO_INSTALL_TARGET+.
+
+An additional variable, specific to the Waf infrastructure, can
+also be defined.
+
+* +LIBFOO_BUNDLED_WAF+ can be set to +YES+ or +NO+ to tell Buildroot to
+  use the bundled +waf+ executable. If set to +YES+, the default, then
+  Buildroot will use the waf executable in the package source tree; if
+  set to +NO+, then Buidlroot will download and install waf as a
+  host-tool.
diff --git a/docs/manual/adding-packages.txt b/docs/manual/adding-packages.txt
index 76f90c9..4595991 100644
--- a/docs/manual/adding-packages.txt
+++ b/docs/manual/adding-packages.txt
@@ -29,6 +29,8 @@ include::adding-packages-kconfig.txt[]
 
 include::adding-packages-rebar.txt[]
 
+include::adding-packages-waf.txt[]
+
 include::adding-packages-kernel-module.txt[]
 
 include::adding-packages-asciidoc.txt[]
-- 
2.7.4

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

* [Buildroot] [PATCH 04/10] developpers: add myself as pkg-waf devel
  2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
                   ` (2 preceding siblings ...)
  2016-10-30 16:02 ` [Buildroot] [PATCH 03/10] docs/manual: document the " Yann E. MORIN
@ 2016-10-30 16:02 ` Yann E. MORIN
  2016-10-30 16:31   ` Romain Naour
  2016-10-30 16:02 ` [Buildroot] [PATCH 05/10] package/glmark2: make it a waf-package Yann E. MORIN
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 38+ messages in thread
From: Yann E. MORIN @ 2016-10-30 16:02 UTC (permalink / raw)
  To: buildroot

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/DEVELOPERS b/DEVELOPERS
index d0a51da..cf871a9 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1598,6 +1598,7 @@ F:	package/nvidia-driver/
 F:	package/omxplayer/
 F:	package/python-pyparsing/
 F:	package/pkg-download.mk
+F:	package/pkg-waf.mk
 F:	package/slirp/
 F:	package/snappy/
 F:	package/spice/
-- 
2.7.4

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

* [Buildroot] [PATCH 05/10] package/glmark2: make it a waf-package
  2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
                   ` (3 preceding siblings ...)
  2016-10-30 16:02 ` [Buildroot] [PATCH 04/10] developpers: add myself as pkg-waf devel Yann E. MORIN
@ 2016-10-30 16:02 ` Yann E. MORIN
  2016-10-30 16:33   ` Romain Naour
  2016-10-30 16:02 ` [Buildroot] [PATCH 06/10] package/gst1-imx: " Yann E. MORIN
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 38+ messages in thread
From: Yann E. MORIN @ 2016-10-30 16:02 UTC (permalink / raw)
  To: buildroot

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Cc: Spenser Gilliland <spenser@gillilanding.com>
---
 package/glmark2/glmark2.mk | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/package/glmark2/glmark2.mk b/package/glmark2/glmark2.mk
index 2f662fe..e35e36a 100644
--- a/package/glmark2/glmark2.mk
+++ b/package/glmark2/glmark2.mk
@@ -8,7 +8,7 @@ GLMARK2_VERSION = fa71af2dfab711fac87b9504b6fc9862f44bf72a
 GLMARK2_SITE = $(call github,glmark2,glmark2,$(GLMARK2_VERSION))
 GLMARK2_LICENSE = GPLv3+ SGIv1
 GLMARK2_LICENSE_FILES = COPYING COPYING.SGI
-GLMARK2_DEPENDENCIES = host-pkgconf host-python jpeg libpng \
+GLMARK2_DEPENDENCIES = host-pkgconf jpeg libpng \
 	$(if $(BR2_PACKAGE_HAS_LIBEGL),libegl) \
 	$(if $(BR2_PACKAGE_HAS_LIBGLES),libgles) \
 	$(if $(BR2_PACKAGE_HAS_LIBGL),libgl)
@@ -45,20 +45,4 @@ GLMARK2_CONF_OPTS += \
 	--prefix=/usr \
 	--with-flavors=$(subst $(space),$(comma),$(GLMARK2_FLAVORS))
 
-define GLMARK2_CONFIGURE_CMDS
-	(cd $(@D); \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(GLMARK2_CONF_ENV) \
-		$(HOST_DIR)/usr/bin/python2 ./waf configure $(GLMARK2_CONF_OPTS) \
-	)
-endef
-
-define GLMARK2_BUILD_CMDS
-	cd $(@D) && $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/python2 ./waf
-endef
-
-define GLMARK2_INSTALL_TARGET_CMDS
-	cd $(@D) && $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/python2 ./waf install --destdir=$(TARGET_DIR)
-endef
-
-$(eval $(generic-package))
+$(eval $(waf-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 06/10] package/gst1-imx: make it a waf-package
  2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
                   ` (4 preceding siblings ...)
  2016-10-30 16:02 ` [Buildroot] [PATCH 05/10] package/glmark2: make it a waf-package Yann E. MORIN
@ 2016-10-30 16:02 ` Yann E. MORIN
  2016-10-30 16:35   ` Romain Naour
  2016-10-30 16:02 ` [Buildroot] [PATCH 07/10] package/jack2: " Yann E. MORIN
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 38+ messages in thread
From: Yann E. MORIN @ 2016-10-30 16:02 UTC (permalink / raw)
  To: buildroot

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gary Bisson <gary.bisson@boundarydevices.com>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/gstreamer1/gst1-imx/gst1-imx.mk | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/package/gstreamer1/gst1-imx/gst1-imx.mk b/package/gstreamer1/gst1-imx/gst1-imx.mk
index 3c6b1b6..57a2ad2 100644
--- a/package/gstreamer1/gst1-imx/gst1-imx.mk
+++ b/package/gstreamer1/gst1-imx/gst1-imx.mk
@@ -14,7 +14,6 @@ GST1_IMX_INSTALL_STAGING = YES
 
 GST1_IMX_DEPENDENCIES += \
 	host-pkgconf \
-	host-python \
 	gstreamer1 \
 	gst1-plugins-base
 
@@ -53,21 +52,4 @@ endif
 endif
 endif
 
-define GST1_IMX_CONFIGURE_CMDS
-	cd $(@D); \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(HOST_DIR)/usr/bin/python2 ./waf configure $(GST1_IMX_CONF_OPTS)
-endef
-
-define GST1_IMX_BUILD_CMDS
-	cd $(@D); \
-		$(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS)
-endef
-
-define GST1_IMX_INSTALL_TARGET_CMDS
-	cd $(@D); \
-		$(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(TARGET_DIR) \
-		install
-endef
-
-$(eval $(generic-package))
+$(eval $(waf-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages
@ 2016-10-30 16:02 Yann E. MORIN
  2016-10-30 16:02 ` [Buildroot] [PATCH 01/10] package/waf: new host package Yann E. MORIN
                   ` (11 more replies)
  0 siblings, 12 replies; 38+ messages in thread
From: Yann E. MORIN @ 2016-10-30 16:02 UTC (permalink / raw)
  To: buildroot

Hello All!

This series introduces the waf-package infrastructure for packages based
on the Waf buildsystem.

Then, packages using Waf are converted to use this new infra, except for
samba4 which only uses it for configure, not for build.

The converted packages still build fine with this defconfig:

    BR2_arm=y
    BR2_cortex_a7=y
    BR2_TOOLCHAIN_EXTERNAL=y
    BR2_PACKAGE_GSTREAMER1=y
    BR2_PACKAGE_GST1_IMX=y
    BR2_PACKAGE_JACK2=y
    BR2_PACKAGE_MPV=y
    BR2_PACKAGE_GLMARK2=y
    BR2_PACKAGE_MESA3D=y
    BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4=y
    BR2_PACKAGE_MESA3D_OPENGL_EGL=y
    BR2_PACKAGE_MESA3D_OPENGL_ES=y
    BR2_PACKAGE_FREESCALE_IMX=y
    BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q=y
    BR2_PACKAGE_LIBIMXVPUAPI=y
    BR2_PACKAGE_NORM=y

Except for these platitudes, nothing interesting to state about this new
infra; it is pretty straightforward...

Thanks to Romain for early review. ;-)


Regards,
Yann E. MORIN.


The following changes since commit 5f1e0e688bba9b94287302258afdfacd6e6344e2

  trinity: fix Config.in depends on logic (2016-10-30 16:42:16 +0100)


are available in the git repository at:

  git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to f821d5032f417f98141d6fb30f92c28feb16d2e0

  package/norm: make it a waf-package (2016-10-30 17:00:52 +0100)


----------------------------------------------------------------
Yann E. MORIN (10):
      package/waf: new host package
      core: add waf-package infra
      docs/manual: document the waf-package infra
      developpers: add myself as pkg-waf devel
      package/glmark2: make it a waf-package
      package/gst1-imx: make it a waf-package
      package/jack2: make it a waf-package
      package/libimxvpuapi: make it a waf-package
      package/mpv: make it a waf-package
      package/norm: make it a waf-package

 DEVELOPERS                              |   1 +
 docs/manual/adding-packages-waf.txt     |  67 ++++++++++++++++++
 docs/manual/adding-packages.txt         |   2 +
 package/Makefile.in                     |   1 +
 package/glmark2/glmark2.mk              |  20 +-----
 package/gstreamer1/gst1-imx/gst1-imx.mk |  20 +-----
 package/jack2/jack2.mk                  |  34 +--------
 package/libimxvpuapi/libimxvpuapi.mk    |  23 +-----
 package/mpv/mpv.hash                    |   1 -
 package/mpv/mpv.mk                      |  30 +-------
 package/norm/norm.mk                    |  28 +-------
 package/pkg-waf.mk                      | 119 ++++++++++++++++++++++++++++++++
 package/waf/waf.hash                    |   3 +
 package/waf/waf.mk                      |  28 ++++++++
 14 files changed, 234 insertions(+), 143 deletions(-)
 create mode 100644 docs/manual/adding-packages-waf.txt
 create mode 100644 package/pkg-waf.mk
 create mode 100644 package/waf/waf.hash
 create mode 100644 package/waf/waf.mk

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 07/10] package/jack2: make it a waf-package
  2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
                   ` (5 preceding siblings ...)
  2016-10-30 16:02 ` [Buildroot] [PATCH 06/10] package/gst1-imx: " Yann E. MORIN
@ 2016-10-30 16:02 ` Yann E. MORIN
  2016-10-30 16:38   ` Romain Naour
  2016-10-30 16:02 ` [Buildroot] [PATCH 08/10] package/libimxvpuapi: " Yann E. MORIN
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 38+ messages in thread
From: Yann E. MORIN @ 2016-10-30 16:02 UTC (permalink / raw)
  To: buildroot

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Wojciech M. Zabolotny <wzab01@gmail.com>
---
 package/jack2/jack2.mk | 34 +++-------------------------------
 1 file changed, 3 insertions(+), 31 deletions(-)

diff --git a/package/jack2/jack2.mk b/package/jack2/jack2.mk
index fa9e451..23c9723 100644
--- a/package/jack2/jack2.mk
+++ b/package/jack2/jack2.mk
@@ -11,6 +11,8 @@ JACK2_DEPENDENCIES = libsamplerate libsndfile alsa-lib host-python
 JACK2_INSTALL_STAGING = YES
 JACK2_PATCH = https://github.com/jackaudio/jack2/commit/ff1ed2c4524095055140370c1008a2d9cccc5645.patch
 
+JACK2_CONF_OPTS = --alsa
+
 ifeq ($(BR2_PACKAGE_OPUS),y)
 JACK2_DEPENDENCIES += opus
 endif
@@ -42,34 +44,4 @@ endif
 # gtkiostream, which we do not have, so we don't need to depend on
 # eigen.
 
-define JACK2_CONFIGURE_CMDS
-	(cd $(@D); \
-		$(TARGET_CONFIGURE_OPTS)	\
-		$(HOST_DIR)/usr/bin/python2 ./waf configure \
-		--prefix=/usr			\
-		--alsa				\
-		$(JACK2_CONF_OPTS)		\
-	)
-endef
-
-define JACK2_BUILD_CMDS
-	(cd $(@D); \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS))
-endef
-
-define JACK2_INSTALL_TARGET_CMDS
-	(cd $(@D); \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(TARGET_DIR) \
-		install)
-endef
-
-define JACK2_INSTALL_STAGING_CMDS
-	(cd $(@D); \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(STAGING_DIR) \
-		install)
-endef
-
-$(eval $(generic-package))
+$(eval $(waf-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 08/10] package/libimxvpuapi: make it a waf-package
  2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
                   ` (6 preceding siblings ...)
  2016-10-30 16:02 ` [Buildroot] [PATCH 07/10] package/jack2: " Yann E. MORIN
@ 2016-10-30 16:02 ` Yann E. MORIN
  2016-10-30 16:39   ` Romain Naour
  2016-10-30 16:02 ` [Buildroot] [PATCH 09/10] package/mpv: " Yann E. MORIN
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 38+ messages in thread
From: Yann E. MORIN @ 2016-10-30 16:02 UTC (permalink / raw)
  To: buildroot

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gary Bisson <gary.bisson@boundarydevices.com>
---
 package/libimxvpuapi/libimxvpuapi.mk | 23 +----------------------
 1 file changed, 1 insertion(+), 22 deletions(-)

diff --git a/package/libimxvpuapi/libimxvpuapi.mk b/package/libimxvpuapi/libimxvpuapi.mk
index df84806..fde4429 100644
--- a/package/libimxvpuapi/libimxvpuapi.mk
+++ b/package/libimxvpuapi/libimxvpuapi.mk
@@ -11,25 +11,4 @@ LIBIMXVPUAPI_LICENSE_FILES = LICENSE
 LIBIMXVPUAPI_DEPENDENCIES = host-pkgconf host-python imx-vpu
 LIBIMXVPUAPI_INSTALL_STAGING = YES
 
-define LIBIMXVPUAPI_CONFIGURE_CMDS
-	cd $(@D); \
-	$(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/usr/bin/python2 ./waf configure \
-		--prefix=/usr --libdir=/usr/lib
-endef
-
-define LIBIMXVPUAPI_BUILD_CMDS
-	cd $(@D); \
-	$(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS)
-endef
-
-define LIBIMXVPUAPI_INSTALL_STAGING_CMDS
-	cd $(@D); \
-	$(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(STAGING_DIR) install
-endef
-
-define LIBIMXVPUAPI_INSTALL_TARGET_CMDS
-	cd $(@D); \
-	$(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(TARGET_DIR) install
-endef
-
-$(eval $(generic-package))
+$(eval $(waf-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 09/10] package/mpv: make it a waf-package
  2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
                   ` (7 preceding siblings ...)
  2016-10-30 16:02 ` [Buildroot] [PATCH 08/10] package/libimxvpuapi: " Yann E. MORIN
@ 2016-10-30 16:02 ` Yann E. MORIN
  2016-11-02 22:42   ` Romain Naour
  2016-12-02 22:58   ` Thomas Petazzoni
  2016-10-30 16:02 ` [Buildroot] [PATCH 10/10] package/norm: " Yann E. MORIN
                   ` (2 subsequent siblings)
  11 siblings, 2 replies; 38+ messages in thread
From: Yann E. MORIN @ 2016-10-30 16:02 UTC (permalink / raw)
  To: buildroot

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/mpv/mpv.hash |  1 -
 package/mpv/mpv.mk   | 30 +++---------------------------
 2 files changed, 3 insertions(+), 28 deletions(-)

diff --git a/package/mpv/mpv.hash b/package/mpv/mpv.hash
index eea0db0..fb287ef 100644
--- a/package/mpv/mpv.hash
+++ b/package/mpv/mpv.hash
@@ -1,3 +1,2 @@
 # Locally calculated
 sha256	fe6ec9d2ded5ce84b963f54b812d579d04f944f4a737f3ae639c4d5d9e842b56	v0.20.0.tar.gz
-sha256	01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b	waf-1.8.12
diff --git a/package/mpv/mpv.mk b/package/mpv/mpv.mk
index 4f04fdf..0c5a64f 100644
--- a/package/mpv/mpv.mk
+++ b/package/mpv/mpv.mk
@@ -5,16 +5,16 @@
 ################################################################################
 
 MPV_VERSION = 0.20.0
-MPV_WAF_VERSION = 1.8.12
 MPV_SITE = https://github.com/mpv-player/mpv/archive
 MPV_SOURCE = v$(MPV_VERSION).tar.gz
-MPV_EXTRA_DOWNLOADS = https://waf.io/waf-$(MPV_WAF_VERSION)
 MPV_DEPENDENCIES = \
 	host-pkgconf ffmpeg zlib \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv)
 MPV_LICENSE = GPLv2+
 MPV_LICENSE_FILES = LICENSE
 
+MPV_BUNDLED_WAF = NO
+
 # Some of these options need testing and/or tweaks
 MPV_CONF_OPTS = \
 	--prefix=/usr \
@@ -235,28 +235,4 @@ else
 MPV_CONF_OPTS += --disable-x11
 endif
 
-define MPV_COPY_WAF
-	$(INSTALL) -m 0755 $(DL_DIR)/waf-$(MPV_WAF_VERSION) $(@D)/waf
-endef
-MPV_POST_EXTRACT_HOOKS += MPV_COPY_WAF
-
-define MPV_CONFIGURE_CMDS
-	cd $(@D); \
-		$(TARGET_CONFIGURE_OPTS) \
-		./waf configure $(MPV_CONF_OPTS)
-endef
-
-define MPV_BUILD_CMDS
-	cd $(@D); \
-		$(TARGET_MAKE_ENV) \
-		./waf build
-endef
-
-define MPV_INSTALL_TARGET_CMDS
-	cd $(@D); \
-		$(TARGET_MAKE_ENV) \
-		DESTDIR=$(TARGET_DIR) \
-		./waf install
-endef
-
-$(eval $(generic-package))
+$(eval $(waf-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 10/10] package/norm: make it a waf-package
  2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
                   ` (8 preceding siblings ...)
  2016-10-30 16:02 ` [Buildroot] [PATCH 09/10] package/mpv: " Yann E. MORIN
@ 2016-10-30 16:02 ` Yann E. MORIN
  2016-10-30 16:40   ` Romain Naour
  2016-10-30 16:12 ` [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Romain Naour
  2016-12-02 22:55 ` Thomas Petazzoni
  11 siblings, 1 reply; 38+ messages in thread
From: Yann E. MORIN @ 2016-10-30 16:02 UTC (permalink / raw)
  To: buildroot

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/norm/norm.mk | 28 +++-------------------------
 1 file changed, 3 insertions(+), 25 deletions(-)

diff --git a/package/norm/norm.mk b/package/norm/norm.mk
index e1b3a5f..8af76f8 100644
--- a/package/norm/norm.mk
+++ b/package/norm/norm.mk
@@ -15,32 +15,10 @@ ifeq ($(BR2_PACKAGE_LIBNETFILTER_QUEUE),y)
 NORM_DEPENDENCIES += libnetfilter_queue
 endif
 
-define NORM_CONFIGURE_CMDS
-	cd $(@D); \
-		$(TARGET_CONFIGURE_OPTS) \
-		./waf configure --prefix=/usr
-endef
-
-define NORM_BUILD_CMDS
-	cd $(@D); \
-		$(TARGET_MAKE_ENV) \
-		./waf build
-endef
-
 # install target doesn't install headers unfortunately...
-define NORM_INSTALL_STAGING_CMDS
-	cd $(@D); \
-		$(TARGET_MAKE_ENV) \
-		DESTDIR=$(STAGING_DIR) \
-		./waf install
+define NORM_INSTALL_HEADERS
 	cp -f $(@D)/include/norm* $(STAGING_DIR)/usr/include
 endef
+NORM_POST_INSTALL_STAGING_HOOKS += NORM_INSTALL_HEADERS
 
-define NORM_INSTALL_TARGET_CMDS
-	cd $(@D); \
-		$(TARGET_MAKE_ENV) \
-		DESTDIR=$(TARGET_DIR) \
-		./waf install
-endef
-
-$(eval $(generic-package))
+$(eval $(waf-package))
-- 
2.7.4

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

* [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages
  2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
                   ` (9 preceding siblings ...)
  2016-10-30 16:02 ` [Buildroot] [PATCH 10/10] package/norm: " Yann E. MORIN
@ 2016-10-30 16:12 ` Romain Naour
  2016-12-02 22:55 ` Thomas Petazzoni
  11 siblings, 0 replies; 38+ messages in thread
From: Romain Naour @ 2016-10-30 16:12 UTC (permalink / raw)
  To: buildroot

Hi Yann, All,

Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
> Hello All!
> 
> This series introduces the waf-package infrastructure for packages based
> on the Waf buildsystem.
> 
> Then, packages using Waf are converted to use this new infra, except for
> samba4 which only uses it for configure, not for build.
> 
> The converted packages still build fine with this defconfig:
> 
>     BR2_arm=y
>     BR2_cortex_a7=y
>     BR2_TOOLCHAIN_EXTERNAL=y
>     BR2_PACKAGE_GSTREAMER1=y
>     BR2_PACKAGE_GST1_IMX=y
>     BR2_PACKAGE_JACK2=y
>     BR2_PACKAGE_MPV=y
>     BR2_PACKAGE_GLMARK2=y
>     BR2_PACKAGE_MESA3D=y
>     BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4=y
>     BR2_PACKAGE_MESA3D_OPENGL_EGL=y
>     BR2_PACKAGE_MESA3D_OPENGL_ES=y
>     BR2_PACKAGE_FREESCALE_IMX=y
>     BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q=y
>     BR2_PACKAGE_LIBIMXVPUAPI=y
>     BR2_PACKAGE_NORM=y
> 
> Except for these platitudes, nothing interesting to state about this new
> infra; it is pretty straightforward...
> 
> Thanks to Romain for early review. ;-)

I'll add a new package (aubio) which use waf as build system and I asked on IRC
if it's time for adding the waf-infra. So here it is, thanks Yann :)

Best regards,
Romain

> 
> 
> Regards,
> Yann E. MORIN.
> 
> 

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

* [Buildroot] [PATCH 01/10] package/waf: new host package
  2016-10-30 16:02 ` [Buildroot] [PATCH 01/10] package/waf: new host package Yann E. MORIN
@ 2016-10-30 16:21   ` Romain Naour
  2016-12-02 22:55   ` Thomas Petazzoni
  1 sibling, 0 replies; 38+ messages in thread
From: Romain Naour @ 2016-10-30 16:21 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
> host-waf will be used by waf-based packages that do not include it in
> their release tarballs, like mpv.
> 
> mpv is currently the only case we have, but with the upcoming
> waf-package infra, having host-waf available just makes the infra
> complete from the onset.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Romain Naour <romain.naour@openwide.fr>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
>  package/waf/waf.hash |  3 +++
>  package/waf/waf.mk   | 28 ++++++++++++++++++++++++++++
>  2 files changed, 31 insertions(+)
>  create mode 100644 package/waf/waf.hash
>  create mode 100644 package/waf/waf.mk
> 
> diff --git a/package/waf/waf.hash b/package/waf/waf.hash
> new file mode 100644
> index 0000000..9d610b2
> --- /dev/null
> +++ b/package/waf/waf.hash
> @@ -0,0 +1,3 @@
> +# Locally computed
> +sha1    33d170c738ed8c92dda2945b445272972f558244                          waf-1.9.5
> +sha256  101f14e0f47a6410c00b8feda094948516cd3989491c56eb8268907fcd164909  waf-1.9.5
> diff --git a/package/waf/waf.mk b/package/waf/waf.mk
> new file mode 100644
> index 0000000..cd0c67e
> --- /dev/null
> +++ b/package/waf/waf.mk
> @@ -0,0 +1,28 @@
> +################################################################################
> +#
> +# waf
> +#
> +################################################################################
> +
> +WAF_VERSION = 1.9.5
> +WAF_SOURCE = waf-$(WAF_VERSION)
> +WAF_SITE = https://waf.io/
> +
> +# Waf is a python script, compatible with any python >= 2.6, but some
> +# packages have wafscripts not compatible with python3. So always use
> +# python2.
> +#
> +# We don't really need host-python to install host-waf, but having this
> +# dependency here will hide it from packages themselves
> +HOST_WAF_DEPENDENCIES = host-python
> +
> +# Not really needed, but here for consistency with other packages.
> +define HOST_WAF_EXTRACT_CMDS
> +	$(INSTALL) -D -m 0755 $(DL_DIR)/waf-$(WAF_VERSION) $(@D)/waf
> +endef
> +
> +define HOST_WAF_INSTALL_CMDS
> +	$(INSTALL) -D -m 0755 $(@D)/waf $(HOST_DIR)/usr/bin/waf
> +endef
> +
> +$(eval $(host-generic-package))
> 

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

* [Buildroot] [PATCH 02/10] core: add waf-package infra
  2016-10-30 16:02 ` [Buildroot] [PATCH 02/10] core: add waf-package infra Yann E. MORIN
@ 2016-10-30 16:30   ` Romain Naour
  2016-11-16 23:02   ` Thomas Petazzoni
  2016-12-02 22:56   ` Thomas Petazzoni
  2 siblings, 0 replies; 38+ messages in thread
From: Romain Naour @ 2016-10-30 16:30 UTC (permalink / raw)
  To: buildroot

Yann, All,

Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
> This new waf-package infrastructure simplifies writing waf-based
> packages. It can be used by our six current such packages, plus a
> later-incoming one by Romain.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Romain Naour <romain.naour@openwide.fr>

Reviewed-by: Romain Naour <romain.naour@gmail.com>
[Tested with aubio package which will be added latter]
Tested-by: Romain Naour <romain.naour@gmail.com>

> ---
>  package/Makefile.in |   1 +
>  package/pkg-waf.mk  | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 120 insertions(+)
>  create mode 100644 package/pkg-waf.mk
> 
> diff --git a/package/Makefile.in b/package/Makefile.in
> index 5d591e9..dd18d2b 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -398,3 +398,4 @@ include package/pkg-generic.mk
>  include package/pkg-kconfig.mk
>  include package/pkg-rebar.mk
>  include package/pkg-kernel-module.mk
> +include package/pkg-waf.mk
> diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
> new file mode 100644
> index 0000000..b36f47a
> --- /dev/null
> +++ b/package/pkg-waf.mk
> @@ -0,0 +1,119 @@
> +################################################################################
> +# WAF package infrastructure
> +#
> +# This file implements an infrastructure that eases development of package
> +# .mk files for WAF packages. It should be used for all packages that use
> +# WAF as their build system.
> +#
> +# See the Buildroot documentation for details on the usage of this
> +# infrastructure
> +#
> +# In terms of implementation, this WAF infrastructure requires the .mk file
> +# to only specify metadata information about the package: name, version,
> +# download URL, etc.
> +#
> +# We still allow the package .mk file to override what the different steps
> +# are doing, if needed. For example, if <PKG>_BUILD_CMDS is already defined,
> +# it is used as the list of commands to perform to build the package,
> +# instead of the default WAF behaviour. The package can also define some
> +# post operation hooks.
> +#
> +################################################################################
> +
> +################################################################################
> +# inner-waf-package -- defines how the configuration, compilation and
> +# installation of a waf package should be done, implements a few hooks
> +# to tune the build process for waf specifities and calls the generic
> +# package infrastructure to generate the necessary make targets
> +#
> +#  argument 1 is the lowercase package name
> +#  argument 2 is the uppercase package name, including a HOST_ prefix
> +#             for host packages
> +#  argument 3 is the uppercase package name, without the HOST_ prefix
> +#             for host packages
> +#  argument 4 is the type (target or host)
> +################################################################################
> +
> +define inner-waf-package
> +
> +# If the package does not have its own waf, use our own.
> +ifeq ($$($(2)_BUNDLED_WAF),NO)
> +# Dependency on host-python is done by host-waf
> +$(2)_DEPENDENCIES += host-waf
> +$(2)_WAF = $(HOST_DIR)/usr/bin/waf
> +else
> +# We need host-python to run the package's waf
> +$(2)_DEPENDENCIES += host-python
> +$(2)_WAF = ./waf
> +endif
> +
> +ifndef $(2)_MAKE
> + ifdef $(3)_MAKE
> +  $(2)_MAKE = $$($(3)_MAKE)
> + else
> +  $(2)_MAKE ?= $$(MAKE)
> + endif
> +endif
> +
> +#
> +# Configure step. Only define it if not already defined by the package
> +# .mk file.
> +#
> +ifndef $(2)_CONFIGURE_CMDS
> +define $(2)_CONFIGURE_CMDS
> +	cd $$(@D) && \
> +	$$(TARGET_CONFIGURE_OPTS) \
> +	$$($(2)_CONF_ENV) \
> +	$$(HOST_DIR)/usr/bin/python2 $$($(2)_WAF) configure \
> +		--prefix=/usr \
> +		--libdir=/usr/lib \
> +		$$($(2)_CONF_OPTS)
> +endef
> +endif
> +
> +#
> +# Build step. Only define it if not already defined by the package .mk
> +# file.
> +#
> +ifndef $(2)_BUILD_CMDS
> +define $(2)_BUILD_CMDS
> +	cd $$(@D) && \
> +	$$(TARGET_MAKE_ENV) $$(HOST_DIR)/usr/bin/python2 $$($(2)_WAF) build -j $$(PARALLEL_JOBS)
> +endef
> +endif
> +
> +#
> +# Staging installation step. Only define it if not already defined by
> +# the package .mk file.
> +#
> +ifndef $(2)_INSTALL_STAGING_CMDS
> +define $(2)_INSTALL_STAGING_CMDS
> +	cd $$(@D) && \
> +	$$(TARGET_MAKE_ENV) $$(HOST_DIR)/usr/bin/python2 $$($(2)_WAF) \
> +		install --destdir=$$(STAGING_DIR)
> +endef
> +endif
> +
> +#
> +# Target installation step. Only define it if not already defined by
> +# the package .mk file.
> +#
> +ifndef $(2)_INSTALL_TARGET_CMDS
> +define $(2)_INSTALL_TARGET_CMDS
> +	cd $$(@D) && \
> +	$$(TARGET_MAKE_ENV) $$(HOST_DIR)/usr/bin/python2 $$($(2)_WAF) \
> +		install --destdir=$$(TARGET_DIR)
> +endef
> +endif
> +
> +# Call the generic package infrastructure to generate the necessary
> +# make targets
> +$(call inner-generic-package,$(1),$(2),$(3),$(4))
> +
> +endef
> +
> +################################################################################
> +# waf-package -- the target generator macro for WAF packages
> +################################################################################
> +
> +waf-package = $(call inner-waf-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
> 

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

* [Buildroot] [PATCH 03/10] docs/manual: document the waf-package infra
  2016-10-30 16:02 ` [Buildroot] [PATCH 03/10] docs/manual: document the " Yann E. MORIN
@ 2016-10-30 16:31   ` Romain Naour
  2016-11-16 23:04   ` Thomas Petazzoni
  2016-12-02 22:57   ` Thomas Petazzoni
  2 siblings, 0 replies; 38+ messages in thread
From: Romain Naour @ 2016-10-30 16:31 UTC (permalink / raw)
  To: buildroot

Hi Yann, All,

Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Romain Naour <romain.naour@openwide.fr>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
>  docs/manual/adding-packages-waf.txt | 67 +++++++++++++++++++++++++++++++++++++
>  docs/manual/adding-packages.txt     |  2 ++
>  2 files changed, 69 insertions(+)
>  create mode 100644 docs/manual/adding-packages-waf.txt
> 
> diff --git a/docs/manual/adding-packages-waf.txt b/docs/manual/adding-packages-waf.txt
> new file mode 100644
> index 0000000..31c7167
> --- /dev/null
> +++ b/docs/manual/adding-packages-waf.txt
> @@ -0,0 +1,67 @@
> +// -*- mode:doc; -*-
> +// vim: set syntax=asciidoc:
> +
> +=== Infrastructure for Waf-based packages
> +
> +[[waf-package-tutorial]]
> +
> +==== +waf-package+ tutorial
> +
> +First, let's see how to write a +.mk+ file for a Waf-based package, with
> +an example :
> +
> +------------------------
> +01: ################################################################################
> +02: #
> +03: # libfoo
> +04: #
> +05: ################################################################################
> +06:
> +07: LIBFOO_VERSION = 1.0
> +08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
> +09: LIBFOO_SITE = http://www.foosoftware.org/download
> +10: LIBFOO_CONF_OPTS = --eanble-bar --disable-baz
> +11: LIBFOO_DEPENDENCIES = bar
> +12:
> +13: $(eval $(waf-package))
> +------------------------
> +
> +On line 7, we declare the version of the package.
> +
> +On line 8 and 9, we declare the name of the tarball (xz-ed tarball
> +recommended) and the location of the tarball on the Web. Buildroot
> +will automatically download the tarball from this location.
> +
> +On line 10, we tell Buildroot what options to enable for libfoo.
> +
> +On line 11, we tell Buildroot the depednencies of libfoo.
> +
> +Finally, on line line 13, we invoke the +waf-package+
> +macro that generates all the Makefile rules that actually allows the
> +package to be built.
> +
> +[[waf-package-reference]]
> +
> +==== +waf-package+ reference
> +
> +The main macro of the Waf package infrastructure is +waf-package+.
> +It is similar to the +generic-package+ macro.
> +
> +Just like the generic infrastructure, the Waf infrastructure works
> +by defining a number of variables before calling the +waf-package+
> +macro.
> +
> +First, all the package metadata information variables that exist in
> +the generic infrastructure also exist in the Waf infrastructure:
> ++LIBFOO_VERSION+, +LIBFOO_SOURCE+, +LIBFOO_PATCH+, +LIBFOO_SITE+,
> ++LIBFOO_SUBDIR+, +LIBFOO_DEPENDENCIES+, +LIBFOO_INSTALL_STAGING+,
> ++LIBFOO_INSTALL_TARGET+.
> +
> +An additional variable, specific to the Waf infrastructure, can
> +also be defined.
> +
> +* +LIBFOO_BUNDLED_WAF+ can be set to +YES+ or +NO+ to tell Buildroot to
> +  use the bundled +waf+ executable. If set to +YES+, the default, then
> +  Buildroot will use the waf executable in the package source tree; if
> +  set to +NO+, then Buidlroot will download and install waf as a
> +  host-tool.
> diff --git a/docs/manual/adding-packages.txt b/docs/manual/adding-packages.txt
> index 76f90c9..4595991 100644
> --- a/docs/manual/adding-packages.txt
> +++ b/docs/manual/adding-packages.txt
> @@ -29,6 +29,8 @@ include::adding-packages-kconfig.txt[]
>  
>  include::adding-packages-rebar.txt[]
>  
> +include::adding-packages-waf.txt[]
> +
>  include::adding-packages-kernel-module.txt[]
>  
>  include::adding-packages-asciidoc.txt[]
> 

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

* [Buildroot] [PATCH 04/10] developpers: add myself as pkg-waf devel
  2016-10-30 16:02 ` [Buildroot] [PATCH 04/10] developpers: add myself as pkg-waf devel Yann E. MORIN
@ 2016-10-30 16:31   ` Romain Naour
  0 siblings, 0 replies; 38+ messages in thread
From: Romain Naour @ 2016-10-30 16:31 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Acked-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
>  DEVELOPERS | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index d0a51da..cf871a9 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1598,6 +1598,7 @@ F:	package/nvidia-driver/
>  F:	package/omxplayer/
>  F:	package/python-pyparsing/
>  F:	package/pkg-download.mk
> +F:	package/pkg-waf.mk
>  F:	package/slirp/
>  F:	package/snappy/
>  F:	package/spice/
> 

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

* [Buildroot] [PATCH 05/10] package/glmark2: make it a waf-package
  2016-10-30 16:02 ` [Buildroot] [PATCH 05/10] package/glmark2: make it a waf-package Yann E. MORIN
@ 2016-10-30 16:33   ` Romain Naour
  0 siblings, 0 replies; 38+ messages in thread
From: Romain Naour @ 2016-10-30 16:33 UTC (permalink / raw)
  To: buildroot

Hi Yann, All,

Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
> Cc: Spenser Gilliland <spenser@gillilanding.com>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
>  package/glmark2/glmark2.mk | 20 ++------------------
>  1 file changed, 2 insertions(+), 18 deletions(-)
> 
> diff --git a/package/glmark2/glmark2.mk b/package/glmark2/glmark2.mk
> index 2f662fe..e35e36a 100644
> --- a/package/glmark2/glmark2.mk
> +++ b/package/glmark2/glmark2.mk
> @@ -8,7 +8,7 @@ GLMARK2_VERSION = fa71af2dfab711fac87b9504b6fc9862f44bf72a
>  GLMARK2_SITE = $(call github,glmark2,glmark2,$(GLMARK2_VERSION))
>  GLMARK2_LICENSE = GPLv3+ SGIv1
>  GLMARK2_LICENSE_FILES = COPYING COPYING.SGI
> -GLMARK2_DEPENDENCIES = host-pkgconf host-python jpeg libpng \
> +GLMARK2_DEPENDENCIES = host-pkgconf jpeg libpng \
>  	$(if $(BR2_PACKAGE_HAS_LIBEGL),libegl) \
>  	$(if $(BR2_PACKAGE_HAS_LIBGLES),libgles) \
>  	$(if $(BR2_PACKAGE_HAS_LIBGL),libgl)
> @@ -45,20 +45,4 @@ GLMARK2_CONF_OPTS += \
>  	--prefix=/usr \
>  	--with-flavors=$(subst $(space),$(comma),$(GLMARK2_FLAVORS))
>  
> -define GLMARK2_CONFIGURE_CMDS
> -	(cd $(@D); \
> -		$(TARGET_CONFIGURE_OPTS) \
> -		$(GLMARK2_CONF_ENV) \
> -		$(HOST_DIR)/usr/bin/python2 ./waf configure $(GLMARK2_CONF_OPTS) \
> -	)
> -endef
> -
> -define GLMARK2_BUILD_CMDS
> -	cd $(@D) && $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/python2 ./waf
> -endef
> -
> -define GLMARK2_INSTALL_TARGET_CMDS
> -	cd $(@D) && $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/python2 ./waf install --destdir=$(TARGET_DIR)
> -endef
> -
> -$(eval $(generic-package))
> +$(eval $(waf-package))
> 

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

* [Buildroot] [PATCH 06/10] package/gst1-imx: make it a waf-package
  2016-10-30 16:02 ` [Buildroot] [PATCH 06/10] package/gst1-imx: " Yann E. MORIN
@ 2016-10-30 16:35   ` Romain Naour
  2016-11-01 10:52     ` Gary Bisson
  0 siblings, 1 reply; 38+ messages in thread
From: Romain Naour @ 2016-10-30 16:35 UTC (permalink / raw)
  To: buildroot

Hi Yann, All,

Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Gary Bisson <gary.bisson@boundarydevices.com>
> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
>  package/gstreamer1/gst1-imx/gst1-imx.mk | 20 +-------------------
>  1 file changed, 1 insertion(+), 19 deletions(-)
> 
> diff --git a/package/gstreamer1/gst1-imx/gst1-imx.mk b/package/gstreamer1/gst1-imx/gst1-imx.mk
> index 3c6b1b6..57a2ad2 100644
> --- a/package/gstreamer1/gst1-imx/gst1-imx.mk
> +++ b/package/gstreamer1/gst1-imx/gst1-imx.mk
> @@ -14,7 +14,6 @@ GST1_IMX_INSTALL_STAGING = YES
>  
>  GST1_IMX_DEPENDENCIES += \
>  	host-pkgconf \
> -	host-python \
>  	gstreamer1 \
>  	gst1-plugins-base
>  
> @@ -53,21 +52,4 @@ endif
>  endif
>  endif
>  
> -define GST1_IMX_CONFIGURE_CMDS
> -	cd $(@D); \
> -		$(TARGET_CONFIGURE_OPTS) \
> -		$(HOST_DIR)/usr/bin/python2 ./waf configure $(GST1_IMX_CONF_OPTS)
> -endef
> -
> -define GST1_IMX_BUILD_CMDS
> -	cd $(@D); \
> -		$(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS)
> -endef
> -
> -define GST1_IMX_INSTALL_TARGET_CMDS
> -	cd $(@D); \
> -		$(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(TARGET_DIR) \
> -		install
> -endef
> -
> -$(eval $(generic-package))
> +$(eval $(waf-package))
> 

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

* [Buildroot] [PATCH 07/10] package/jack2: make it a waf-package
  2016-10-30 16:02 ` [Buildroot] [PATCH 07/10] package/jack2: " Yann E. MORIN
@ 2016-10-30 16:38   ` Romain Naour
  0 siblings, 0 replies; 38+ messages in thread
From: Romain Naour @ 2016-10-30 16:38 UTC (permalink / raw)
  To: buildroot

Hi Yann, All,

Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Wojciech M. Zabolotny <wzab01@gmail.com>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
>  package/jack2/jack2.mk | 34 +++-------------------------------
>  1 file changed, 3 insertions(+), 31 deletions(-)
> 
> diff --git a/package/jack2/jack2.mk b/package/jack2/jack2.mk
> index fa9e451..23c9723 100644
> --- a/package/jack2/jack2.mk
> +++ b/package/jack2/jack2.mk
> @@ -11,6 +11,8 @@ JACK2_DEPENDENCIES = libsamplerate libsndfile alsa-lib host-python
>  JACK2_INSTALL_STAGING = YES
>  JACK2_PATCH = https://github.com/jackaudio/jack2/commit/ff1ed2c4524095055140370c1008a2d9cccc5645.patch
>  
> +JACK2_CONF_OPTS = --alsa
> +
>  ifeq ($(BR2_PACKAGE_OPUS),y)
>  JACK2_DEPENDENCIES += opus
>  endif
> @@ -42,34 +44,4 @@ endif
>  # gtkiostream, which we do not have, so we don't need to depend on
>  # eigen.
>  
> -define JACK2_CONFIGURE_CMDS
> -	(cd $(@D); \
> -		$(TARGET_CONFIGURE_OPTS)	\
> -		$(HOST_DIR)/usr/bin/python2 ./waf configure \
> -		--prefix=/usr			\
> -		--alsa				\
> -		$(JACK2_CONF_OPTS)		\
> -	)
> -endef
> -
> -define JACK2_BUILD_CMDS
> -	(cd $(@D); \
> -		$(TARGET_CONFIGURE_OPTS) \
> -		$(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS))
> -endef
> -
> -define JACK2_INSTALL_TARGET_CMDS
> -	(cd $(@D); \
> -		$(TARGET_CONFIGURE_OPTS) \
> -		$(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(TARGET_DIR) \
> -		install)
> -endef
> -
> -define JACK2_INSTALL_STAGING_CMDS
> -	(cd $(@D); \
> -		$(TARGET_CONFIGURE_OPTS) \
> -		$(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(STAGING_DIR) \
> -		install)
> -endef
> -
> -$(eval $(generic-package))
> +$(eval $(waf-package))
> 

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

* [Buildroot] [PATCH 08/10] package/libimxvpuapi: make it a waf-package
  2016-10-30 16:02 ` [Buildroot] [PATCH 08/10] package/libimxvpuapi: " Yann E. MORIN
@ 2016-10-30 16:39   ` Romain Naour
  2016-11-01 10:52     ` Gary Bisson
  0 siblings, 1 reply; 38+ messages in thread
From: Romain Naour @ 2016-10-30 16:39 UTC (permalink / raw)
  To: buildroot

Hi Yann, All,

Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Gary Bisson <gary.bisson@boundarydevices.com>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
>  package/libimxvpuapi/libimxvpuapi.mk | 23 +----------------------
>  1 file changed, 1 insertion(+), 22 deletions(-)
> 
> diff --git a/package/libimxvpuapi/libimxvpuapi.mk b/package/libimxvpuapi/libimxvpuapi.mk
> index df84806..fde4429 100644
> --- a/package/libimxvpuapi/libimxvpuapi.mk
> +++ b/package/libimxvpuapi/libimxvpuapi.mk
> @@ -11,25 +11,4 @@ LIBIMXVPUAPI_LICENSE_FILES = LICENSE
>  LIBIMXVPUAPI_DEPENDENCIES = host-pkgconf host-python imx-vpu
>  LIBIMXVPUAPI_INSTALL_STAGING = YES
>  
> -define LIBIMXVPUAPI_CONFIGURE_CMDS
> -	cd $(@D); \
> -	$(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/usr/bin/python2 ./waf configure \
> -		--prefix=/usr --libdir=/usr/lib
> -endef
> -
> -define LIBIMXVPUAPI_BUILD_CMDS
> -	cd $(@D); \
> -	$(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS)
> -endef
> -
> -define LIBIMXVPUAPI_INSTALL_STAGING_CMDS
> -	cd $(@D); \
> -	$(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(STAGING_DIR) install
> -endef
> -
> -define LIBIMXVPUAPI_INSTALL_TARGET_CMDS
> -	cd $(@D); \
> -	$(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(TARGET_DIR) install
> -endef
> -
> -$(eval $(generic-package))
> +$(eval $(waf-package))
> 

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

* [Buildroot] [PATCH 10/10] package/norm: make it a waf-package
  2016-10-30 16:02 ` [Buildroot] [PATCH 10/10] package/norm: " Yann E. MORIN
@ 2016-10-30 16:40   ` Romain Naour
  0 siblings, 0 replies; 38+ messages in thread
From: Romain Naour @ 2016-10-30 16:40 UTC (permalink / raw)
  To: buildroot

Hi Yann, All,

Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
>  package/norm/norm.mk | 28 +++-------------------------
>  1 file changed, 3 insertions(+), 25 deletions(-)
> 
> diff --git a/package/norm/norm.mk b/package/norm/norm.mk
> index e1b3a5f..8af76f8 100644
> --- a/package/norm/norm.mk
> +++ b/package/norm/norm.mk
> @@ -15,32 +15,10 @@ ifeq ($(BR2_PACKAGE_LIBNETFILTER_QUEUE),y)
>  NORM_DEPENDENCIES += libnetfilter_queue
>  endif
>  
> -define NORM_CONFIGURE_CMDS
> -	cd $(@D); \
> -		$(TARGET_CONFIGURE_OPTS) \
> -		./waf configure --prefix=/usr
> -endef
> -
> -define NORM_BUILD_CMDS
> -	cd $(@D); \
> -		$(TARGET_MAKE_ENV) \
> -		./waf build
> -endef
> -
>  # install target doesn't install headers unfortunately...
> -define NORM_INSTALL_STAGING_CMDS
> -	cd $(@D); \
> -		$(TARGET_MAKE_ENV) \
> -		DESTDIR=$(STAGING_DIR) \
> -		./waf install
> +define NORM_INSTALL_HEADERS
>  	cp -f $(@D)/include/norm* $(STAGING_DIR)/usr/include
>  endef
> +NORM_POST_INSTALL_STAGING_HOOKS += NORM_INSTALL_HEADERS
>  
> -define NORM_INSTALL_TARGET_CMDS
> -	cd $(@D); \
> -		$(TARGET_MAKE_ENV) \
> -		DESTDIR=$(TARGET_DIR) \
> -		./waf install
> -endef
> -
> -$(eval $(generic-package))
> +$(eval $(waf-package))
> 

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

* [Buildroot] [PATCH 06/10] package/gst1-imx: make it a waf-package
  2016-10-30 16:35   ` Romain Naour
@ 2016-11-01 10:52     ` Gary Bisson
  0 siblings, 0 replies; 38+ messages in thread
From: Gary Bisson @ 2016-11-01 10:52 UTC (permalink / raw)
  To: buildroot

Yann, All,

On Sun, Oct 30, 2016 at 5:35 PM, Romain Naour <romain.naour@gmail.com> wrote:
> Hi Yann, All,
>
> Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
>> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>> Cc: Gary Bisson <gary.bisson@boundarydevices.com>
>> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
>
> Reviewed-by: Romain Naour <romain.naour@gmail.com>

Tested-by: Gary Bisson <gary.bisson@boundarydevices.com>

Note that if this patch gets in first, my pending patch on this
package will need to be updated:
http://patchwork.ozlabs.org/patch/675006/

Regards,
Gary

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

* [Buildroot] [PATCH 08/10] package/libimxvpuapi: make it a waf-package
  2016-10-30 16:39   ` Romain Naour
@ 2016-11-01 10:52     ` Gary Bisson
  0 siblings, 0 replies; 38+ messages in thread
From: Gary Bisson @ 2016-11-01 10:52 UTC (permalink / raw)
  To: buildroot

Yann, All,

On Sun, Oct 30, 2016 at 5:39 PM, Romain Naour <romain.naour@gmail.com> wrote:
> Hi Yann, All,
>
> Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
>> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>> Cc: Gary Bisson <gary.bisson@boundarydevices.com>
>
> Reviewed-by: Romain Naour <romain.naour@gmail.com>

Tested-by: Gary Bisson <gary.bisson@boundarydevices.com>

Regards,
Gary

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

* [Buildroot] [PATCH 09/10] package/mpv: make it a waf-package
  2016-10-30 16:02 ` [Buildroot] [PATCH 09/10] package/mpv: " Yann E. MORIN
@ 2016-11-02 22:42   ` Romain Naour
  2016-12-02 22:58   ` Thomas Petazzoni
  1 sibling, 0 replies; 38+ messages in thread
From: Romain Naour @ 2016-11-02 22:42 UTC (permalink / raw)
  To: buildroot

Hi Yann,

I missed this one...

Le 30/10/2016 ? 17:02, Yann E. MORIN a ?crit :
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
>  package/mpv/mpv.hash |  1 -
>  package/mpv/mpv.mk   | 30 +++---------------------------
>  2 files changed, 3 insertions(+), 28 deletions(-)
> 
> diff --git a/package/mpv/mpv.hash b/package/mpv/mpv.hash
> index eea0db0..fb287ef 100644
> --- a/package/mpv/mpv.hash
> +++ b/package/mpv/mpv.hash
> @@ -1,3 +1,2 @@
>  # Locally calculated
>  sha256	fe6ec9d2ded5ce84b963f54b812d579d04f944f4a737f3ae639c4d5d9e842b56	v0.20.0.tar.gz
> -sha256	01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b	waf-1.8.12
> diff --git a/package/mpv/mpv.mk b/package/mpv/mpv.mk
> index 4f04fdf..0c5a64f 100644
> --- a/package/mpv/mpv.mk
> +++ b/package/mpv/mpv.mk
> @@ -5,16 +5,16 @@
>  ################################################################################
>  
>  MPV_VERSION = 0.20.0
> -MPV_WAF_VERSION = 1.8.12
>  MPV_SITE = https://github.com/mpv-player/mpv/archive
>  MPV_SOURCE = v$(MPV_VERSION).tar.gz
> -MPV_EXTRA_DOWNLOADS = https://waf.io/waf-$(MPV_WAF_VERSION)
>  MPV_DEPENDENCIES = \
>  	host-pkgconf ffmpeg zlib \
>  	$(if $(BR2_PACKAGE_LIBICONV),libiconv)
>  MPV_LICENSE = GPLv2+
>  MPV_LICENSE_FILES = LICENSE
>  
> +MPV_BUNDLED_WAF = NO
> +
>  # Some of these options need testing and/or tweaks
>  MPV_CONF_OPTS = \
>  	--prefix=/usr \
> @@ -235,28 +235,4 @@ else
>  MPV_CONF_OPTS += --disable-x11
>  endif
>  
> -define MPV_COPY_WAF
> -	$(INSTALL) -m 0755 $(DL_DIR)/waf-$(MPV_WAF_VERSION) $(@D)/waf
> -endef
> -MPV_POST_EXTRACT_HOOKS += MPV_COPY_WAF
> -
> -define MPV_CONFIGURE_CMDS
> -	cd $(@D); \
> -		$(TARGET_CONFIGURE_OPTS) \
> -		./waf configure $(MPV_CONF_OPTS)
> -endef
> -
> -define MPV_BUILD_CMDS
> -	cd $(@D); \
> -		$(TARGET_MAKE_ENV) \
> -		./waf build
> -endef
> -
> -define MPV_INSTALL_TARGET_CMDS
> -	cd $(@D); \
> -		$(TARGET_MAKE_ENV) \
> -		DESTDIR=$(TARGET_DIR) \
> -		./waf install
> -endef
> -
> -$(eval $(generic-package))
> +$(eval $(waf-package))
> 

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

* [Buildroot] [PATCH 02/10] core: add waf-package infra
  2016-10-30 16:02 ` [Buildroot] [PATCH 02/10] core: add waf-package infra Yann E. MORIN
  2016-10-30 16:30   ` Romain Naour
@ 2016-11-16 23:02   ` Thomas Petazzoni
  2016-11-17 20:44     ` Yann E. MORIN
  2016-11-17 23:52     ` Arnout Vandecappelle
  2016-12-02 22:56   ` Thomas Petazzoni
  2 siblings, 2 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2016-11-16 23:02 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 30 Oct 2016 17:02:13 +0100, Yann E. MORIN wrote:
> This new waf-package infrastructure simplifies writing waf-based
> packages. It can be used by our six current such packages, plus a
> later-incoming one by Romain.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Romain Naour <romain.naour@openwide.fr>

I am generally happy with the whole series, I just have a few comments
on this specific patch, which are mainly questions. We discussed them
on IRC, but I'd like to raise the questions here as well, in case
people have some opinions.

If nobody gives some feedback, then I'm going to apply the series.


> +# If the package does not have its own waf, use our own.
> +ifeq ($$($(2)_BUNDLED_WAF),NO)

Where is the default value of this variable defined? It seems it's not
defined anywhere, while it should be set to "YES".

However, what I dislike a bit is the slightly "negative" logic of this
variable. By default, we assume packages have their bundled version of
waf, so this variable is by default assumed to be set to "YES" (even
though in fact it's empty).

Only packages that do *NOT* have a bundled version of waf can set
<pkg>_BUNDLED_WAF = NO, to tell the infrastructure to add a dependency
on host-waf.

To me it feels a bit weird to:

 1. Have a boolean that defaults to YES and that can be overridden to
    NO. I generally expects the opposite.

 2. Have a boolean that when set to "NO" actually asks the
    infrastructure to do more things. I generally expects the opposite.

So, ideally, I'd like to invert this variable, but I can't really find
a good name for it.

I propose <pkg>_NEEDS_WAF on IRC, but I'm not convinced because all
packages need waf, either bundled or external.
<pkg>_NEEDS_EXTERNAL_WAF ?

Anyone has some other proposal ?

> +# Dependency on host-python is done by host-waf
> +$(2)_DEPENDENCIES += host-waf
> +$(2)_WAF = $(HOST_DIR)/usr/bin/waf
> +else
> +# We need host-python to run the package's waf
> +$(2)_DEPENDENCIES += host-python
> +$(2)_WAF = ./waf
> +endif

Here another point where I'm hesitating. host-waf doesn't really need
to build-depend on host-python. It's *running* host-waf that requires
host-python. So I'm wondering if we shouldn't:

 1. Remove the host-python dependency from host-waf

 2. In the first case above (no bundled waf), add to the package a
    dependency on host-waf *and* host-python.

On IRC, you suggested that packages that depend on host-waf should not
have to know host-python is needed to run it, which is fair point.

So I'm opening the question to others.

> +ifndef $(2)_MAKE
> + ifdef $(3)_MAKE
> +  $(2)_MAKE = $$($(3)_MAKE)
> + else
> +  $(2)_MAKE ?= $$(MAKE)
> + endif
> +endif

Is $(2)_MAKE used anywhere in this infrastructure?

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

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

* [Buildroot] [PATCH 03/10] docs/manual: document the waf-package infra
  2016-10-30 16:02 ` [Buildroot] [PATCH 03/10] docs/manual: document the " Yann E. MORIN
  2016-10-30 16:31   ` Romain Naour
@ 2016-11-16 23:04   ` Thomas Petazzoni
  2016-11-17 20:47     ` Yann E. MORIN
  2016-12-02 22:57   ` Thomas Petazzoni
  2 siblings, 1 reply; 38+ messages in thread
From: Thomas Petazzoni @ 2016-11-16 23:04 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 30 Oct 2016 17:02:14 +0100, Yann E. MORIN wrote:

> +------------------------
> +01: ################################################################################
> +02: #
> +03: # libfoo
> +04: #
> +05: ################################################################################
> +06:
> +07: LIBFOO_VERSION = 1.0
> +08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
> +09: LIBFOO_SITE = http://www.foosoftware.org/download
> +10: LIBFOO_CONF_OPTS = --eanble-bar --disable-baz

eanble -> enable

> +On line 7, we declare the version of the package.
> +
> +On line 8 and 9, we declare the name of the tarball (xz-ed tarball
> +recommended) and the location of the tarball on the Web. Buildroot
> +will automatically download the tarball from this location.
> +
> +On line 10, we tell Buildroot what options to enable for libfoo.
> +
> +On line 11, we tell Buildroot the depednencies of libfoo.
> +
> +Finally, on line line 13, we invoke the +waf-package+
> +macro that generates all the Makefile rules that actually allows the
> +package to be built.

To be honest, I'm wondering if we shouldn't refactor the manual. This
blurb is duplicated for every package infrastructure, without adding
much value.

But clearly that's a separate matter, and your patch is good as-is.

> +* +LIBFOO_BUNDLED_WAF+ can be set to +YES+ or +NO+ to tell Buildroot to
> +  use the bundled +waf+ executable. If set to +YES+, the default, then

YES is in fact not the default :-)

> +  Buildroot will use the waf executable in the package source tree; if
> +  set to +NO+, then Buidlroot will download and install waf as a

Buildroot.

> +  host-tool.

host tool (i.e no dash in between).

No need to resend for these issues, I can fixup when applying.

Thanks,

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

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

* [Buildroot] [PATCH 02/10] core: add waf-package infra
  2016-11-16 23:02   ` Thomas Petazzoni
@ 2016-11-17 20:44     ` Yann E. MORIN
  2016-11-17 23:54       ` Arnout Vandecappelle
  2016-11-17 23:52     ` Arnout Vandecappelle
  1 sibling, 1 reply; 38+ messages in thread
From: Yann E. MORIN @ 2016-11-17 20:44 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2016-11-17 00:02 +0100, Thomas Petazzoni spake thusly:
> On Sun, 30 Oct 2016 17:02:13 +0100, Yann E. MORIN wrote:
> > This new waf-package infrastructure simplifies writing waf-based
> > packages. It can be used by our six current such packages, plus a
> > later-incoming one by Romain.
> > 
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > Cc: Romain Naour <romain.naour@openwide.fr>
> 
> I am generally happy with the whole series, I just have a few comments
> on this specific patch, which are mainly questions. We discussed them
> on IRC, but I'd like to raise the questions here as well, in case
> people have some opinions.

My answers below...

> If nobody gives some feedback, then I'm going to apply the series.

:-)

> > +# If the package does not have its own waf, use our own.
> > +ifeq ($$($(2)_BUNDLED_WAF),NO)
> 
> Where is the default value of this variable defined? It seems it's not
> defined anywhere, while it should be set to "YES".

We don't really need to set a default, because we're not testing the
default. We're only testing if it was set by the package.

> However, what I dislike a bit is the slightly "negative" logic of this
> variable. By default, we assume packages have their bundled version of
> waf, so this variable is by default assumed to be set to "YES" (even
> though in fact it's empty).
> 
> Only packages that do *NOT* have a bundled version of waf can set
> <pkg>_BUNDLED_WAF = NO, to tell the infrastructure to add a dependency
> on host-waf.
> 
> To me it feels a bit weird to:
> 
>  1. Have a boolean that defaults to YES and that can be overridden to
>     NO. I generally expects the opposite.
> 
>  2. Have a boolean that when set to "NO" actually asks the
>     infrastructure to do more things. I generally expects the opposite.
> 
> So, ideally, I'd like to invert this variable, but I can't really find
> a good name for it.
> 
> I propose <pkg>_NEEDS_WAF on IRC, but I'm not convinced because all
> packages need waf, either bundled or external.
> <pkg>_NEEDS_EXTERNAL_WAF ?

That last one is OK for me.

> Anyone has some other proposal ?
> 
> > +# Dependency on host-python is done by host-waf
> > +$(2)_DEPENDENCIES += host-waf
> > +$(2)_WAF = $(HOST_DIR)/usr/bin/waf
> > +else
> > +# We need host-python to run the package's waf
> > +$(2)_DEPENDENCIES += host-python
> > +$(2)_WAF = ./waf
> > +endif
> 
> Here another point where I'm hesitating. host-waf doesn't really need
> to build-depend on host-python. It's *running* host-waf that requires
> host-python. So I'm wondering if we shouldn't:
> 
>  1. Remove the host-python dependency from host-waf
> 
>  2. In the first case above (no bundled waf), add to the package a
>     dependency on host-waf *and* host-python.
> 
> On IRC, you suggested that packages that depend on host-waf should not
> have to know host-python is needed to run it, which is fair point.

Yes, I followed the same as we do with AUTORECONF: we automatically add
host-automake, host-autoconf, host-libtool and, if needed, host-gettext.
Packages need not add them as they are dependencies of their build
systems (autotools), not their own dependencies. The only exceptions
being packages that do need libtool for themselves (for libltdl).

Same goes for host-python: it is a dependency of the build system, not
of the package, so it should go in the infra.

> So I'm opening the question to others.
> 
> > +ifndef $(2)_MAKE
> > + ifdef $(3)_MAKE
> > +  $(2)_MAKE = $$($(3)_MAKE)
> > + else
> > +  $(2)_MAKE ?= $$(MAKE)
> > + endif
> > +endif
> 
> Is $(2)_MAKE used anywhere in this infrastructure?

Not used. I initially added it because I did contemplate converting
samba4 as well, but it does not make sense to have such support for a
single package, so I backed off. I just forgot to remove this hunk.

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

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 03/10] docs/manual: document the waf-package infra
  2016-11-16 23:04   ` Thomas Petazzoni
@ 2016-11-17 20:47     ` Yann E. MORIN
  2016-11-18  8:46       ` Thomas Petazzoni
  0 siblings, 1 reply; 38+ messages in thread
From: Yann E. MORIN @ 2016-11-17 20:47 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2016-11-17 00:04 +0100, Thomas Petazzoni spake thusly:
> On Sun, 30 Oct 2016 17:02:14 +0100, Yann E. MORIN wrote:
[--SNIP--]
> > +* +LIBFOO_BUNDLED_WAF+ can be set to +YES+ or +NO+ to tell Buildroot to
> > +  use the bundled +waf+ executable. If set to +YES+, the default, then
> YES is in fact not the default :-)

Well, "! NO" is the default. ;-)

> > +  Buildroot will use the waf executable in the package source tree; if
> > +  set to +NO+, then Buidlroot will download and install waf as a
> Buildroot.

I Like Buidlroot. It sounds like Beetlejuice. ;-]

> > +  host-tool.
> host tool (i.e no dash in between).
> 
> No need to resend for these issues, I can fixup when applying.

Will you address the variable name in the infra at the same time, or
do you prefer I respin with the rename (in which case I can fix the
manual) ?

Thanks! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 02/10] core: add waf-package infra
  2016-11-16 23:02   ` Thomas Petazzoni
  2016-11-17 20:44     ` Yann E. MORIN
@ 2016-11-17 23:52     ` Arnout Vandecappelle
  2016-11-18  8:45       ` Thomas Petazzoni
  1 sibling, 1 reply; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-11-17 23:52 UTC (permalink / raw)
  To: buildroot



On 17-11-16 00:02, Thomas Petazzoni wrote:
> Hello,
> 
> On Sun, 30 Oct 2016 17:02:13 +0100, Yann E. MORIN wrote:
[snip]
>> +# If the package does not have its own waf, use our own.
>> +ifeq ($$($(2)_BUNDLED_WAF),NO)
> 
> Where is the default value of this variable defined? It seems it's not
> defined anywhere, while it should be set to "YES".
> 
> However, what I dislike a bit is the slightly "negative" logic of this
> variable. By default, we assume packages have their bundled version of
> waf, so this variable is by default assumed to be set to "YES" (even
> though in fact it's empty).
> 
> Only packages that do *NOT* have a bundled version of waf can set
> <pkg>_BUNDLED_WAF = NO, to tell the infrastructure to add a dependency
> on host-waf.
> 
> To me it feels a bit weird to:
> 
>  1. Have a boolean that defaults to YES and that can be overridden to
>     NO. I generally expects the opposite.
> 
>  2. Have a boolean that when set to "NO" actually asks the
>     infrastructure to do more things. I generally expects the opposite.

 We have a bunch of these already: _INSTALL_TARGET, _LIBTOOL_PATCH,
_REDISTRIBUTE, .... Actually, most of them default to YES and are overridden as
NO. It's just that the most popular one (_INSTALL_STAGING) defaults to NO so
you'd think that that one is the norm.

 The only unusual thing here is that the condition checks for NO, while usually
the condition checks for YES. But turning it around we make it an ifneq which is
also a negative.

 So I'd keep it like this.


> So, ideally, I'd like to invert this variable, but I can't really find
> a good name for it.
> 
> I propose <pkg>_NEEDS_WAF on IRC, but I'm not convinced because all
> packages need waf, either bundled or external.
> <pkg>_NEEDS_EXTERNAL_WAF ?
> 
> Anyone has some other proposal ?
> 
>> +# Dependency on host-python is done by host-waf
>> +$(2)_DEPENDENCIES += host-waf
>> +$(2)_WAF = $(HOST_DIR)/usr/bin/waf
>> +else
>> +# We need host-python to run the package's waf
>> +$(2)_DEPENDENCIES += host-python
>> +$(2)_WAF = ./waf
>> +endif
> 
> Here another point where I'm hesitating. host-waf doesn't really need
> to build-depend on host-python. It's *running* host-waf that requires
> host-python. So I'm wondering if we shouldn't:
> 
>  1. Remove the host-python dependency from host-waf
> 
>  2. In the first case above (no bundled waf), add to the package a
>     dependency on host-waf *and* host-python.
> 
> On IRC, you suggested that packages that depend on host-waf should not
> have to know host-python is needed to run it, which is fair point.

 Well, it makes sense to me that a package infra does something like that, but
less so that the waf package itself would do it. And it's just simpler if the
dependency is only in the infra.

 However, I wonder if we need this dependency at all. We already require a
python (although admittedly we don't check the version). The few packages that
don't support python3 can add the dependency themselves. Building host-python
really eats into the build time...


 Regards,
 Arnout

> 
> So I'm opening the question to others.
> 
>> +ifndef $(2)_MAKE
>> + ifdef $(3)_MAKE
>> +  $(2)_MAKE = $$($(3)_MAKE)
>> + else
>> +  $(2)_MAKE ?= $$(MAKE)
>> + endif
>> +endif
> 
> Is $(2)_MAKE used anywhere in this infrastructure?
> 
> Thomas
> 

-- 
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] 38+ messages in thread

* [Buildroot] [PATCH 02/10] core: add waf-package infra
  2016-11-17 20:44     ` Yann E. MORIN
@ 2016-11-17 23:54       ` Arnout Vandecappelle
  0 siblings, 0 replies; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-11-17 23:54 UTC (permalink / raw)
  To: buildroot



On 17-11-16 21:44, Yann E. MORIN wrote:
> Thomas, All,
> 
> On 2016-11-17 00:02 +0100, Thomas Petazzoni spake thusly:
>> On Sun, 30 Oct 2016 17:02:13 +0100, Yann E. MORIN wrote:
[snip]
>>> +# If the package does not have its own waf, use our own.
>>> +ifeq ($$($(2)_BUNDLED_WAF),NO)
>>
>> Where is the default value of this variable defined? It seems it's not
>> defined anywhere, while it should be set to "YES".
> 
> We don't really need to set a default, because we're not testing the
> default. We're only testing if it was set by the package.

 We do set a default for all other YES/NO variables.


 Regards,
 Arnout

[snip]


-- 
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] 38+ messages in thread

* [Buildroot] [PATCH 02/10] core: add waf-package infra
  2016-11-17 23:52     ` Arnout Vandecappelle
@ 2016-11-18  8:45       ` Thomas Petazzoni
  2016-11-25  7:16         ` Lionel Orry
  0 siblings, 1 reply; 38+ messages in thread
From: Thomas Petazzoni @ 2016-11-18  8:45 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 18 Nov 2016 00:52:58 +0100, Arnout Vandecappelle wrote:

>  Well, it makes sense to me that a package infra does something like that, but
> less so that the waf package itself would do it. And it's just simpler if the
> dependency is only in the infra.
> 
>  However, I wonder if we need this dependency at all. We already require a
> python (although admittedly we don't check the version). The few packages that
> don't support python3 can add the dependency themselves. Building host-python
> really eats into the build time...

Is waf python2/python3 compliant?

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

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

* [Buildroot] [PATCH 03/10] docs/manual: document the waf-package infra
  2016-11-17 20:47     ` Yann E. MORIN
@ 2016-11-18  8:46       ` Thomas Petazzoni
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2016-11-18  8:46 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 17 Nov 2016 21:47:39 +0100, Yann E. MORIN wrote:
> Thomas, All,
> 
> On 2016-11-17 00:04 +0100, Thomas Petazzoni spake thusly:
> > On Sun, 30 Oct 2016 17:02:14 +0100, Yann E. MORIN wrote:  
> [--SNIP--]
> > > +* +LIBFOO_BUNDLED_WAF+ can be set to +YES+ or +NO+ to tell Buildroot to
> > > +  use the bundled +waf+ executable. If set to +YES+, the default, then  
> > YES is in fact not the default :-)  
> 
> Well, "! NO" is the default. ;-)

Nope, I think you're getting it wrong like on IRC. The default is
actually empty, which means "YES", i.e "the waf script is bundled and
there is no need to add a dependency on host-waf".

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

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

* [Buildroot] [PATCH 02/10] core: add waf-package infra
  2016-11-18  8:45       ` Thomas Petazzoni
@ 2016-11-25  7:16         ` Lionel Orry
  0 siblings, 0 replies; 38+ messages in thread
From: Lionel Orry @ 2016-11-25  7:16 UTC (permalink / raw)
  To: buildroot

Hi all,

On Fri, Nov 18, 2016 at 9:45 AM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello,
>
> On Fri, 18 Nov 2016 00:52:58 +0100, Arnout Vandecappelle wrote:
>
> >  Well, it makes sense to me that a package infra does something like
> that, but
> > less so that the waf package itself would do it. And it's just simpler
> if the
> > dependency is only in the infra.
> >
> >  However, I wonder if we need this dependency at all. We already require
> a
> > python (although admittedly we don't check the version). The few
> packages that
> > don't support python3 can add the dependency themselves. Building
> host-python
> > really eats into the build time...
>
> Is waf python2/python3 compliant?
>

?Yes, see here : https://waf.io/book/#_how_to_run_waf?
AFAIK, there is an internal wrapper to make code compatible with both
versions (https://github.com/waf-project/waf/blob/master/waflib/fixpy2.py).

>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>

?Kind regards,
Lionel?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20161125/9336784e/attachment.html>

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

* [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages
  2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
                   ` (10 preceding siblings ...)
  2016-10-30 16:12 ` [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Romain Naour
@ 2016-12-02 22:55 ` Thomas Petazzoni
  11 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2016-12-02 22:55 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 30 Oct 2016 17:02:18 +0100, Yann E. MORIN wrote:

> Yann E. MORIN (10):
>       package/waf: new host package
>       core: add waf-package infra
>       docs/manual: document the waf-package infra
>       developpers: add myself as pkg-waf devel
>       package/glmark2: make it a waf-package
>       package/gst1-imx: make it a waf-package
>       package/jack2: make it a waf-package
>       package/libimxvpuapi: make it a waf-package
>       package/mpv: make it a waf-package
>       package/norm: make it a waf-package

All applied to master, with a few tweaks on the first three patches.
I'll reply to them separately.

Thanks!

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

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

* [Buildroot] [PATCH 01/10] package/waf: new host package
  2016-10-30 16:02 ` [Buildroot] [PATCH 01/10] package/waf: new host package Yann E. MORIN
  2016-10-30 16:21   ` Romain Naour
@ 2016-12-02 22:55   ` Thomas Petazzoni
  1 sibling, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2016-12-02 22:55 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 30 Oct 2016 17:02:12 +0100, Yann E. MORIN wrote:

> +WAF_VERSION = 1.9.5
> +WAF_SOURCE = waf-$(WAF_VERSION)
> +WAF_SITE = https://waf.io/
> +
> +# Waf is a python script, compatible with any python >= 2.6, but some
> +# packages have wafscripts not compatible with python3. So always use
> +# python2.
> +#
> +# We don't really need host-python to install host-waf, but having this
> +# dependency here will hide it from packages themselves
> +HOST_WAF_DEPENDENCIES = host-python

As we discussed during the review, and I think as the general consensus
was, I've dropped this dependency: the infra is responsible for it.

Thanks!

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

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

* [Buildroot] [PATCH 02/10] core: add waf-package infra
  2016-10-30 16:02 ` [Buildroot] [PATCH 02/10] core: add waf-package infra Yann E. MORIN
  2016-10-30 16:30   ` Romain Naour
  2016-11-16 23:02   ` Thomas Petazzoni
@ 2016-12-02 22:56   ` Thomas Petazzoni
  2 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2016-12-02 22:56 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 30 Oct 2016 17:02:13 +0100, Yann E. MORIN wrote:

> +# If the package does not have its own waf, use our own.
> +ifeq ($$($(2)_BUNDLED_WAF),NO)

I've renamed this variable to _NEEDS_EXTERNAL_WAF, which inverts its
logic. It's explicitly defined to NO by default, and when set to YES, a
dependency on host-waf is needed.

> +# Dependency on host-python is done by host-waf
> +$(2)_DEPENDENCIES += host-waf
> +$(2)_WAF = $(HOST_DIR)/usr/bin/waf
> +else
> +# We need host-python to run the package's waf
> +$(2)_DEPENDENCIES += host-python

This line has been moved out of the condition, since it's now needed
for both the "bundled waf" and "external waf" cases.

> +ifndef $(2)_MAKE
> + ifdef $(3)_MAKE
> +  $(2)_MAKE = $$($(3)_MAKE)
> + else
> +  $(2)_MAKE ?= $$(MAKE)
> + endif
> +endif

I've dropped this as it wasn't needed.

Thanks!

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

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

* [Buildroot] [PATCH 03/10] docs/manual: document the waf-package infra
  2016-10-30 16:02 ` [Buildroot] [PATCH 03/10] docs/manual: document the " Yann E. MORIN
  2016-10-30 16:31   ` Romain Naour
  2016-11-16 23:04   ` Thomas Petazzoni
@ 2016-12-02 22:57   ` Thomas Petazzoni
  2 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2016-12-02 22:57 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 30 Oct 2016 17:02:14 +0100, Yann E. MORIN wrote:
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Romain Naour <romain.naour@openwide.fr>

Applied with a few tweaks, see below.

> +10: LIBFOO_CONF_OPTS = --eanble-bar --disable-baz

Typo fixed.

> +* +LIBFOO_BUNDLED_WAF+ can be set to +YES+ or +NO+ to tell Buildroot to
> +  use the bundled +waf+ executable. If set to +YES+, the default, then
> +  Buildroot will use the waf executable in the package source tree; if
> +  set to +NO+, then Buidlroot will download and install waf as a
> +  host-tool.

I've obviously reworded this paragraph quite a bit to take into account
the new name of the variable, LIBFOO_NEEDS_EXTERNAL_WAF.

Thanks!

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

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

* [Buildroot] [PATCH 09/10] package/mpv: make it a waf-package
  2016-10-30 16:02 ` [Buildroot] [PATCH 09/10] package/mpv: " Yann E. MORIN
  2016-11-02 22:42   ` Romain Naour
@ 2016-12-02 22:58   ` Thomas Petazzoni
  1 sibling, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2016-12-02 22:58 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 30 Oct 2016 17:02:20 +0100, Yann E. MORIN wrote:

> +MPV_BUNDLED_WAF = NO

Applied with this line changed to MPV_NEEDS_EXTERNAL_WAF = YES.

Thanks!

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

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

end of thread, other threads:[~2016-12-02 22:58 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-30 16:02 [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Yann E. MORIN
2016-10-30 16:02 ` [Buildroot] [PATCH 01/10] package/waf: new host package Yann E. MORIN
2016-10-30 16:21   ` Romain Naour
2016-12-02 22:55   ` Thomas Petazzoni
2016-10-30 16:02 ` [Buildroot] [PATCH 02/10] core: add waf-package infra Yann E. MORIN
2016-10-30 16:30   ` Romain Naour
2016-11-16 23:02   ` Thomas Petazzoni
2016-11-17 20:44     ` Yann E. MORIN
2016-11-17 23:54       ` Arnout Vandecappelle
2016-11-17 23:52     ` Arnout Vandecappelle
2016-11-18  8:45       ` Thomas Petazzoni
2016-11-25  7:16         ` Lionel Orry
2016-12-02 22:56   ` Thomas Petazzoni
2016-10-30 16:02 ` [Buildroot] [PATCH 03/10] docs/manual: document the " Yann E. MORIN
2016-10-30 16:31   ` Romain Naour
2016-11-16 23:04   ` Thomas Petazzoni
2016-11-17 20:47     ` Yann E. MORIN
2016-11-18  8:46       ` Thomas Petazzoni
2016-12-02 22:57   ` Thomas Petazzoni
2016-10-30 16:02 ` [Buildroot] [PATCH 04/10] developpers: add myself as pkg-waf devel Yann E. MORIN
2016-10-30 16:31   ` Romain Naour
2016-10-30 16:02 ` [Buildroot] [PATCH 05/10] package/glmark2: make it a waf-package Yann E. MORIN
2016-10-30 16:33   ` Romain Naour
2016-10-30 16:02 ` [Buildroot] [PATCH 06/10] package/gst1-imx: " Yann E. MORIN
2016-10-30 16:35   ` Romain Naour
2016-11-01 10:52     ` Gary Bisson
2016-10-30 16:02 ` [Buildroot] [PATCH 07/10] package/jack2: " Yann E. MORIN
2016-10-30 16:38   ` Romain Naour
2016-10-30 16:02 ` [Buildroot] [PATCH 08/10] package/libimxvpuapi: " Yann E. MORIN
2016-10-30 16:39   ` Romain Naour
2016-11-01 10:52     ` Gary Bisson
2016-10-30 16:02 ` [Buildroot] [PATCH 09/10] package/mpv: " Yann E. MORIN
2016-11-02 22:42   ` Romain Naour
2016-12-02 22:58   ` Thomas Petazzoni
2016-10-30 16:02 ` [Buildroot] [PATCH 10/10] package/norm: " Yann E. MORIN
2016-10-30 16:40   ` Romain Naour
2016-10-30 16:12 ` [Buildroot] [PATCH 00/10] core: add waf-package infra, convert packages Romain Naour
2016-12-02 22:55 ` Thomas Petazzoni

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.