Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 01/20] package/libgles: rename the _HAS and _PROVIDES variables
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-04-04 16:41   ` Arnout Vandecappelle
  2014-03-10 20:27 ` [Buildroot] [PATCH 02/20] package/libegl: " Yann E. MORIN
                   ` (18 subsequent siblings)
  19 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

The basic rule for a package is to have its options named
after the package name. There is no reason this should not
also be the case for virtual packages.

Besides, this will allow us to switch libgles to use the
soon-to-be-introduced virtual-package infrastructure.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Cc: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/cairo/cairo.mk                           | 2 +-
 package/freescale-imx/gpu-viv-bin-mx6q/Config.in | 4 ++--
 package/gstreamer1/gst1-plugins-bad/Config.in    | 2 +-
 package/opengl/libgles/Config.in                 | 6 +++---
 package/opengl/libgles/libgles.mk                | 4 ++--
 package/qt/Config.in                             | 2 +-
 package/qt5/qt5base/Config.in                    | 4 ++--
 package/qt5/qt5declarative/Config.in             | 4 ++--
 package/qt5/qt5graphicaleffects/Config.in        | 4 ++--
 package/qt5/qt5multimedia/Config.in              | 4 ++--
 package/qt5/qt5quick1/Config.in                  | 4 ++--
 package/qt5/qt5quickcontrols/Config.in           | 4 ++--
 package/rpi-userland/Config.in                   | 4 ++--
 package/sunxi-mali/Config.in                     | 4 ++--
 package/ti-gfx/Config.in                         | 4 ++--
 15 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk
index aa03a27..ee58aff 100644
--- a/package/cairo/cairo.mk
+++ b/package/cairo/cairo.mk
@@ -54,7 +54,7 @@ else
 	CAIRO_CONF_OPT += --disable-directfb
 endif
 
-ifeq ($(BR2_PACKAGE_HAS_OPENGL_ES),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
 	CAIRO_CONF_OPT += --enable-glesv2
 	CAIRO_DEPENDENCIES += libgles
 else
diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/Config.in b/package/freescale-imx/gpu-viv-bin-mx6q/Config.in
index e084568..379402d 100644
--- a/package/freescale-imx/gpu-viv-bin-mx6q/Config.in
+++ b/package/freescale-imx/gpu-viv-bin-mx6q/Config.in
@@ -5,7 +5,7 @@ comment "gpu-viv-bin-mx6q needs an (e)glibc toolchain"
 config BR2_PACKAGE_GPU_VIV_BIN_MX6Q
 	bool "gpu-viv-bin-mx6q"
 	select BR2_PACKAGE_HAS_OPENGL_EGL
-	select BR2_PACKAGE_HAS_OPENGL_ES
+	select BR2_PACKAGE_HAS_LIBGLES
 	select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
 	depends on BR2_arm # Only relevant for i.MX6
@@ -27,7 +27,7 @@ if BR2_PACKAGE_GPU_VIV_BIN_MX6Q
 config BR2_PACKAGE_PROVIDES_OPENGL_EGL
 	default "gpu-viv-bin-mx6q"
 
-config BR2_PACKAGE_PROVIDES_OPENGL_ES
+config BR2_PACKAGE_PROVIDES_LIBGLES
 	default "gpu-viv-bin-mx6q"
 
 config BR2_PACKAGE_GPU_VIV_BIN_MX6Q_EXAMPLES
diff --git a/package/gstreamer1/gst1-plugins-bad/Config.in b/package/gstreamer1/gst1-plugins-bad/Config.in
index 2c5c290..25e379f 100644
--- a/package/gstreamer1/gst1-plugins-bad/Config.in
+++ b/package/gstreamer1/gst1-plugins-bad/Config.in
@@ -464,7 +464,7 @@ comment "rsvg plugin needs a toolchain w/ C++, wchar, threads"
 
 config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_EGLGLES
 	bool "eglgles"
-	depends on BR2_PACKAGE_HAS_OPENGL_EGL && BR2_PACKAGE_HAS_OPENGL_ES
+	depends on BR2_PACKAGE_HAS_OPENGL_EGL && BR2_PACKAGE_HAS_LIBGLES
 	help
 	  EGL/GLES sink
 
diff --git a/package/opengl/libgles/Config.in b/package/opengl/libgles/Config.in
index 75ccfc8..b7b800f 100644
--- a/package/opengl/libgles/Config.in
+++ b/package/opengl/libgles/Config.in
@@ -1,6 +1,6 @@
-config BR2_PACKAGE_HAS_OPENGL_ES
+config BR2_PACKAGE_HAS_LIBGLES
 	bool
 
-config BR2_PACKAGE_PROVIDES_OPENGL_ES
-	depends on BR2_PACKAGE_HAS_OPENGL_ES
+config BR2_PACKAGE_PROVIDES_LIBGLES
+	depends on BR2_PACKAGE_HAS_LIBGLES
 	string
diff --git a/package/opengl/libgles/libgles.mk b/package/opengl/libgles/libgles.mk
index 7a07e37..041e378 100644
--- a/package/opengl/libgles/libgles.mk
+++ b/package/opengl/libgles/libgles.mk
@@ -5,9 +5,9 @@
 ################################################################################
 
 LIBGLES_SOURCE =
-LIBGLES_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENGL_ES))
+LIBGLES_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LIBGLES))
 
-ifeq ($(BR2_PACKAGE_HAS_OPENGL_ES),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
 ifeq ($(LIBGLES_DEPENDENCIES),)
 $(error No libGLES implementation selected. Configuration error.)
 endif
diff --git a/package/qt/Config.in b/package/qt/Config.in
index 5105e5d..d3f6a5a 100644
--- a/package/qt/Config.in
+++ b/package/qt/Config.in
@@ -294,7 +294,7 @@ config BR2_PACKAGE_QT_PHONON_BACKEND
 
 config BR2_PACKAGE_QT_OPENGL_ES
 	bool "OpenGL ES v2.x support"
-	depends on BR2_PACKAGE_HAS_OPENGL_ES
+	depends on BR2_PACKAGE_HAS_LIBGLES
 	depends on BR2_PACKAGE_HAS_OPENGL_EGL
 	help
 	  Enable the OpenGL ES v2.x support.
diff --git a/package/qt5/qt5base/Config.in b/package/qt5/qt5base/Config.in
index 5c404d1..437b1d2 100644
--- a/package/qt5/qt5base/Config.in
+++ b/package/qt5/qt5base/Config.in
@@ -138,10 +138,10 @@ comment "X.org XCB backend available if X.org is enabled"
 config BR2_PACKAGE_QT5BASE_EGLFS
 	bool "eglfs support"
 	depends on BR2_PACKAGE_HAS_OPENGL_EGL
-	depends on BR2_PACKAGE_HAS_OPENGL_ES
+	depends on BR2_PACKAGE_HAS_LIBGLES
 
 comment "eglfs backend available if OpenGLES and EGL are enabled"
-	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES
+	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES
 
 config BR2_PACKAGE_QT5BASE_PRINTSUPPORT
 	bool "print support module"
diff --git a/package/qt5/qt5declarative/Config.in b/package/qt5/qt5declarative/Config.in
index c5753b1..5e1516d 100644
--- a/package/qt5/qt5declarative/Config.in
+++ b/package/qt5/qt5declarative/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_QT5DECLARATIVE
 	select BR2_PACKAGE_QT5BASE_GUI
 	select BR2_PACKAGE_QT5BASE_EGLFS
 	depends on BR2_PACKAGE_HAS_OPENGL_EGL
-	depends on BR2_PACKAGE_HAS_OPENGL_ES
+	depends on BR2_PACKAGE_HAS_LIBGLES
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
 	help
 	  Qt is a cross-platform application and UI framework for
@@ -16,5 +16,5 @@ config BR2_PACKAGE_QT5DECLARATIVE
 	  http://qt-project.org
 
 comment "qt5declarative requires an OpenGL-capable backend"
-	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \
+	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES) && \
 		BR2_PACKAGE_QT5_JSCORE_AVAILABLE
diff --git a/package/qt5/qt5graphicaleffects/Config.in b/package/qt5/qt5graphicaleffects/Config.in
index f4029e9..a821b40 100644
--- a/package/qt5/qt5graphicaleffects/Config.in
+++ b/package/qt5/qt5graphicaleffects/Config.in
@@ -4,7 +4,7 @@ config BR2_PACKAGE_QT5GRAPHICALEFFECTS
 	select BR2_PACKAGE_QT5DECLARATIVE
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
 	depends on BR2_PACKAGE_HAS_OPENGL_EGL
-	depends on BR2_PACKAGE_HAS_OPENGL_ES
+	depends on BR2_PACKAGE_HAS_LIBGLES
 	help
 	  Qt is a cross-platform application and UI framework for
 	  developers using C++.
@@ -14,5 +14,5 @@ config BR2_PACKAGE_QT5GRAPHICALEFFECTS
 	  http://qt-project.org
 
 comment "qt5graphicaleffects requires an OpenGL-capable backend"
-	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \
+	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES) && \
 		BR2_PACKAGE_QT5_JSCORE_AVAILABLE
diff --git a/package/qt5/qt5multimedia/Config.in b/package/qt5/qt5multimedia/Config.in
index 53b7f86..765bdc1 100644
--- a/package/qt5/qt5multimedia/Config.in
+++ b/package/qt5/qt5multimedia/Config.in
@@ -3,7 +3,7 @@ config BR2_PACKAGE_QT5MULTIMEDIA
 	select BR2_PACKAGE_QT5BASE
 	select BR2_PACKAGE_QT5DECLARATIVE
 	depends on BR2_PACKAGE_HAS_OPENGL_EGL
-	depends on BR2_PACKAGE_HAS_OPENGL_ES
+	depends on BR2_PACKAGE_HAS_LIBGLES
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
 	help
 	  Qt is a cross-platform application and UI framework for
@@ -14,5 +14,5 @@ config BR2_PACKAGE_QT5MULTIMEDIA
 	  http://qt-project.org
 
 comment "qt5multimedia requires an OpenGL-capable backend"
-	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \
+	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES) && \
 		BR2_PACKAGE_QT5_JSCORE_AVAILABLE
diff --git a/package/qt5/qt5quick1/Config.in b/package/qt5/qt5quick1/Config.in
index 1a0b8bf..1ffcc0d 100644
--- a/package/qt5/qt5quick1/Config.in
+++ b/package/qt5/qt5quick1/Config.in
@@ -9,7 +9,7 @@ config BR2_PACKAGE_QT5QUICK1
 	# This module does not support static linking
 	depends on !BR2_PREFER_STATIC_LIB
 	depends on BR2_PACKAGE_HAS_OPENGL_EGL
-	depends on BR2_PACKAGE_HAS_OPENGL_ES
+	depends on BR2_PACKAGE_HAS_LIBGLES
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
 	help
 	  Qt is a cross-platform application and UI framework for
@@ -21,5 +21,5 @@ config BR2_PACKAGE_QT5QUICK1
 
 comment "qt5quick1 needs a toolchain w/ dynamic library and an OpenGL-capable backend"
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
-	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES || \
+	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES || \
 		BR2_PREFER_STATIC_LIB
diff --git a/package/qt5/qt5quickcontrols/Config.in b/package/qt5/qt5quickcontrols/Config.in
index e72f2a4..355aef0 100644
--- a/package/qt5/qt5quickcontrols/Config.in
+++ b/package/qt5/qt5quickcontrols/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_QT5QUICKCONTROLS
 	select BR2_PACKAGE_QT5DECLARATIVE
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
 	depends on BR2_PACKAGE_HAS_OPENGL_EGL
-	depends on BR2_PACKAGE_HAS_OPENGL_ES
+	depends on BR2_PACKAGE_HAS_LIBGLES
 	help
 	  Qt is a cross-platform application and UI framework for
 	  developers using C++.
@@ -15,5 +15,5 @@ config BR2_PACKAGE_QT5QUICKCONTROLS
 	  http://qt-project.org
 
 comment "qt5quickcontrols requires an OpenGL-capable backend"
-	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \
+	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES) && \
 		BR2_PACKAGE_QT5_JSCORE_AVAILABLE
diff --git a/package/rpi-userland/Config.in b/package/rpi-userland/Config.in
index 2303942..68b535b 100644
--- a/package/rpi-userland/Config.in
+++ b/package/rpi-userland/Config.in
@@ -5,7 +5,7 @@ config BR2_PACKAGE_RPI_USERLAND
 	depends on BR2_LARGEFILE
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_HAS_OPENGL_EGL
-	select BR2_PACKAGE_HAS_OPENGL_ES
+	select BR2_PACKAGE_HAS_LIBGLES
 	select BR2_PACKAGE_HAS_OPENVG
 	select BR2_PACKAGE_HAS_OPENMAX
 	help
@@ -22,7 +22,7 @@ if BR2_PACKAGE_RPI_USERLAND
 config BR2_PACKAGE_PROVIDES_OPENGL_EGL
 	default "rpi-userland"
 
-config BR2_PACKAGE_PROVIDES_OPENGL_ES
+config BR2_PACKAGE_PROVIDES_LIBGLES
 	default "rpi-userland"
 
 config BR2_PACKAGE_PROVIDES_OPENVG
diff --git a/package/sunxi-mali/Config.in b/package/sunxi-mali/Config.in
index 9f188a3..c47b6a3 100644
--- a/package/sunxi-mali/Config.in
+++ b/package/sunxi-mali/Config.in
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_SUNXI_MALI
 	bool "sunxi-mali"
 	select BR2_PACKAGE_HAS_OPENGL_EGL
-	select BR2_PACKAGE_HAS_OPENGL_ES
+	select BR2_PACKAGE_HAS_LIBGLES
 	# The egl/gles mali libraries are provided as a git submodule of the
 	# sunxi-mali repo and are downloaded by the sunxi-mali-prop package.
 	select BR2_PACKAGE_SUNXI_MALI_PROP
@@ -21,7 +21,7 @@ if BR2_PACKAGE_SUNXI_MALI
 config BR2_PACKAGE_PROVIDES_OPENGL_EGL
 	default "sunxi-mali"
 
-config BR2_PACKAGE_PROVIDES_OPENGL_ES
+config BR2_PACKAGE_PROVIDES_LIBGLES
 	default "sunxi-mali"
 
 config BR2_PACKAGE_SUNXI_MALI_DBG
diff --git a/package/ti-gfx/Config.in b/package/ti-gfx/Config.in
index f455f4c..2bdc972 100644
--- a/package/ti-gfx/Config.in
+++ b/package/ti-gfx/Config.in
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_TI_GFX
 	bool "ti-gfx"
 	select BR2_PACKAGE_HAS_OPENGL_EGL
-	select BR2_PACKAGE_HAS_OPENGL_ES
+	select BR2_PACKAGE_HAS_LIBGLES
 	select BR2_PACKAGE_HAS_POWERVR
 	depends on BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC && BR2_arm
 	help
@@ -14,7 +14,7 @@ if BR2_PACKAGE_TI_GFX
 config BR2_PACKAGE_PROVIDES_OPENGL_EGL
 	default "ti-gfx"
 
-config BR2_PACKAGE_PROVIDES_OPENGL_ES
+config BR2_PACKAGE_PROVIDES_LIBGLES
 	default "ti-gfx"
 
 config BR2_PACKAGE_PROVIDES_POWERVR
-- 
1.8.3.2

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

* [Buildroot] [PATCH 02/20] package/libegl: rename the _HAS and _PROVIDES variables
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 01/20] package/libgles: rename the _HAS and _PROVIDES variables Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 03/20] package/libopenmax: " Yann E. MORIN
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

The basic rule for a package is to have its options named
after the package name. There is no reason this should not
also be the case for virtual packages.

Besides, this will allow us to switch libegl to use the
soon-to-be-introduced virtual-package infrastructure.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Cc: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/freescale-imx/gpu-viv-bin-mx6q/Config.in | 4 ++--
 package/gstreamer1/gst1-plugins-bad/Config.in    | 2 +-
 package/opengl/libegl/Config.in                  | 6 +++---
 package/opengl/libegl/libegl.mk                  | 4 ++--
 package/qt/Config.in                             | 2 +-
 package/qt5/qt5base/Config.in                    | 4 ++--
 package/qt5/qt5declarative/Config.in             | 4 ++--
 package/qt5/qt5graphicaleffects/Config.in        | 4 ++--
 package/qt5/qt5multimedia/Config.in              | 4 ++--
 package/qt5/qt5quick1/Config.in                  | 4 ++--
 package/qt5/qt5quickcontrols/Config.in           | 4 ++--
 package/rpi-userland/Config.in                   | 4 ++--
 package/sunxi-mali/Config.in                     | 4 ++--
 package/ti-gfx/Config.in                         | 4 ++--
 14 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/Config.in b/package/freescale-imx/gpu-viv-bin-mx6q/Config.in
index 379402d..864c605 100644
--- a/package/freescale-imx/gpu-viv-bin-mx6q/Config.in
+++ b/package/freescale-imx/gpu-viv-bin-mx6q/Config.in
@@ -4,7 +4,7 @@ comment "gpu-viv-bin-mx6q needs an (e)glibc toolchain"
 
 config BR2_PACKAGE_GPU_VIV_BIN_MX6Q
 	bool "gpu-viv-bin-mx6q"
-	select BR2_PACKAGE_HAS_OPENGL_EGL
+	select BR2_PACKAGE_HAS_LIBEGL
 	select BR2_PACKAGE_HAS_LIBGLES
 	select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
@@ -24,7 +24,7 @@ config BR2_PACKAGE_GPU_VIV_BIN_MX6Q
 
 if BR2_PACKAGE_GPU_VIV_BIN_MX6Q
 
-config BR2_PACKAGE_PROVIDES_OPENGL_EGL
+config BR2_PACKAGE_PROVIDES_LIBEGL
 	default "gpu-viv-bin-mx6q"
 
 config BR2_PACKAGE_PROVIDES_LIBGLES
diff --git a/package/gstreamer1/gst1-plugins-bad/Config.in b/package/gstreamer1/gst1-plugins-bad/Config.in
index 25e379f..2acb5a1 100644
--- a/package/gstreamer1/gst1-plugins-bad/Config.in
+++ b/package/gstreamer1/gst1-plugins-bad/Config.in
@@ -464,7 +464,7 @@ comment "rsvg plugin needs a toolchain w/ C++, wchar, threads"
 
 config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_EGLGLES
 	bool "eglgles"
-	depends on BR2_PACKAGE_HAS_OPENGL_EGL && BR2_PACKAGE_HAS_LIBGLES
+	depends on BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGLES
 	help
 	  EGL/GLES sink
 
diff --git a/package/opengl/libegl/Config.in b/package/opengl/libegl/Config.in
index 2d81a20..8401bb2 100644
--- a/package/opengl/libegl/Config.in
+++ b/package/opengl/libegl/Config.in
@@ -1,6 +1,6 @@
-config BR2_PACKAGE_HAS_OPENGL_EGL
+config BR2_PACKAGE_HAS_LIBEGL
 	bool
 
-config BR2_PACKAGE_PROVIDES_OPENGL_EGL
-	depends on BR2_PACKAGE_HAS_OPENGL_EGL
+config BR2_PACKAGE_PROVIDES_LIBEGL
+	depends on BR2_PACKAGE_HAS_LIBEGL
 	string
diff --git a/package/opengl/libegl/libegl.mk b/package/opengl/libegl/libegl.mk
index 3311e50..2e399ce 100644
--- a/package/opengl/libegl/libegl.mk
+++ b/package/opengl/libegl/libegl.mk
@@ -5,9 +5,9 @@
 ################################################################################
 
 LIBEGL_SOURCE =
-LIBEGL_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENGL_EGL))
+LIBEGL_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LIBEGL))
 
-ifeq ($(BR2_PACKAGE_HAS_OPENGL_EGL),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
 ifeq ($(LIBEGL_DEPENDENCIES),)
 $(error No libEGL implementation selected. Configuration error.)
 endif
diff --git a/package/qt/Config.in b/package/qt/Config.in
index d3f6a5a..eed25c8 100644
--- a/package/qt/Config.in
+++ b/package/qt/Config.in
@@ -295,7 +295,7 @@ config BR2_PACKAGE_QT_PHONON_BACKEND
 config BR2_PACKAGE_QT_OPENGL_ES
 	bool "OpenGL ES v2.x support"
 	depends on BR2_PACKAGE_HAS_LIBGLES
-	depends on BR2_PACKAGE_HAS_OPENGL_EGL
+	depends on BR2_PACKAGE_HAS_LIBEGL
 	help
 	  Enable the OpenGL ES v2.x support.
 
diff --git a/package/qt5/qt5base/Config.in b/package/qt5/qt5base/Config.in
index 437b1d2..5d5b7f6 100644
--- a/package/qt5/qt5base/Config.in
+++ b/package/qt5/qt5base/Config.in
@@ -137,11 +137,11 @@ comment "X.org XCB backend available if X.org is enabled"
 
 config BR2_PACKAGE_QT5BASE_EGLFS
 	bool "eglfs support"
-	depends on BR2_PACKAGE_HAS_OPENGL_EGL
+	depends on BR2_PACKAGE_HAS_LIBEGL
 	depends on BR2_PACKAGE_HAS_LIBGLES
 
 comment "eglfs backend available if OpenGLES and EGL are enabled"
-	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES
+	depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_HAS_LIBGLES
 
 config BR2_PACKAGE_QT5BASE_PRINTSUPPORT
 	bool "print support module"
diff --git a/package/qt5/qt5declarative/Config.in b/package/qt5/qt5declarative/Config.in
index 5e1516d..4a6e805 100644
--- a/package/qt5/qt5declarative/Config.in
+++ b/package/qt5/qt5declarative/Config.in
@@ -4,7 +4,7 @@ config BR2_PACKAGE_QT5DECLARATIVE
 	select BR2_PACKAGE_QT5BASE
 	select BR2_PACKAGE_QT5BASE_GUI
 	select BR2_PACKAGE_QT5BASE_EGLFS
-	depends on BR2_PACKAGE_HAS_OPENGL_EGL
+	depends on BR2_PACKAGE_HAS_LIBEGL
 	depends on BR2_PACKAGE_HAS_LIBGLES
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
 	help
@@ -16,5 +16,5 @@ config BR2_PACKAGE_QT5DECLARATIVE
 	  http://qt-project.org
 
 comment "qt5declarative requires an OpenGL-capable backend"
-	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES) && \
+	depends on (!BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_HAS_LIBGLES) && \
 		BR2_PACKAGE_QT5_JSCORE_AVAILABLE
diff --git a/package/qt5/qt5graphicaleffects/Config.in b/package/qt5/qt5graphicaleffects/Config.in
index a821b40..2747af8 100644
--- a/package/qt5/qt5graphicaleffects/Config.in
+++ b/package/qt5/qt5graphicaleffects/Config.in
@@ -3,7 +3,7 @@ config BR2_PACKAGE_QT5GRAPHICALEFFECTS
 	select BR2_PACKAGE_QT5BASE
 	select BR2_PACKAGE_QT5DECLARATIVE
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
-	depends on BR2_PACKAGE_HAS_OPENGL_EGL
+	depends on BR2_PACKAGE_HAS_LIBEGL
 	depends on BR2_PACKAGE_HAS_LIBGLES
 	help
 	  Qt is a cross-platform application and UI framework for
@@ -14,5 +14,5 @@ config BR2_PACKAGE_QT5GRAPHICALEFFECTS
 	  http://qt-project.org
 
 comment "qt5graphicaleffects requires an OpenGL-capable backend"
-	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES) && \
+	depends on (!BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_HAS_LIBGLES) && \
 		BR2_PACKAGE_QT5_JSCORE_AVAILABLE
diff --git a/package/qt5/qt5multimedia/Config.in b/package/qt5/qt5multimedia/Config.in
index 765bdc1..c00491c 100644
--- a/package/qt5/qt5multimedia/Config.in
+++ b/package/qt5/qt5multimedia/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_QT5MULTIMEDIA
 	bool "qt5multimedia"
 	select BR2_PACKAGE_QT5BASE
 	select BR2_PACKAGE_QT5DECLARATIVE
-	depends on BR2_PACKAGE_HAS_OPENGL_EGL
+	depends on BR2_PACKAGE_HAS_LIBEGL
 	depends on BR2_PACKAGE_HAS_LIBGLES
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
 	help
@@ -14,5 +14,5 @@ config BR2_PACKAGE_QT5MULTIMEDIA
 	  http://qt-project.org
 
 comment "qt5multimedia requires an OpenGL-capable backend"
-	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES) && \
+	depends on (!BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_HAS_LIBGLES) && \
 		BR2_PACKAGE_QT5_JSCORE_AVAILABLE
diff --git a/package/qt5/qt5quick1/Config.in b/package/qt5/qt5quick1/Config.in
index 1ffcc0d..30c2e79 100644
--- a/package/qt5/qt5quick1/Config.in
+++ b/package/qt5/qt5quick1/Config.in
@@ -8,7 +8,7 @@ config BR2_PACKAGE_QT5QUICK1
 	select BR2_PACKAGE_QT5DECLARATIVE
 	# This module does not support static linking
 	depends on !BR2_PREFER_STATIC_LIB
-	depends on BR2_PACKAGE_HAS_OPENGL_EGL
+	depends on BR2_PACKAGE_HAS_LIBEGL
 	depends on BR2_PACKAGE_HAS_LIBGLES
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
 	help
@@ -21,5 +21,5 @@ config BR2_PACKAGE_QT5QUICK1
 
 comment "qt5quick1 needs a toolchain w/ dynamic library and an OpenGL-capable backend"
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
-	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES || \
+	depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_HAS_LIBGLES || \
 		BR2_PREFER_STATIC_LIB
diff --git a/package/qt5/qt5quickcontrols/Config.in b/package/qt5/qt5quickcontrols/Config.in
index 355aef0..c350a74 100644
--- a/package/qt5/qt5quickcontrols/Config.in
+++ b/package/qt5/qt5quickcontrols/Config.in
@@ -4,7 +4,7 @@ config BR2_PACKAGE_QT5QUICKCONTROLS
 	select BR2_PACKAGE_QT5BASE_NETWORK
 	select BR2_PACKAGE_QT5DECLARATIVE
 	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
-	depends on BR2_PACKAGE_HAS_OPENGL_EGL
+	depends on BR2_PACKAGE_HAS_LIBEGL
 	depends on BR2_PACKAGE_HAS_LIBGLES
 	help
 	  Qt is a cross-platform application and UI framework for
@@ -15,5 +15,5 @@ config BR2_PACKAGE_QT5QUICKCONTROLS
 	  http://qt-project.org
 
 comment "qt5quickcontrols requires an OpenGL-capable backend"
-	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES) && \
+	depends on (!BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_HAS_LIBGLES) && \
 		BR2_PACKAGE_QT5_JSCORE_AVAILABLE
diff --git a/package/rpi-userland/Config.in b/package/rpi-userland/Config.in
index 68b535b..4a82c9d 100644
--- a/package/rpi-userland/Config.in
+++ b/package/rpi-userland/Config.in
@@ -4,7 +4,7 @@ config BR2_PACKAGE_RPI_USERLAND
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_LARGEFILE
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	select BR2_PACKAGE_HAS_OPENGL_EGL
+	select BR2_PACKAGE_HAS_LIBEGL
 	select BR2_PACKAGE_HAS_LIBGLES
 	select BR2_PACKAGE_HAS_OPENVG
 	select BR2_PACKAGE_HAS_OPENMAX
@@ -19,7 +19,7 @@ config BR2_PACKAGE_RPI_USERLAND
 
 if BR2_PACKAGE_RPI_USERLAND
 
-config BR2_PACKAGE_PROVIDES_OPENGL_EGL
+config BR2_PACKAGE_PROVIDES_LIBEGL
 	default "rpi-userland"
 
 config BR2_PACKAGE_PROVIDES_LIBGLES
diff --git a/package/sunxi-mali/Config.in b/package/sunxi-mali/Config.in
index c47b6a3..c95ebbb 100644
--- a/package/sunxi-mali/Config.in
+++ b/package/sunxi-mali/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_SUNXI_MALI
 	bool "sunxi-mali"
-	select BR2_PACKAGE_HAS_OPENGL_EGL
+	select BR2_PACKAGE_HAS_LIBEGL
 	select BR2_PACKAGE_HAS_LIBGLES
 	# The egl/gles mali libraries are provided as a git submodule of the
 	# sunxi-mali repo and are downloaded by the sunxi-mali-prop package.
@@ -18,7 +18,7 @@ config BR2_PACKAGE_SUNXI_MALI
 
 if BR2_PACKAGE_SUNXI_MALI
 
-config BR2_PACKAGE_PROVIDES_OPENGL_EGL
+config BR2_PACKAGE_PROVIDES_LIBEGL
 	default "sunxi-mali"
 
 config BR2_PACKAGE_PROVIDES_LIBGLES
diff --git a/package/ti-gfx/Config.in b/package/ti-gfx/Config.in
index 2bdc972..3e8648e 100644
--- a/package/ti-gfx/Config.in
+++ b/package/ti-gfx/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_TI_GFX
 	bool "ti-gfx"
-	select BR2_PACKAGE_HAS_OPENGL_EGL
+	select BR2_PACKAGE_HAS_LIBEGL
 	select BR2_PACKAGE_HAS_LIBGLES
 	select BR2_PACKAGE_HAS_POWERVR
 	depends on BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC && BR2_arm
@@ -11,7 +11,7 @@ config BR2_PACKAGE_TI_GFX
 
 if BR2_PACKAGE_TI_GFX
 
-config BR2_PACKAGE_PROVIDES_OPENGL_EGL
+config BR2_PACKAGE_PROVIDES_LIBEGL
 	default "ti-gfx"
 
 config BR2_PACKAGE_PROVIDES_LIBGLES
-- 
1.8.3.2

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

* [Buildroot] [PATCH 03/20] package/libopenmax: rename the _HAS and _PROVIDES variables
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 01/20] package/libgles: rename the _HAS and _PROVIDES variables Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 02/20] package/libegl: " Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-04-04 16:41   ` Arnout Vandecappelle
  2014-03-10 20:27 ` [Buildroot] [PATCH 04/20] package/libopenvg: " Yann E. MORIN
                   ` (16 subsequent siblings)
  19 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

The basic rule for a package is to have its options named
after the package name. There is no reason this should not
also be the case for virtual packages.

Besides, this will allow us to switch libopenmax to use the
soon-to-be-introduced virtual-package infrastructure.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/bellagio/Config.in              | 4 ++--
 package/gstreamer1/gst-omx/Config.in    | 4 ++--
 package/opengl/libopenmax/Config.in     | 6 +++---
 package/opengl/libopenmax/libopenmax.mk | 4 ++--
 package/rpi-userland/Config.in          | 4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/package/bellagio/Config.in b/package/bellagio/Config.in
index 2beb658..ee87e13 100644
--- a/package/bellagio/Config.in
+++ b/package/bellagio/Config.in
@@ -3,7 +3,7 @@ config BR2_PACKAGE_BELLAGIO
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_PREFER_STATIC_LIB
-	select BR2_PACKAGE_HAS_OPENMAX
+	select BR2_PACKAGE_HAS_LIBOPENMAX
 	help
 	  Bellagio is an opensource implementation of the
 	  OpenMAX IL API.
@@ -19,7 +19,7 @@ config BR2_PACKAGE_BELLAGIO
 
 if BR2_PACKAGE_BELLAGIO
 
-config BR2_PACKAGE_PROVIDES_OPENMAX
+config BR2_PACKAGE_PROVIDES_LIBOPENMAX
 	default "bellagio"
 
 endif
diff --git a/package/gstreamer1/gst-omx/Config.in b/package/gstreamer1/gst-omx/Config.in
index 1d5b131..d2e4776 100644
--- a/package/gstreamer1/gst-omx/Config.in
+++ b/package/gstreamer1/gst-omx/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_GST_OMX
 	bool "gst-omx"
-	depends on BR2_PACKAGE_HAS_OPENMAX
+	depends on BR2_PACKAGE_HAS_LIBOPENMAX
 	select BR2_PACKAGE_GST1_PLUGINS_BASE
 	help
 	  GStreamer plug-in to use OpenMAX API.
@@ -8,4 +8,4 @@ config BR2_PACKAGE_GST_OMX
 	  http://cgit.freedesktop.org/gstreamer/gst-omx
 
 comment "gst-omx requires a OpenMAX implementation"
-	depends on !BR2_PACKAGE_HAS_OPENMAX
+	depends on !BR2_PACKAGE_HAS_LIBOPENMAX
diff --git a/package/opengl/libopenmax/Config.in b/package/opengl/libopenmax/Config.in
index 105c53e..d50f2ce 100644
--- a/package/opengl/libopenmax/Config.in
+++ b/package/opengl/libopenmax/Config.in
@@ -1,6 +1,6 @@
-config BR2_PACKAGE_HAS_OPENMAX
+config BR2_PACKAGE_HAS_LIBOPENMAX
 	bool
 
-config BR2_PACKAGE_PROVIDES_OPENMAX
-	depends on BR2_PACKAGE_HAS_OPENMAX
+config BR2_PACKAGE_PROVIDES_LIBOPENMAX
+	depends on BR2_PACKAGE_HAS_LIBOPENMAX
 	string
diff --git a/package/opengl/libopenmax/libopenmax.mk b/package/opengl/libopenmax/libopenmax.mk
index a2bd23d..6cdeacd 100644
--- a/package/opengl/libopenmax/libopenmax.mk
+++ b/package/opengl/libopenmax/libopenmax.mk
@@ -5,9 +5,9 @@
 ################################################################################
 
 LIBOPENMAX_SOURCE =
-LIBOPENMAX_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENMAX))
+LIBOPENMAX_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LIBOPENMAX))
 
-ifeq ($(BR2_PACKAGE_HAS_OPENMAX),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBOPENMAX),y)
 ifeq ($(LIBOPENMAX_DEPENDENCIES),)
 $(error No libopenmax implementation selected. Configuration error.)
 endif
diff --git a/package/rpi-userland/Config.in b/package/rpi-userland/Config.in
index 4a82c9d..68ac1f6 100644
--- a/package/rpi-userland/Config.in
+++ b/package/rpi-userland/Config.in
@@ -7,7 +7,7 @@ config BR2_PACKAGE_RPI_USERLAND
 	select BR2_PACKAGE_HAS_LIBEGL
 	select BR2_PACKAGE_HAS_LIBGLES
 	select BR2_PACKAGE_HAS_OPENVG
-	select BR2_PACKAGE_HAS_OPENMAX
+	select BR2_PACKAGE_HAS_LIBOPENMAX
 	help
 	  Raspberry Pi Userland contains the necessary library to use the
 	  VideoCore driver.
@@ -28,7 +28,7 @@ config BR2_PACKAGE_PROVIDES_LIBGLES
 config BR2_PACKAGE_PROVIDES_OPENVG
 	default "rpi-userland"
 
-config BR2_PACKAGE_PROVIDES_OPENMAX
+config BR2_PACKAGE_PROVIDES_LIBOPENMAX
 	default "rpi-userland"
 
 endif
-- 
1.8.3.2

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

* [Buildroot] [PATCH 04/20] package/libopenvg: rename the _HAS and _PROVIDES variables
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (2 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 03/20] package/libopenmax: " Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-04-04 16:43   ` Arnout Vandecappelle
  2014-03-10 20:27 ` [Buildroot] [PATCH 05/20] package/luainterpreter: " Yann E. MORIN
                   ` (15 subsequent siblings)
  19 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

The basic rule for a package is to have its options named
after the package name. There is no reason this should not
also be the case for virtual packages.

Besides, renaming the package will allow us to switch libopenvg to use
the soon-to-be-introduced virtual-package infrastructure.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Cc: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
---
 package/cairo/cairo.mk                | 2 +-
 package/opengl/libopenvg/Config.in    | 6 +++---
 package/opengl/libopenvg/libopenvg.mk | 4 ++--
 package/rpi-userland/Config.in        | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk
index ee58aff..43238ca 100644
--- a/package/cairo/cairo.mk
+++ b/package/cairo/cairo.mk
@@ -61,7 +61,7 @@ else
 	CAIRO_CONF_OPT += --disable-glesv2
 endif
 
-ifeq ($(BR2_PACKAGE_HAS_OPENVG),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
 	CAIRO_CONF_OPT += --enable-vg
 	CAIRO_DEPENDENCIES += libopenvg
 else
diff --git a/package/opengl/libopenvg/Config.in b/package/opengl/libopenvg/Config.in
index 9d31525..53cde6a 100644
--- a/package/opengl/libopenvg/Config.in
+++ b/package/opengl/libopenvg/Config.in
@@ -1,6 +1,6 @@
-config BR2_PACKAGE_HAS_OPENVG
+config BR2_PACKAGE_HAS_LIBOPENVG
 	bool
 
-config BR2_PACKAGE_PROVIDES_OPENVG
-	depends on BR2_PACKAGE_HAS_OPENVG
+config BR2_PACKAGE_PROVIDES_LIBOPENVG
+	depends on BR2_PACKAGE_HAS_LIBOPENVG
 	string
diff --git a/package/opengl/libopenvg/libopenvg.mk b/package/opengl/libopenvg/libopenvg.mk
index f81db5e..1c6f929 100644
--- a/package/opengl/libopenvg/libopenvg.mk
+++ b/package/opengl/libopenvg/libopenvg.mk
@@ -5,9 +5,9 @@
 ################################################################################
 
 LIBOPENVG_SOURCE =
-LIBOPENVG_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENVG))
+LIBOPENVG_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LIBOPENVG))
 
-ifeq ($(BR2_PACKAGE_HAS_OPENVG),y)
+ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
 ifeq ($(LIBOPENVG_DEPENDENCIES),)
 $(error No libOpenVG implementation selected. Configuration error.)
 endif
diff --git a/package/rpi-userland/Config.in b/package/rpi-userland/Config.in
index 68ac1f6..aeee5e1 100644
--- a/package/rpi-userland/Config.in
+++ b/package/rpi-userland/Config.in
@@ -6,7 +6,7 @@ config BR2_PACKAGE_RPI_USERLAND
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_HAS_LIBEGL
 	select BR2_PACKAGE_HAS_LIBGLES
-	select BR2_PACKAGE_HAS_OPENVG
+	select BR2_PACKAGE_HAS_LIBOPENVG
 	select BR2_PACKAGE_HAS_LIBOPENMAX
 	help
 	  Raspberry Pi Userland contains the necessary library to use the
@@ -25,7 +25,7 @@ config BR2_PACKAGE_PROVIDES_LIBEGL
 config BR2_PACKAGE_PROVIDES_LIBGLES
 	default "rpi-userland"
 
-config BR2_PACKAGE_PROVIDES_OPENVG
+config BR2_PACKAGE_PROVIDES_LIBOPENVG
 	default "rpi-userland"
 
 config BR2_PACKAGE_PROVIDES_LIBOPENMAX
-- 
1.8.3.2

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

* [Buildroot] [PATCH 05/20] package/luainterpreter: rename the _HAS and _PROVIDES variables
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (3 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 04/20] package/libopenvg: " Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 06/20] package/lua: rename config options Yann E. MORIN
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

The basic rule for a package is to have its options named
after the package name. There is no reason this should not
also be the case for virtual packages.

Besides, this will allow us to switch luainterpreter to use the
soon-to-be-introduced virtual-package infrastructure.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Cc: Francois Perrad <fperrad@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/Config.in                        | 2 +-
 package/lbase64/Config.in                | 2 +-
 package/lpeg/Config.in                   | 2 +-
 package/lpty/Config.in                   | 2 +-
 package/lrandom/Config.in                | 2 +-
 package/lsqlite3/Config.in               | 2 +-
 package/lua-cjson/Config.in              | 2 +-
 package/lua-ev/Config.in                 | 2 +-
 package/lua-msgpack-native/Config.in     | 2 +-
 package/lua/Config.in                    | 4 ++--
 package/luaexpat/Config.in               | 2 +-
 package/luafilesystem/Config.in          | 2 +-
 package/luainterpreter/Config.in         | 6 +++---
 package/luainterpreter/luainterpreter.mk | 4 ++--
 package/luajit/Config.in                 | 4 ++--
 package/luaposix/Config.in               | 2 +-
 package/luasec/Config.in                 | 2 +-
 package/luasocket/Config.in              | 2 +-
 package/luasql-sqlite3/Config.in         | 2 +-
 package/lzlib/Config.in                  | 2 +-
 package/rings/Config.in                  | 2 +-
 21 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/package/Config.in b/package/Config.in
index 70e5a7f..503a533 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -367,7 +367,7 @@ source "package/jimtcl/Config.in"
 source "package/lua/Config.in"
 source "package/luainterpreter/Config.in"
 source "package/luajit/Config.in"
-if BR2_PACKAGE_HAS_LUA_INTERPRETER && !BR2_PREFER_STATIC_LIB
+if BR2_PACKAGE_HAS_LUAINTERPRETER && !BR2_PREFER_STATIC_LIB
 # lua modules are dynamically loaded, so not available on static builds
 menu "Lua libraries/modules"
 source "package/cgilua/Config.in"
diff --git a/package/lbase64/Config.in b/package/lbase64/Config.in
index 4593ab9..48d3fdb 100644
--- a/package/lbase64/Config.in
+++ b/package/lbase64/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LBASE64
 	bool "lbase64"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	depends on !BR2_PACKAGE_LUA_5_2
 	help
 	  A base64 library for Lua
diff --git a/package/lpeg/Config.in b/package/lpeg/Config.in
index da54d61..957991d 100644
--- a/package/lpeg/Config.in
+++ b/package/lpeg/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LPEG
 	bool "lpeg"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	help
 	  LPeg is a new pattern-matching library for Lua,
 	  based on Parsing Expression Grammars (PEGs).
diff --git a/package/lpty/Config.in b/package/lpty/Config.in
index 5e7ad14..50cbd25 100644
--- a/package/lpty/Config.in
+++ b/package/lpty/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LPTY
 	bool "lpty"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	help
 	  A simple facility for lua to control other programs via
 	  PTYs.
diff --git a/package/lrandom/Config.in b/package/lrandom/Config.in
index 661707d..64bcf0c 100644
--- a/package/lrandom/Config.in
+++ b/package/lrandom/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LRANDOM
 	bool "lrandom"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	help
 	  A library for generating random numbers
 	  based on the Mersenne Twister
diff --git a/package/lsqlite3/Config.in b/package/lsqlite3/Config.in
index e19c789..cc431ae 100644
--- a/package/lsqlite3/Config.in
+++ b/package/lsqlite3/Config.in
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_LSQLITE3
 	bool "lsqlite3"
 	select BR2_PACKAGE_SQLITE
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	help
 	  a thin Lua wrapper for the SQLite3 library.
 
diff --git a/package/lua-cjson/Config.in b/package/lua-cjson/Config.in
index 8129fab..1f4c7c7 100644
--- a/package/lua-cjson/Config.in
+++ b/package/lua-cjson/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LUA_CJSON
 	bool "lua-cjson"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	help
 	  The Lua CJSON module provides JSON support for Lua. It features:
 	  - Fast, standards compliant encoding/parsing routines
diff --git a/package/lua-ev/Config.in b/package/lua-ev/Config.in
index 28da114..74b5dc7 100644
--- a/package/lua-ev/Config.in
+++ b/package/lua-ev/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LUA_EV
 	bool "lua-ev"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	select BR2_PACKAGE_LIBEV
 	depends on !(BR2_avr32 || BR2_bfin) # libev
 	help
diff --git a/package/lua-msgpack-native/Config.in b/package/lua-msgpack-native/Config.in
index 498b30c..c7b3373 100644
--- a/package/lua-msgpack-native/Config.in
+++ b/package/lua-msgpack-native/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LUA_MSGPACK_NATIVE
 	bool "lua-msgpack-native"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	depends on !BR2_PACKAGE_LUA_5_2
 	help
 	  This is a native, C language implementation of msgpack
diff --git a/package/lua/Config.in b/package/lua/Config.in
index c4c12e9..2f1b25b 100644
--- a/package/lua/Config.in
+++ b/package/lua/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LUA
 	bool "lua"
-	select BR2_PACKAGE_HAS_LUA_INTERPRETER
+	select BR2_PACKAGE_HAS_LUAINTERPRETER
 	help
 	  Lua is a powerful, fast, light-weight, embeddable scripting language.
 
@@ -8,7 +8,7 @@ config BR2_PACKAGE_LUA
 
 if BR2_PACKAGE_LUA
 
-config BR2_PACKAGE_PROVIDES_LUA_INTERPRETER
+config BR2_PACKAGE_PROVIDES_LUAINTERPRETER
 	default "lua"
 
 choice
diff --git a/package/luaexpat/Config.in b/package/luaexpat/Config.in
index 3394780..463019d 100644
--- a/package/luaexpat/Config.in
+++ b/package/luaexpat/Config.in
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_LUAEXPAT
 	bool "luaexpat"
 	select BR2_PACKAGE_EXPAT
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	depends on !BR2_PACKAGE_LUA_5_2
 	help
 	  LuaExpat is a SAX XML parser based on the Expat library.
diff --git a/package/luafilesystem/Config.in b/package/luafilesystem/Config.in
index 489ebf3..50e7975 100644
--- a/package/luafilesystem/Config.in
+++ b/package/luafilesystem/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LUAFILESYSTEM
 	bool "luafilesystem"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	help
 	  LuaFileSystem offers a portable way to access
 	  the underlying directory structure and file attributes.
diff --git a/package/luainterpreter/Config.in b/package/luainterpreter/Config.in
index a05bde1..e89a9b8 100644
--- a/package/luainterpreter/Config.in
+++ b/package/luainterpreter/Config.in
@@ -1,9 +1,9 @@
-config BR2_PACKAGE_HAS_LUA_INTERPRETER
+config BR2_PACKAGE_HAS_LUAINTERPRETER
 	bool
 
-config BR2_PACKAGE_PROVIDES_LUA_INTERPRETER
+config BR2_PACKAGE_PROVIDES_LUAINTERPRETER
 	string
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 
 config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION
 	string
diff --git a/package/luainterpreter/luainterpreter.mk b/package/luainterpreter/luainterpreter.mk
index f9206e8..40d4290 100644
--- a/package/luainterpreter/luainterpreter.mk
+++ b/package/luainterpreter/luainterpreter.mk
@@ -5,11 +5,11 @@
 ################################################################################
 
 LUAINTERPRETER_SOURCE =
-LUAINTERPRETER_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LUA_INTERPRETER))
+LUAINTERPRETER_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LUAINTERPRETER))
 
 LUAINTERPRETER_ABIVER = $(call qstrip,$(BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION))
 
-ifeq ($(BR2_PACKAGE_HAS_LUA_INTERPRETER),y)
+ifeq ($(BR2_PACKAGE_HAS_LUAINTERPRETER),y)
 ifeq ($(LUAINTERPRETER_DEPENDENCIES),)
 $(error No lua interpreter implementation selected. Configuration error.)
 endif
diff --git a/package/luajit/Config.in b/package/luajit/Config.in
index 9c4ecc3..95c2e0f 100644
--- a/package/luajit/Config.in
+++ b/package/luajit/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LUAJIT
 	bool "luajit"
-	select BR2_PACKAGE_HAS_LUA_INTERPRETER
+	select BR2_PACKAGE_HAS_LUAINTERPRETER
 	# Luajit is only available for some target architectures, and
 	# has some complexity wrt 32/64. See luajit.mk for details.
 	depends on BR2_i386 || (BR2_x86_64 && BR2_HOSTARCH='x86_64') || BR2_powerpc || BR2_arm || BR2_armeb
@@ -14,7 +14,7 @@ config BR2_PACKAGE_LUAJIT
 
 if BR2_PACKAGE_LUAJIT
 
-config BR2_PACKAGE_PROVIDES_LUA_INTERPRETER
+config BR2_PACKAGE_PROVIDES_LUAINTERPRETER
 	default "luajit"
 
 config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION
diff --git a/package/luaposix/Config.in b/package/luaposix/Config.in
index a95c825..04269fb 100644
--- a/package/luaposix/Config.in
+++ b/package/luaposix/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LUAPOSIX
 	bool "luaposix"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	select BR2_PACKAGE_LUABITOP if BR2_PACKAGE_LUA_5_1
 	# LuaBitOp is already included in LuaJIT
 	help
diff --git a/package/luasec/Config.in b/package/luasec/Config.in
index 48aa766..aa75e05 100644
--- a/package/luasec/Config.in
+++ b/package/luasec/Config.in
@@ -2,7 +2,7 @@ config BR2_PACKAGE_LUASEC
 	bool "luasec"
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_LUASOCKET
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	depends on !BR2_PACKAGE_LUA_5_2
 	help
 	  LuaSec is a binding for OpenSSL library to provide TLS/SSL
diff --git a/package/luasocket/Config.in b/package/luasocket/Config.in
index 619d649..45f959e 100644
--- a/package/luasocket/Config.in
+++ b/package/luasocket/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LUASOCKET
 	bool "luasocket"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	help
 	  LuaSocket is the most comprehensive networking support library
 	  for the Lua language.
diff --git a/package/luasql-sqlite3/Config.in b/package/luasql-sqlite3/Config.in
index fca6582..3bd73f3 100644
--- a/package/luasql-sqlite3/Config.in
+++ b/package/luasql-sqlite3/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LUASQL_SQLITE3
 	bool "luasql-sqlite3"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	select BR2_PACKAGE_SQLITE
 	help
 	  LuaSQL is a simple interface from Lua to a DBMS.
diff --git a/package/lzlib/Config.in b/package/lzlib/Config.in
index d2b4818..c123019 100644
--- a/package/lzlib/Config.in
+++ b/package/lzlib/Config.in
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_LZLIB
 	bool "lzlib"
 	select BR2_PACKAGE_ZLIB
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	help
 	  This package provides a library to access zlib library
 	  functions and also to read/write gzip files using an
diff --git a/package/rings/Config.in b/package/rings/Config.in
index b1d41f3..87ade07 100644
--- a/package/rings/Config.in
+++ b/package/rings/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_RINGS
 	bool "rings"
-	depends on BR2_PACKAGE_HAS_LUA_INTERPRETER
+	depends on BR2_PACKAGE_HAS_LUAINTERPRETER
 	help
 	  Provides a way to create new Lua states from within Lua.
 
-- 
1.8.3.2

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

* [Buildroot] [PATCH 06/20] package/lua: rename config options
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (4 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 05/20] package/luainterpreter: " Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-04-04 16:48   ` Arnout Vandecappelle
  2014-03-10 20:27 ` [Buildroot] [PATCH 07/20] manual: add virtual package tutorial Yann E. MORIN
                   ` (13 subsequent siblings)
  19 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Package's options should be named after the package.

Lua is an interpreter, but the package is named 'lua'. So we want to
name the config option with '_LUA_', not with '_LUA_INTERPRETER_'

Besides, naming them with '_LUA_INTERPRETER_' might be confusing, since
there is a package named 'luainterpreter'.

Since the renamed options are part of a choice, we can't use the legacy
options to select the new ones. So we instead instruct the user to go
select the appropriate option in the choice.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Francois Perrad <fperrad@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 Config.in.legacy      | 21 +++++++++++++++++++++
 package/lua/Config.in | 10 +++++-----
 package/lua/lua.mk    |  4 ++--
 3 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index afcd3b1..e536ae0 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -101,6 +101,27 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2014.05"
 
+config BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE
+	bool "Lua command-line editing none has been renamed"
+	help
+	  The BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE option has been
+	  renamed to BR2_PACKAGE_LUA_EDITING_NONE. You will have to select
+	  it in the corresponding choice.
+
+config BR2_PACKAGE_LUA_INTERPRETER_READLINE
+	bool "Lua command-line editing using readline has been renamed"
+	help
+	  The BR2_PACKAGE_LUA_INTERPRETER_READLINE option has been
+	  renamed to BR2_PACKAGE_LUA_READLINE. You will have to select
+	  it in the corresponding choice.
+
+config BR2_PACKAGE_LUA_INTERPRETER_LINENOISE
+	bool "Lua command-line editing using linenoise has been renamed"
+	help
+	  The BR2_PACKAGE_LUA_INTERPRETER_LINENOISE option has been
+	  renamed to BR2_PACKAGE_LUA_LINENOISE. You will have to select
+	  it in the corresponding choice.
+
 config BR2_KERNEL_HEADERS_SNAP
 	bool "Local Linux snapshot support removed"
 	select BR2_LEGACY
diff --git a/package/lua/Config.in b/package/lua/Config.in
index 2f1b25b..0e31858 100644
--- a/package/lua/Config.in
+++ b/package/lua/Config.in
@@ -30,22 +30,22 @@ config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION
 	default "5.2"	if BR2_PACKAGE_LUA_5_2
 
 choice
-	prompt "Lua Interpreter command-line editing"
-	default BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE
+	prompt "Lua command-line editing"
+	default BR2_PACKAGE_LUA_EDITING_NONE
 
-config BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE
+config BR2_PACKAGE_LUA_EDITING_NONE
 	bool "none"
 	help
 	  None.
 
-config BR2_PACKAGE_LUA_INTERPRETER_READLINE
+config BR2_PACKAGE_LUA_READLINE
 	bool "readline support"
 	select BR2_PACKAGE_READLINE
 	select BR2_PACKAGE_NCURSES
 	help
 	  Enables command-line editing in the Lua interpreter.
 
-config BR2_PACKAGE_LUA_INTERPRETER_LINENOISE
+config BR2_PACKAGE_LUA_LINENOISE
 	bool "linenoise support"
 	select BR2_PACKAGE_LINENOISE
 	help
diff --git a/package/lua/lua.mk b/package/lua/lua.mk
index bf68e65..bc8799a 100644
--- a/package/lua/lua.mk
+++ b/package/lua/lua.mk
@@ -31,12 +31,12 @@ else
 	LUA_MYLIBS += -ldl
 endif
 
-ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_READLINE),y)
+ifeq ($(BR2_PACKAGE_LUA_READLINE),y)
 	LUA_DEPENDENCIES = readline ncurses
 	LUA_MYLIBS += -lreadline -lhistory -lncurses
 	LUA_CFLAGS += -DLUA_USE_READLINE
 else
-ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_LINENOISE),y)
+ifeq ($(BR2_PACKAGE_LUA_LINENOISE),y)
 	LUA_DEPENDENCIES = linenoise
 	LUA_MYLIBS += -llinenoise
 	LUA_CFLAGS += -DLUA_USE_LINENOISE
-- 
1.8.3.2

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

* [Buildroot] [PATCH 07/20] manual: add virtual package tutorial
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (5 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 06/20] package/lua: rename config options Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-04-04 16:54   ` Arnout Vandecappelle
  2014-03-10 20:27 ` [Buildroot] [PATCH 08/20] packages: add infrastructure for virtual packages Yann E. MORIN
                   ` (12 subsequent siblings)
  19 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "eric.le.bihan.dev@free.fr" <eric.le.bihan.dev@free.fr>

The manual now features a new section with instructions about how to add a
virtual package.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
[yann.morin.1998 at free.fr: move down statement about provider's .mk]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 docs/manual/adding-packages-virtual.txt | 99 +++++++++++++++++++++++++++++++++
 docs/manual/adding-packages.txt         |  2 +
 2 files changed, 101 insertions(+)
 create mode 100644 docs/manual/adding-packages-virtual.txt

diff --git a/docs/manual/adding-packages-virtual.txt b/docs/manual/adding-packages-virtual.txt
new file mode 100644
index 0000000..76f5794
--- /dev/null
+++ b/docs/manual/adding-packages-virtual.txt
@@ -0,0 +1,99 @@
+// -*- mode:doc; -*-
+// vim: set syntax=asciidoc:
+
+[[virtual-package-tutorial]]
+
+Virtual package tutorial
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+In Buildroot, a virtual package is a package whose functionalities are
+provided by one or more packages, referred to as 'providers'. The virtual
+package management is an extensible mechanism allowing the user to choose
+the provider used in the rootfs.
+
+For example, 'OpenGL ES' is an API for 2D and 3D graphics on embedded systems.
+The implementation of this API is different for the 'Allwinner Tech Sunxi' and
+the 'Texas Instruments OMAP35xx' plaftorms. So +libgles+ will be a virtual
+package and +sunxi-mali+ and +ti-gfx+ will be the providers.
+
+In the following example, we will explain how to add a new virtual package
+('something-virtual') and a provider for it ('some-provider').
+
+First, let's create the virtual package.
+
+Virtual package's +Config.in+ file
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The +Config.in+ file of virtual package 'something-virtual' should contain:
+
+---------------------------
+01: config BR2_PACKAGE_HAS_SOMETHING_VIRTUAL
+02:	bool
+03:
+04: config BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL
+05:	depends on BR2_PACKAGE_HAS_SOMETHING_VIRTUAL
+06:	string
+---------------------------
+
+In this file, we declare two options, +BR2_PACKAGE_HAS_SOMETHING_VIRTUAL+ and
++BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL+, whose values will be used by the
+providers.
+
+Virtual package's +*.mk+ file
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The Makefile +package/something-virtual/something-virtual.mk+ should contain:
+
+---------------------------
+01: ################################################################################
+02: #
+03: # something-virtual
+04: #
+05: ################################################################################
+06:
+07: SOMETHING_VIRTUAL_SOURCE =
+08: SOMETHING_VIRTUAL_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL))
+09:
+10: ifeq ($(BR2_PACKAGE_HAS_SOMETHING_VIRTUAL),y)
+11: ifeq ($(SOMETHING_VIRTUAL_DEPENDENCIES),)
+12: $(error No something-virtual implementation selected. Configuration error.)
+13: endif
+14: endif
+15:
+16: $(eval $(generic-package))
+---------------------------
+
+The Makefile is quite small as it will only check if a provider for the
+virtual package has been selected.
+
+Provider's +Config.in+ file
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+When adding a package as a provider, only the +Config.in+ file requires some
+modifications. The +*.mk+ file should follow the Buildroot infrastructure with
+no change at all.
+
+The +Config.in+ file of the package 'some-provider', which provides the
+functionalities of 'something-virtual', should contain:
+
+---------------------------
+01: config BR2_PACKAGE_SOME_PROVIDER
+02:	bool "some-provider"
+03:	select BR2_PACKAGE_HAS_SOMETHING_VIRTUAL
+04:	help
+05:	  This is a comment that explains what some-provider is.
+06:
+07:	  http://foosoftware.org/some-provider/
+08:
+09: if BR2_PACKAGE_SOME_PROVIDER
+10: config BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL
+11:	default "some-provider"
+12: endif
+---------------------------
+
+On line 3, we select +BR2_PACKAGE_HAS_SOMETHING_VIRTUAL+, and on line 11, we
+set the value of +BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL+ to the name of the
+provider, but only if it is selected.
+
+Of course, do not forget to add the proper build and runtime dependencies for
+this package!
diff --git a/docs/manual/adding-packages.txt b/docs/manual/adding-packages.txt
index 745e33a..dbba930 100644
--- a/docs/manual/adding-packages.txt
+++ b/docs/manual/adding-packages.txt
@@ -24,6 +24,8 @@ include::adding-packages-luarocks.txt[]
 
 include::adding-packages-perl.txt[]
 
+include::adding-packages-virtual.txt[]
+
 include::adding-packages-hooks.txt[]
 
 include::adding-packages-gettext.txt[]
-- 
1.8.3.2

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

* [Buildroot] [PATCH 08/20] packages: add infrastructure for virtual packages
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (6 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 07/20] manual: add virtual package tutorial Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-04-04 20:10   ` Arnout Vandecappelle
  2014-03-10 20:27 ` [Buildroot] [PATCH 09/20] manual: update the virtual package section with the new infrastructure Yann E. MORIN
                   ` (11 subsequent siblings)
  19 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

The virtual-package infrastructure allows to easily define a
virtual package in a single line:

    $ cat package/some-virtual-package/some-virtual-package.mk
    $(eval $(virtual-package))

And that's all. :-)

Thanks to ?ric for his work on the manual, that prompted the
idea for this virtual-package infrastructure! ;-)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/Makefile.in    |  1 +
 package/pkg-virtual.mk | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 package/pkg-virtual.mk

diff --git a/package/Makefile.in b/package/Makefile.in
index 454f614..c5cdf5a 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -362,4 +362,5 @@ include package/pkg-cmake.mk
 include package/pkg-luarocks.mk
 include package/pkg-perl.mk
 include package/pkg-python.mk
+include package/pkg-virtual.mk
 include package/pkg-generic.mk
diff --git a/package/pkg-virtual.mk b/package/pkg-virtual.mk
new file mode 100644
index 0000000..9b206ea
--- /dev/null
+++ b/package/pkg-virtual.mk
@@ -0,0 +1,66 @@
+################################################################################
+# Virtual package infrastructure
+#
+# This file implements an infrastructure that eases development of
+# package .mk files for virtual packages. It should be used for all
+# virtual packages.
+#
+# See the Buildroot documentation for details on the usage of this
+# infrastructure
+#
+# In terms of implementation, this virtual infrastructure requires
+# the .mk file to only call the 'virtual-package' macro.
+#
+################################################################################
+
+
+################################################################################
+# inner-virtual-package -- defines the dependency rules of the virtual
+# package against its provider.
+#
+#  argument 1 is the lowercase package name
+#  argument 2 is the uppercase package name, including an 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)
+################################################################################
+
+# Note: putting this comment here rather than in the define block, otherwise
+# make would try to expand the $(error ...) in the comment, which is not
+# really what we want.
+# We need to use second-expansion for the $(error ...) call, below,
+# so it is not evaluated now, but as part of the generated make code.
+
+define inner-virtual-package
+
+# Ensure the virtual package has an implementation defined.
+ifeq ($(BR2_PACKAGE_HAS_$(2)),y)
+ifeq ($(call qstrip,$(BR2_PACKAGE_PROVIDES_$(2))),)
+$$(error No implementation selected for virtual package $(1). Configuration error)
+endif
+endif
+
+# A virtual package does not have any source associated
+$(2)_SOURCE =
+
+# This must be repeated from inner-generic-package, otherwise we get an empty
+# _DEPENDENCIES
+$(2)_DEPENDENCIES ?= $(filter-out host-toolchain $(1),\
+	$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
+
+# Add dependency against the provider
+$(2)_DEPENDENCIES += $(call qstrip,$(BR2_PACKAGE_PROVIDES_$(2)))
+
+# Call the generic package infrastructure to generate the necessary
+# make targets
+$(call inner-generic-package,$(1),$(2),$(3),$(4))
+
+endef
+
+################################################################################
+# virtual-package -- the target generator macro for virtual packages
+################################################################################
+
+virtual-package = $(call inner-virtual-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
+host-virtual-package = $(call inner-virtual-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host)
-- 
1.8.3.2

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

* [Buildroot] [PATCH 09/20] manual: update the virtual package section with the new infrastructure
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (7 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 08/20] packages: add infrastructure for virtual packages Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-12 11:59   ` Eric Le Bihan
  2014-04-04 20:18   ` Arnout Vandecappelle
  2014-03-10 20:27 ` [Buildroot] [PATCH 10/20] package/powervr: convert to the virtual-package infrastructure Yann E. MORIN
                   ` (10 subsequent siblings)
  19 siblings, 2 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 docs/manual/adding-packages-virtual.txt | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/docs/manual/adding-packages-virtual.txt b/docs/manual/adding-packages-virtual.txt
index 76f5794..e8820a0 100644
--- a/docs/manual/adding-packages-virtual.txt
+++ b/docs/manual/adding-packages-virtual.txt
@@ -1,10 +1,10 @@
 // -*- mode:doc; -*-
 // vim: set syntax=asciidoc:
 
-[[virtual-package-tutorial]]
+Infrastructure for virtual packages
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Virtual package tutorial
-~~~~~~~~~~~~~~~~~~~~~~~~
+[[virtual-package-tutorial]]
 
 In Buildroot, a virtual package is a package whose functionalities are
 provided by one or more packages, referred to as 'providers'. The virtual
@@ -16,6 +16,9 @@ The implementation of this API is different for the 'Allwinner Tech Sunxi' and
 the 'Texas Instruments OMAP35xx' plaftorms. So +libgles+ will be a virtual
 package and +sunxi-mali+ and +ti-gfx+ will be the providers.
 
++virtual-package+ tutorial
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
 In the following example, we will explain how to add a new virtual package
 ('something-virtual') and a provider for it ('some-provider').
 
@@ -42,7 +45,7 @@ providers.
 Virtual package's +*.mk+ file
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-The Makefile +package/something-virtual/something-virtual.mk+ should contain:
+The +.mk+ for the virtual package should just evaluate the +virtual-package+ macro:
 
 ---------------------------
 01: ################################################################################
@@ -51,20 +54,11 @@ The Makefile +package/something-virtual/something-virtual.mk+ should contain:
 04: #
 05: ################################################################################
 06:
-07: SOMETHING_VIRTUAL_SOURCE =
-08: SOMETHING_VIRTUAL_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL))
-09:
-10: ifeq ($(BR2_PACKAGE_HAS_SOMETHING_VIRTUAL),y)
-11: ifeq ($(SOMETHING_VIRTUAL_DEPENDENCIES),)
-12: $(error No something-virtual implementation selected. Configuration error.)
-13: endif
-14: endif
-15:
-16: $(eval $(generic-package))
+07: $(eval $(virtual-package))
 ---------------------------
 
-The Makefile is quite small as it will only check if a provider for the
-virtual package has been selected.
+The ability to have target and host packages is also available, with the
++host-virtual-package+ macro.
 
 Provider's +Config.in+ file
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- 
1.8.3.2

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

* [Buildroot] [PATCH 10/20] package/powervr: convert to the virtual-package infrastructure
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (8 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 09/20] manual: update the virtual package section with the new infrastructure Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 11/20] package/libgles: " Yann E. MORIN
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/powervr/powervr.mk | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/package/powervr/powervr.mk b/package/powervr/powervr.mk
index b36eb16..5a55860 100644
--- a/package/powervr/powervr.mk
+++ b/package/powervr/powervr.mk
@@ -4,13 +4,4 @@
 #
 ################################################################################
 
-POWERVR_SOURCE =
-POWERVR_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_POWERVR))
-
-ifeq ($(BR2_PACKAGE_HAS_POWERVR),y)
-ifeq ($(POWERVR_DEPENDENCIES),)
-$(error No PowerVR implementation selected. Configuration error.)
-endif
-endif
-
-$(eval $(generic-package))
+$(eval $(virtual-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 11/20] package/libgles: convert to the virtual-package infrastructure
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (9 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 10/20] package/powervr: convert to the virtual-package infrastructure Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-12 12:15   ` Eric Le Bihan
  2014-03-10 20:27 ` [Buildroot] [PATCH 12/20] package/libegl: " Yann E. MORIN
                   ` (8 subsequent siblings)
  19 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/opengl/libgles/libgles.mk | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/package/opengl/libgles/libgles.mk b/package/opengl/libgles/libgles.mk
index 041e378..407f8f9 100644
--- a/package/opengl/libgles/libgles.mk
+++ b/package/opengl/libgles/libgles.mk
@@ -4,13 +4,4 @@
 #
 ################################################################################
 
-LIBGLES_SOURCE =
-LIBGLES_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LIBGLES))
-
-ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
-ifeq ($(LIBGLES_DEPENDENCIES),)
-$(error No libGLES implementation selected. Configuration error.)
-endif
-endif
-
-$(eval $(generic-package))
+$(eval $(virtual-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 12/20] package/libegl: convert to the virtual-package infrastructure
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (10 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 11/20] package/libgles: " Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-12 12:18   ` Eric Le Bihan
  2014-03-10 20:27 ` [Buildroot] [PATCH 13/20] package/libopenmax: " Yann E. MORIN
                   ` (7 subsequent siblings)
  19 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/opengl/libegl/libegl.mk | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/package/opengl/libegl/libegl.mk b/package/opengl/libegl/libegl.mk
index 2e399ce..1f5460e 100644
--- a/package/opengl/libegl/libegl.mk
+++ b/package/opengl/libegl/libegl.mk
@@ -4,13 +4,4 @@
 #
 ################################################################################
 
-LIBEGL_SOURCE =
-LIBEGL_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LIBEGL))
-
-ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
-ifeq ($(LIBEGL_DEPENDENCIES),)
-$(error No libEGL implementation selected. Configuration error.)
-endif
-endif
-
-$(eval $(generic-package))
+$(eval $(virtual-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 13/20] package/libopenmax: convert to the virtual-package infrastructure
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (11 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 12/20] package/libegl: " Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 14/20] package/libopenvg: " Yann E. MORIN
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/opengl/libopenmax/libopenmax.mk | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/package/opengl/libopenmax/libopenmax.mk b/package/opengl/libopenmax/libopenmax.mk
index 6cdeacd..bc2e7f8 100644
--- a/package/opengl/libopenmax/libopenmax.mk
+++ b/package/opengl/libopenmax/libopenmax.mk
@@ -4,13 +4,4 @@
 #
 ################################################################################
 
-LIBOPENMAX_SOURCE =
-LIBOPENMAX_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LIBOPENMAX))
-
-ifeq ($(BR2_PACKAGE_HAS_LIBOPENMAX),y)
-ifeq ($(LIBOPENMAX_DEPENDENCIES),)
-$(error No libopenmax implementation selected. Configuration error.)
-endif
-endif
-
-$(eval $(generic-package))
+$(eval $(virtual-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 14/20] package/libopenvg: convert to the virtual-package infrastructure
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (12 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 13/20] package/libopenmax: " Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 15/20] package/luainterpreter: " Yann E. MORIN
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/opengl/libopenvg/libopenvg.mk | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/package/opengl/libopenvg/libopenvg.mk b/package/opengl/libopenvg/libopenvg.mk
index 1c6f929..3ce85a1 100644
--- a/package/opengl/libopenvg/libopenvg.mk
+++ b/package/opengl/libopenvg/libopenvg.mk
@@ -4,13 +4,4 @@
 #
 ################################################################################
 
-LIBOPENVG_SOURCE =
-LIBOPENVG_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LIBOPENVG))
-
-ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
-ifeq ($(LIBOPENVG_DEPENDENCIES),)
-$(error No libOpenVG implementation selected. Configuration error.)
-endif
-endif
-
-$(eval $(generic-package))
+$(eval $(virtual-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages)
@ 2014-03-10 20:27 Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 01/20] package/libgles: rename the _HAS and _PROVIDES variables Yann E. MORIN
                   ` (19 more replies)
  0 siblings, 20 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Hello All!

Here is a quick series implementing a new infrastructure for virtual
packages.

Basically, all a virtual package has to do in its .mk is:

    $(eval $(virtual-package))

There is no need to:
  - define the dependency against the provider,
  - define _SOURCE=""  (empty)

But it requires the config options for the virtual package be named
after the package, eg.:

    package | Selector option        | Provider option
    --------+------------------------+-----------------------------
    libegl  | BR2_PACKAGE_HAS_LIBEGL | BR2_PACKAGE_PROVIDES_LIBEGL
    jpeg    | BR2_PACKAGE_HAS_JPEG   | BR2_PACKAGE_PROVIDES_JPEG

So the series:
  - starts with renaming some config options in the current virtual
    packages
  - then introduces the new virtual-package infra and the associated
    documentation in the manual
  - and finally converts the virtual packages over to the new infra.

Special thanks to ?ric for his initial work on the manual, which
prompted the idea for this new infra! That's partly for this that
I kept his initial change to the manual almost unmolested.

Notes:

  - the version string is strange. This does not work:
        $(2)_VERSION = virtual
    so I had to come up with the solution in patch 16.

  - patch 20 is not to be applied. It contains only example virtual
    packages, to test the implementation.


Changes v3 -> v4:
  - do not rename libegl and libgles  (Thomas P)
  - typo (Jerzy)
  - convert udev over to the new infra

Changes v2 -> v3:
  - rename libegl and libgles: s/^/opengl-/  (Thomas P)
  - add host variant, for the upcoming lua stuff  (Fran?ois)
  - add fake version string  (Thomas DS)

Changes v1 -> v2:
  - include ?ric's virtual package tutorial to the manual  (?ric)
  - split the renaimg of config options from the actual conversion to
    the virtual-package infra
  - rebase on top of master after post-release merge
  - add host-virtual-package (will be needed by a pending lua-related
    series by Fran?ois)


Regards,
Yann E. MORIN.

PS. Testing a mail-header to instruct Patchwork not to consider this
an actual pull-request: X-Patchwork-Hint: ignore. Sorry if there's a
miss... :-/


The following changes since commit ca4e9a78732bcacddd0c91ab35ee39a60ff040aa:

  jack2: fix missing alsa-lib feature dependency (2014-03-10 13:13:03 +0100)

are available in the git repository at:

  git://gitorious.org/buildroot/buildroot.git yem/virtual-packages

for you to fetch changes up to 62d961284dab1896ecfc03bea98461a637642029:

  FOO: tentative target and host virt packages (2014-03-10 18:15:13 +0100)

----------------------------------------------------------------
Yann E. MORIN (19):
      package/libgles: rename the _HAS and _PROVIDES variables
      package/libegl: rename the _HAS and _PROVIDES variables
      package/libopenmax: rename the _HAS and _PROVIDES variables
      package/libopenvg: rename the _HAS and _PROVIDES variables
      package/luainterpreter: rename the _HAS and _PROVIDES variables
      package/lua: rename config options
      packages: add infrastructure for virtual packages
      manual: update the virtual package section with the new infrastructure
      package/powervr: convert to the virtual-package infrastructure
      package/libgles: convert to the virtual-package infrastructure
      package/libegl: convert to the virtual-package infrastructure
      package/libopenmax: convert to the virtual-package infrastructure
      package/libopenvg: convert to the virtual-package infrastructure
      package/luainterpreter: convert to the virtual-package infrastructure
      package/jpeg: convert to the virtual-package infrastructure
      package/cryptodev: convert to the virtual-package infrastructure
      package/udev: convert to the virtual-package infrastructure
      virtual-package: fake a version string for virtual packages
      FOO: tentative target and host virt packages

eric.le.bihan.dev at free.fr (1):
      manual: add virtual package tutorial

 Config.in.legacy                                 | 21 ++++++
 docs/manual/adding-packages-virtual.txt          | 93 ++++++++++++++++++++++++
 docs/manual/adding-packages.txt                  |  2 +
 package/Config.in                                |  6 +-
 package/Makefile.in                              |  1 +
 package/bellagio/Config.in                       |  4 +-
 package/cairo/cairo.mk                           |  4 +-
 package/cryptodev/Config.in                      |  3 +
 package/cryptodev/cryptodev.mk                   | 12 +--
 package/foo-prov/Config.in                       | 15 ++++
 package/foo-prov/foo-prov.mk                     | 13 ++++
 package/foo-user/Config.in                       |  7 ++
 package/foo-user/foo-user.mk                     | 16 ++++
 package/foo-virt/Config.in                       | 13 ++++
 package/foo-virt/foo-virt.mk                     |  2 +
 package/freescale-imx/gpu-viv-bin-mx6q/Config.in |  8 +-
 package/gstreamer1/gst-omx/Config.in             |  4 +-
 package/gstreamer1/gst1-plugins-bad/Config.in    |  2 +-
 package/jpeg/Config.in                           |  3 +
 package/jpeg/jpeg.mk                             | 12 +--
 package/lbase64/Config.in                        |  2 +-
 package/lpeg/Config.in                           |  2 +-
 package/lpty/Config.in                           |  2 +-
 package/lrandom/Config.in                        |  2 +-
 package/lsqlite3/Config.in                       |  2 +-
 package/lua-cjson/Config.in                      |  2 +-
 package/lua-ev/Config.in                         |  2 +-
 package/lua-msgpack-native/Config.in             |  2 +-
 package/lua/Config.in                            | 14 ++--
 package/lua/lua.mk                               |  4 +-
 package/luaexpat/Config.in                       |  2 +-
 package/luafilesystem/Config.in                  |  2 +-
 package/luainterpreter/Config.in                 |  6 +-
 package/luainterpreter/luainterpreter.mk         | 11 +--
 package/luajit/Config.in                         |  4 +-
 package/luaposix/Config.in                       |  2 +-
 package/luasec/Config.in                         |  2 +-
 package/luasocket/Config.in                      |  2 +-
 package/luasql-sqlite3/Config.in                 |  2 +-
 package/lzlib/Config.in                          |  2 +-
 package/opengl/libegl/Config.in                  |  6 +-
 package/opengl/libegl/libegl.mk                  | 11 +--
 package/opengl/libgles/Config.in                 |  6 +-
 package/opengl/libgles/libgles.mk                | 11 +--
 package/opengl/libopenmax/Config.in              |  6 +-
 package/opengl/libopenmax/libopenmax.mk          | 11 +--
 package/opengl/libopenvg/Config.in               |  6 +-
 package/opengl/libopenvg/libopenvg.mk            | 11 +--
 package/pkg-virtual.mk                           | 70 ++++++++++++++++++
 package/powervr/powervr.mk                       | 11 +--
 package/qt/Config.in                             |  4 +-
 package/qt5/qt5base/Config.in                    |  6 +-
 package/qt5/qt5declarative/Config.in             |  6 +-
 package/qt5/qt5graphicaleffects/Config.in        |  6 +-
 package/qt5/qt5multimedia/Config.in              |  6 +-
 package/qt5/qt5quick1/Config.in                  |  6 +-
 package/qt5/qt5quickcontrols/Config.in           |  6 +-
 package/rings/Config.in                          |  2 +-
 package/rpi-userland/Config.in                   | 16 ++--
 package/sunxi-mali/Config.in                     |  8 +-
 package/ti-gfx/Config.in                         |  8 +-
 package/udev/udev.mk                             | 11 +--
 62 files changed, 362 insertions(+), 182 deletions(-)
 create mode 100644 docs/manual/adding-packages-virtual.txt
 create mode 100644 package/foo-prov/Config.in
 create mode 100644 package/foo-prov/foo-prov.mk
 create mode 100644 package/foo-user/Config.in
 create mode 100644 package/foo-user/foo-user.mk
 create mode 100644 package/foo-virt/Config.in
 create mode 100644 package/foo-virt/foo-virt.mk
 create mode 100644 package/pkg-virtual.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] 35+ messages in thread

* [Buildroot] [PATCH 15/20] package/luainterpreter: convert to the virtual-package infrastructure
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (13 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 14/20] package/libopenvg: " Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 16/20] package/jpeg: " Yann E. MORIN
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Cc: Francois Perrad <fperrad@gmail.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/luainterpreter/luainterpreter.mk | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/package/luainterpreter/luainterpreter.mk b/package/luainterpreter/luainterpreter.mk
index 40d4290..aa02696 100644
--- a/package/luainterpreter/luainterpreter.mk
+++ b/package/luainterpreter/luainterpreter.mk
@@ -4,15 +4,6 @@
 #
 ################################################################################
 
-LUAINTERPRETER_SOURCE =
-LUAINTERPRETER_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LUAINTERPRETER))
-
 LUAINTERPRETER_ABIVER = $(call qstrip,$(BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION))
 
-ifeq ($(BR2_PACKAGE_HAS_LUAINTERPRETER),y)
-ifeq ($(LUAINTERPRETER_DEPENDENCIES),)
-$(error No lua interpreter implementation selected. Configuration error.)
-endif
-endif
-
-$(eval $(generic-package))
+$(eval $(virtual-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 16/20] package/jpeg: convert to the virtual-package infrastructure
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (14 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 15/20] package/luainterpreter: " Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 17/20] package/cryptodev: " Yann E. MORIN
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Since this package is implemented via a choice rather than the usual
separate-package providers, we only need BR2_PACKAGE_HAS_JPEG to be
always defined when the 'jpeg' package is selected.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/jpeg/Config.in |  3 +++
 package/jpeg/jpeg.mk   | 12 +-----------
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/package/jpeg/Config.in b/package/jpeg/Config.in
index b7cdfeb..3042d24 100644
--- a/package/jpeg/Config.in
+++ b/package/jpeg/Config.in
@@ -30,6 +30,9 @@ config BR2_PACKAGE_JPEG_TURBO
 
 endchoice
 
+config BR2_PACKAGE_HAS_JPEG
+	def_bool y
+
 config BR2_PACKAGE_PROVIDES_JPEG
 	string
 	default "libjpeg"    if BR2_PACKAGE_LIBJPEG
diff --git a/package/jpeg/jpeg.mk b/package/jpeg/jpeg.mk
index 3695bc8..2d56be6 100644
--- a/package/jpeg/jpeg.mk
+++ b/package/jpeg/jpeg.mk
@@ -4,14 +4,4 @@
 #
 ################################################################################
 
-JPEG_SOURCE =
-JPEG_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_JPEG))
-
-ifeq ($(JPEG_DEPENDENCIES),)
-define JPEG_CONFIGURE_CMDS
-	echo "No JPEG implementation defined. Configuration error"
-	exit 1
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(virtual-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 17/20] package/cryptodev: convert to the virtual-package infrastructure
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (15 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 16/20] package/jpeg: " Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 18/20] package/udev: " Yann E. MORIN
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Since this package is implemented via a choice rather than the usual
separate-package providers, we only need BR2_PACKAGE_HAS_CRYPTODEV
to be always defined when the 'cryptodev' package is selected.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/cryptodev/Config.in    |  3 +++
 package/cryptodev/cryptodev.mk | 12 +-----------
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/package/cryptodev/Config.in b/package/cryptodev/Config.in
index 0780cc7..2407e04 100644
--- a/package/cryptodev/Config.in
+++ b/package/cryptodev/Config.in
@@ -37,6 +37,9 @@ config BR2_PACKAGE_OCF_LINUX
 
 endchoice
 
+config BR2_PACKAGE_HAS_CRYPTODEV
+	def_bool y
+
 config BR2_PACKAGE_PROVIDES_CRYPTODEV
 	string
 	default "cryptodev-linux" if BR2_PACKAGE_CRYPTODEV_LINUX
diff --git a/package/cryptodev/cryptodev.mk b/package/cryptodev/cryptodev.mk
index 11e6f48..969d1bd 100644
--- a/package/cryptodev/cryptodev.mk
+++ b/package/cryptodev/cryptodev.mk
@@ -4,14 +4,4 @@
 #
 ################################################################################
 
-CRYPTODEV_SOURCE =
-CRYPTODEV_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_CRYPTODEV))
-
-ifeq ($(CRYPTODEV_DEPENDENCIES),)
-define CRYPTODEV_CONFIGURE_CMDS
-	echo "No CRYPTODEV implementation defined. Configuration error"
-	exit 1
-endef
-endif
-
-$(eval $(generic-package))
+$(eval $(virtual-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 18/20] package/udev: convert to the virtual-package infrastructure
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (16 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 17/20] package/cryptodev: " Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-12 12:20   ` Eric Le Bihan
  2014-03-10 20:27 ` [Buildroot] [PATCH 19/20] virtual-package: fake a version string for virtual packages Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 20/20] FOO: tentative target and host virt packages Yann E. MORIN
  19 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Mike Zick <minimod@morethan.org>
---
 package/udev/udev.mk | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/package/udev/udev.mk b/package/udev/udev.mk
index f5eeeb4..cc4a6e3 100644
--- a/package/udev/udev.mk
+++ b/package/udev/udev.mk
@@ -4,13 +4,4 @@
 #
 ################################################################################
 
-UDEV_SOURCE =
-UDEV_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_UDEV))
-
-ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
-ifeq ($(UDEV_DEPENDENCIES),)
-$(error No Udev implementation selected. Configuration error)
-endif
-endif
-
-$(eval $(generic-package))
+$(eval $(virtual-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 19/20] virtual-package: fake a version string for virtual packages
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (17 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 18/20] package/udev: " Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  2014-03-10 20:27 ` [Buildroot] [PATCH 20/20] FOO: tentative target and host virt packages Yann E. MORIN
  19 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Samuel Martin <s.martin49@gmail.com>
---
 package/pkg-virtual.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/pkg-virtual.mk b/package/pkg-virtual.mk
index 9b206ea..617e5f2 100644
--- a/package/pkg-virtual.mk
+++ b/package/pkg-virtual.mk
@@ -44,6 +44,10 @@ endif
 # A virtual package does not have any source associated
 $(2)_SOURCE =
 
+# Fake a version string, so it looks nicer in the build log
+$(3)_VERSION = virtual
+HOST_$(3)_VERSION = virtual
+
 # This must be repeated from inner-generic-package, otherwise we get an empty
 # _DEPENDENCIES
 $(2)_DEPENDENCIES ?= $(filter-out host-toolchain $(1),\
-- 
1.8.3.2

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

* [Buildroot] [PATCH 20/20] FOO: tentative target and host virt packages
  2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
                   ` (18 preceding siblings ...)
  2014-03-10 20:27 ` [Buildroot] [PATCH 19/20] virtual-package: fake a version string for virtual packages Yann E. MORIN
@ 2014-03-10 20:27 ` Yann E. MORIN
  19 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-03-10 20:27 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

NOT TO BE APPLIED. Just samples to test virtual packages.

NOT SOB by me
---
 package/Config.in            |  4 ++++
 package/foo-prov/Config.in   | 15 +++++++++++++++
 package/foo-prov/foo-prov.mk | 13 +++++++++++++
 package/foo-user/Config.in   |  7 +++++++
 package/foo-user/foo-user.mk | 16 ++++++++++++++++
 package/foo-virt/Config.in   | 13 +++++++++++++
 package/foo-virt/foo-virt.mk |  2 ++
 7 files changed, 70 insertions(+)
 create mode 100644 package/foo-prov/Config.in
 create mode 100644 package/foo-prov/foo-prov.mk
 create mode 100644 package/foo-user/Config.in
 create mode 100644 package/foo-user/foo-user.mk
 create mode 100644 package/foo-virt/Config.in
 create mode 100644 package/foo-virt/foo-virt.mk

diff --git a/package/Config.in b/package/Config.in
index 503a533..81b43ba 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1,5 +1,9 @@
 menu "Target packages"
 
+source "package/foo-virt/Config.in"
+source "package/foo-prov/Config.in"
+source "package/foo-user/Config.in"
+
 source "package/busybox/Config.in"
 
 menu "Audio and video applications"
diff --git a/package/foo-prov/Config.in b/package/foo-prov/Config.in
new file mode 100644
index 0000000..17aec2c
--- /dev/null
+++ b/package/foo-prov/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_FOO_PROV
+    bool "foo-prov"
+    select BR2_PACKAGE_HAS_FOO_VIRT
+
+config BR2_PACKAGE_PROVIDES_FOO_VIRT
+    depends on BR2_PACKAGE_FOO_PROV
+    default "foo-prov"
+
+#config BR2_PACKAGE_HOST_FOO_PROV
+#    bool "host-foo-prov"
+#    select BR2_PACKAGE_HAS_HOST_FOO_VIRT
+#
+#config BR2_PACKAGE_PROVIDES_HOST_FOO_VIRT
+#    depends on BR2_PACKAGE_FOO_PROV
+#    default "host-foo-prov"
diff --git a/package/foo-prov/foo-prov.mk b/package/foo-prov/foo-prov.mk
new file mode 100644
index 0000000..68d3afe
--- /dev/null
+++ b/package/foo-prov/foo-prov.mk
@@ -0,0 +1,13 @@
+FOO_PROV_VERSION = 1.1.2.3.5.8
+FOO_PROV_SOURCE =
+HOST_FOO_PROV_SOURCE =
+
+define FOO_PROV_BUILD_CMDS
+	@echo FOO_PROV build cmd
+endef
+define HOST_FOO_PROV_BUILD_CMDS
+	@echo HOST_FOO_PROV build cmd
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
diff --git a/package/foo-user/Config.in b/package/foo-user/Config.in
new file mode 100644
index 0000000..7107a9e
--- /dev/null
+++ b/package/foo-user/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_FOO_USER
+    bool "foo-user"
+    depends on BR2_PACKAGE_HAS_FOO_VIRT
+
+#config BR2_PACKAGE_HOST_FOO_USER
+#    bool "host-foo-user"
+#    depends on BR2_PACKAGE_HAS_HOST_FOO_VIRT
diff --git a/package/foo-user/foo-user.mk b/package/foo-user/foo-user.mk
new file mode 100644
index 0000000..7601215
--- /dev/null
+++ b/package/foo-user/foo-user.mk
@@ -0,0 +1,16 @@
+FOO_USER_VERSION = 1.2.3
+FOO_USER_SOURCE =
+HOST_FOO_USER_SOURCE =
+
+FOO_USER_DEPENDENCIES = foo-virt host-foo-user
+define FOO_USER_BUILD_CMDS
+	@echo FOO_USER build cmd
+endef
+
+HOST_FOO_USER_DEPENDENCIES = host-foo-virt
+define HOST_FOO_USER_BUILD_CMDS
+	@echo HOST_FOO_USER build cmd
+endef
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
diff --git a/package/foo-virt/Config.in b/package/foo-virt/Config.in
new file mode 100644
index 0000000..f786c7e
--- /dev/null
+++ b/package/foo-virt/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_HAS_FOO_VIRT
+    bool
+
+config BR2_PACKAGE_PROVIDES_FOO_VIRT
+    depends on BR2_PACKAGE_HAS_FOO_VIRT
+    string
+
+#config BR2_PACKAGE_HAS_HOST_FOO_VIRT
+#    bool
+#
+#config BR2_PACKAGE_PROVIDES_HOST_FOO_VIRT
+#    depends on BR2_PACKAGE_HAS_HOST_FOO_VIRT
+#    string
diff --git a/package/foo-virt/foo-virt.mk b/package/foo-virt/foo-virt.mk
new file mode 100644
index 0000000..b00af5b
--- /dev/null
+++ b/package/foo-virt/foo-virt.mk
@@ -0,0 +1,2 @@
+$(eval $(virtual-package))
+$(eval $(host-virtual-package))
-- 
1.8.3.2

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

* [Buildroot] [PATCH 09/20] manual: update the virtual package section with the new infrastructure
  2014-03-10 20:27 ` [Buildroot] [PATCH 09/20] manual: update the virtual package section with the new infrastructure Yann E. MORIN
@ 2014-03-12 11:59   ` Eric Le Bihan
  2014-04-04 20:18   ` Arnout Vandecappelle
  1 sibling, 0 replies; 35+ messages in thread
From: Eric Le Bihan @ 2014-03-12 11:59 UTC (permalink / raw)
  To: buildroot

On Mon, Mar 10, 2014 at 09:27:38PM +0100, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> Cc: Samuel Martin <s.martin49@gmail.com>
> Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Acked-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>

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

* [Buildroot] [PATCH 11/20] package/libgles: convert to the virtual-package infrastructure
  2014-03-10 20:27 ` [Buildroot] [PATCH 11/20] package/libgles: " Yann E. MORIN
@ 2014-03-12 12:15   ` Eric Le Bihan
  0 siblings, 0 replies; 35+ messages in thread
From: Eric Le Bihan @ 2014-03-12 12:15 UTC (permalink / raw)
  To: buildroot

On Mon, Mar 10, 2014 at 09:27:40PM +0100, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> Cc: Mike Zick <minimod@morethan.org>
> Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Tested-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>

I tested this patch by building an image for RaspberryPi with Qt5. I also
tested that the error message about missing provider is displayed when
using a corrupted defconfig file.

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

* [Buildroot] [PATCH 12/20] package/libegl: convert to the virtual-package infrastructure
  2014-03-10 20:27 ` [Buildroot] [PATCH 12/20] package/libegl: " Yann E. MORIN
@ 2014-03-12 12:18   ` Eric Le Bihan
  0 siblings, 0 replies; 35+ messages in thread
From: Eric Le Bihan @ 2014-03-12 12:18 UTC (permalink / raw)
  To: buildroot

On Mon, Mar 10, 2014 at 09:27:41PM +0100, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> Cc: Mike Zick <minimod@morethan.org>
> Reviewed-by: Samuel Martin <s.martin49@gmail.com>
Tested-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>

I tested this patch by building an image for RaspberryPi with Qt5.
As for libgles, I tested error message display with a corrupted defconfig
file.

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

* [Buildroot] [PATCH 18/20] package/udev: convert to the virtual-package infrastructure
  2014-03-10 20:27 ` [Buildroot] [PATCH 18/20] package/udev: " Yann E. MORIN
@ 2014-03-12 12:20   ` Eric Le Bihan
  0 siblings, 0 replies; 35+ messages in thread
From: Eric Le Bihan @ 2014-03-12 12:20 UTC (permalink / raw)
  To: buildroot

On Mon, Mar 10, 2014 at 09:27:47PM +0100, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> Cc: Mike Zick <minimod@morethan.org>
Tested-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>

I tested this patch by building QEMU x86 images using eudev or systemd as
providers.

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

* [Buildroot] [PATCH 01/20] package/libgles: rename the _HAS and _PROVIDES variables
  2014-03-10 20:27 ` [Buildroot] [PATCH 01/20] package/libgles: rename the _HAS and _PROVIDES variables Yann E. MORIN
@ 2014-04-04 16:41   ` Arnout Vandecappelle
  2014-04-04 20:23     ` Yann E. MORIN
  0 siblings, 1 reply; 35+ messages in thread
From: Arnout Vandecappelle @ 2014-04-04 16:41 UTC (permalink / raw)
  To: buildroot

On 10/03/14 21:27, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> The basic rule for a package is to have its options named
> after the package name. There is no reason this should not
> also be the case for virtual packages.
> 
> Besides, this will allow us to switch libgles to use the
> soon-to-be-introduced virtual-package infrastructure.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> Cc: Mike Zick <minimod@morethan.org>
> Cc: Samuel Martin <s.martin49@gmail.com>
> Reviewed-by: Samuel Martin <s.martin49@gmail.com>

 It no longer applies as is (well, it applies but it is not 
correct anymore; it misses the new mesa3d and xbmc). Instead, 
the change should be done with:

git grep -l 'BR2_PACKAGE_\(HAS\|PROVIDES\)_OPENGL_ES' | xargs sed -i 's/BR2_PACKAGE_\(HAS\|PROVIDES\)_OPENGL_ES/BR2_PACKAGE_\1_LIBGLES/g'

 Other than that it gets my ack.

 Same for the next 4 patches: use the automated change 
and it gets my ack.

 Please apply soonish to avoid further changes.

 Regards,
 Arnout

> ---
>  package/cairo/cairo.mk                           | 2 +-
>  package/freescale-imx/gpu-viv-bin-mx6q/Config.in | 4 ++--
>  package/gstreamer1/gst1-plugins-bad/Config.in    | 2 +-
>  package/opengl/libgles/Config.in                 | 6 +++---
>  package/opengl/libgles/libgles.mk                | 4 ++--
>  package/qt/Config.in                             | 2 +-
>  package/qt5/qt5base/Config.in                    | 4 ++--
>  package/qt5/qt5declarative/Config.in             | 4 ++--
>  package/qt5/qt5graphicaleffects/Config.in        | 4 ++--
>  package/qt5/qt5multimedia/Config.in              | 4 ++--
>  package/qt5/qt5quick1/Config.in                  | 4 ++--
>  package/qt5/qt5quickcontrols/Config.in           | 4 ++--
>  package/rpi-userland/Config.in                   | 4 ++--
>  package/sunxi-mali/Config.in                     | 4 ++--
>  package/ti-gfx/Config.in                         | 4 ++--
>  15 files changed, 28 insertions(+), 28 deletions(-)
> 
> diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk
> index aa03a27..ee58aff 100644
> --- a/package/cairo/cairo.mk
> +++ b/package/cairo/cairo.mk
> @@ -54,7 +54,7 @@ else
>  	CAIRO_CONF_OPT += --disable-directfb
>  endif
>  
> -ifeq ($(BR2_PACKAGE_HAS_OPENGL_ES),y)
> +ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
>  	CAIRO_CONF_OPT += --enable-glesv2
>  	CAIRO_DEPENDENCIES += libgles
>  else
> diff --git a/package/freescale-imx/gpu-viv-bin-mx6q/Config.in b/package/freescale-imx/gpu-viv-bin-mx6q/Config.in
> index e084568..379402d 100644
> --- a/package/freescale-imx/gpu-viv-bin-mx6q/Config.in
> +++ b/package/freescale-imx/gpu-viv-bin-mx6q/Config.in
> @@ -5,7 +5,7 @@ comment "gpu-viv-bin-mx6q needs an (e)glibc toolchain"
>  config BR2_PACKAGE_GPU_VIV_BIN_MX6Q
>  	bool "gpu-viv-bin-mx6q"
>  	select BR2_PACKAGE_HAS_OPENGL_EGL
> -	select BR2_PACKAGE_HAS_OPENGL_ES
> +	select BR2_PACKAGE_HAS_LIBGLES
>  	select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7
>  	select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
>  	depends on BR2_arm # Only relevant for i.MX6
> @@ -27,7 +27,7 @@ if BR2_PACKAGE_GPU_VIV_BIN_MX6Q
>  config BR2_PACKAGE_PROVIDES_OPENGL_EGL
>  	default "gpu-viv-bin-mx6q"
>  
> -config BR2_PACKAGE_PROVIDES_OPENGL_ES
> +config BR2_PACKAGE_PROVIDES_LIBGLES
>  	default "gpu-viv-bin-mx6q"
>  
>  config BR2_PACKAGE_GPU_VIV_BIN_MX6Q_EXAMPLES
> diff --git a/package/gstreamer1/gst1-plugins-bad/Config.in b/package/gstreamer1/gst1-plugins-bad/Config.in
> index 2c5c290..25e379f 100644
> --- a/package/gstreamer1/gst1-plugins-bad/Config.in
> +++ b/package/gstreamer1/gst1-plugins-bad/Config.in
> @@ -464,7 +464,7 @@ comment "rsvg plugin needs a toolchain w/ C++, wchar, threads"
>  
>  config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_EGLGLES
>  	bool "eglgles"
> -	depends on BR2_PACKAGE_HAS_OPENGL_EGL && BR2_PACKAGE_HAS_OPENGL_ES
> +	depends on BR2_PACKAGE_HAS_OPENGL_EGL && BR2_PACKAGE_HAS_LIBGLES
>  	help
>  	  EGL/GLES sink
>  
> diff --git a/package/opengl/libgles/Config.in b/package/opengl/libgles/Config.in
> index 75ccfc8..b7b800f 100644
> --- a/package/opengl/libgles/Config.in
> +++ b/package/opengl/libgles/Config.in
> @@ -1,6 +1,6 @@
> -config BR2_PACKAGE_HAS_OPENGL_ES
> +config BR2_PACKAGE_HAS_LIBGLES
>  	bool
>  
> -config BR2_PACKAGE_PROVIDES_OPENGL_ES
> -	depends on BR2_PACKAGE_HAS_OPENGL_ES
> +config BR2_PACKAGE_PROVIDES_LIBGLES
> +	depends on BR2_PACKAGE_HAS_LIBGLES
>  	string
> diff --git a/package/opengl/libgles/libgles.mk b/package/opengl/libgles/libgles.mk
> index 7a07e37..041e378 100644
> --- a/package/opengl/libgles/libgles.mk
> +++ b/package/opengl/libgles/libgles.mk
> @@ -5,9 +5,9 @@
>  ################################################################################
>  
>  LIBGLES_SOURCE =
> -LIBGLES_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_OPENGL_ES))
> +LIBGLES_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_LIBGLES))
>  
> -ifeq ($(BR2_PACKAGE_HAS_OPENGL_ES),y)
> +ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
>  ifeq ($(LIBGLES_DEPENDENCIES),)
>  $(error No libGLES implementation selected. Configuration error.)
>  endif
> diff --git a/package/qt/Config.in b/package/qt/Config.in
> index 5105e5d..d3f6a5a 100644
> --- a/package/qt/Config.in
> +++ b/package/qt/Config.in
> @@ -294,7 +294,7 @@ config BR2_PACKAGE_QT_PHONON_BACKEND
>  
>  config BR2_PACKAGE_QT_OPENGL_ES
>  	bool "OpenGL ES v2.x support"
> -	depends on BR2_PACKAGE_HAS_OPENGL_ES
> +	depends on BR2_PACKAGE_HAS_LIBGLES
>  	depends on BR2_PACKAGE_HAS_OPENGL_EGL
>  	help
>  	  Enable the OpenGL ES v2.x support.
> diff --git a/package/qt5/qt5base/Config.in b/package/qt5/qt5base/Config.in
> index 5c404d1..437b1d2 100644
> --- a/package/qt5/qt5base/Config.in
> +++ b/package/qt5/qt5base/Config.in
> @@ -138,10 +138,10 @@ comment "X.org XCB backend available if X.org is enabled"
>  config BR2_PACKAGE_QT5BASE_EGLFS
>  	bool "eglfs support"
>  	depends on BR2_PACKAGE_HAS_OPENGL_EGL
> -	depends on BR2_PACKAGE_HAS_OPENGL_ES
> +	depends on BR2_PACKAGE_HAS_LIBGLES
>  
>  comment "eglfs backend available if OpenGLES and EGL are enabled"
> -	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES
> +	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES
>  
>  config BR2_PACKAGE_QT5BASE_PRINTSUPPORT
>  	bool "print support module"
> diff --git a/package/qt5/qt5declarative/Config.in b/package/qt5/qt5declarative/Config.in
> index c5753b1..5e1516d 100644
> --- a/package/qt5/qt5declarative/Config.in
> +++ b/package/qt5/qt5declarative/Config.in
> @@ -5,7 +5,7 @@ config BR2_PACKAGE_QT5DECLARATIVE
>  	select BR2_PACKAGE_QT5BASE_GUI
>  	select BR2_PACKAGE_QT5BASE_EGLFS
>  	depends on BR2_PACKAGE_HAS_OPENGL_EGL
> -	depends on BR2_PACKAGE_HAS_OPENGL_ES
> +	depends on BR2_PACKAGE_HAS_LIBGLES
>  	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
>  	help
>  	  Qt is a cross-platform application and UI framework for
> @@ -16,5 +16,5 @@ config BR2_PACKAGE_QT5DECLARATIVE
>  	  http://qt-project.org
>  
>  comment "qt5declarative requires an OpenGL-capable backend"
> -	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \
> +	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES) && \
>  		BR2_PACKAGE_QT5_JSCORE_AVAILABLE
> diff --git a/package/qt5/qt5graphicaleffects/Config.in b/package/qt5/qt5graphicaleffects/Config.in
> index f4029e9..a821b40 100644
> --- a/package/qt5/qt5graphicaleffects/Config.in
> +++ b/package/qt5/qt5graphicaleffects/Config.in
> @@ -4,7 +4,7 @@ config BR2_PACKAGE_QT5GRAPHICALEFFECTS
>  	select BR2_PACKAGE_QT5DECLARATIVE
>  	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
>  	depends on BR2_PACKAGE_HAS_OPENGL_EGL
> -	depends on BR2_PACKAGE_HAS_OPENGL_ES
> +	depends on BR2_PACKAGE_HAS_LIBGLES
>  	help
>  	  Qt is a cross-platform application and UI framework for
>  	  developers using C++.
> @@ -14,5 +14,5 @@ config BR2_PACKAGE_QT5GRAPHICALEFFECTS
>  	  http://qt-project.org
>  
>  comment "qt5graphicaleffects requires an OpenGL-capable backend"
> -	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \
> +	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES) && \
>  		BR2_PACKAGE_QT5_JSCORE_AVAILABLE
> diff --git a/package/qt5/qt5multimedia/Config.in b/package/qt5/qt5multimedia/Config.in
> index 53b7f86..765bdc1 100644
> --- a/package/qt5/qt5multimedia/Config.in
> +++ b/package/qt5/qt5multimedia/Config.in
> @@ -3,7 +3,7 @@ config BR2_PACKAGE_QT5MULTIMEDIA
>  	select BR2_PACKAGE_QT5BASE
>  	select BR2_PACKAGE_QT5DECLARATIVE
>  	depends on BR2_PACKAGE_HAS_OPENGL_EGL
> -	depends on BR2_PACKAGE_HAS_OPENGL_ES
> +	depends on BR2_PACKAGE_HAS_LIBGLES
>  	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
>  	help
>  	  Qt is a cross-platform application and UI framework for
> @@ -14,5 +14,5 @@ config BR2_PACKAGE_QT5MULTIMEDIA
>  	  http://qt-project.org
>  
>  comment "qt5multimedia requires an OpenGL-capable backend"
> -	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \
> +	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES) && \
>  		BR2_PACKAGE_QT5_JSCORE_AVAILABLE
> diff --git a/package/qt5/qt5quick1/Config.in b/package/qt5/qt5quick1/Config.in
> index 1a0b8bf..1ffcc0d 100644
> --- a/package/qt5/qt5quick1/Config.in
> +++ b/package/qt5/qt5quick1/Config.in
> @@ -9,7 +9,7 @@ config BR2_PACKAGE_QT5QUICK1
>  	# This module does not support static linking
>  	depends on !BR2_PREFER_STATIC_LIB
>  	depends on BR2_PACKAGE_HAS_OPENGL_EGL
> -	depends on BR2_PACKAGE_HAS_OPENGL_ES
> +	depends on BR2_PACKAGE_HAS_LIBGLES
>  	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
>  	help
>  	  Qt is a cross-platform application and UI framework for
> @@ -21,5 +21,5 @@ config BR2_PACKAGE_QT5QUICK1
>  
>  comment "qt5quick1 needs a toolchain w/ dynamic library and an OpenGL-capable backend"
>  	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
> -	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES || \
> +	depends on !BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES || \
>  		BR2_PREFER_STATIC_LIB
> diff --git a/package/qt5/qt5quickcontrols/Config.in b/package/qt5/qt5quickcontrols/Config.in
> index e72f2a4..355aef0 100644
> --- a/package/qt5/qt5quickcontrols/Config.in
> +++ b/package/qt5/qt5quickcontrols/Config.in
> @@ -5,7 +5,7 @@ config BR2_PACKAGE_QT5QUICKCONTROLS
>  	select BR2_PACKAGE_QT5DECLARATIVE
>  	depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE
>  	depends on BR2_PACKAGE_HAS_OPENGL_EGL
> -	depends on BR2_PACKAGE_HAS_OPENGL_ES
> +	depends on BR2_PACKAGE_HAS_LIBGLES
>  	help
>  	  Qt is a cross-platform application and UI framework for
>  	  developers using C++.
> @@ -15,5 +15,5 @@ config BR2_PACKAGE_QT5QUICKCONTROLS
>  	  http://qt-project.org
>  
>  comment "qt5quickcontrols requires an OpenGL-capable backend"
> -	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_OPENGL_ES) && \
> +	depends on (!BR2_PACKAGE_HAS_OPENGL_EGL || !BR2_PACKAGE_HAS_LIBGLES) && \
>  		BR2_PACKAGE_QT5_JSCORE_AVAILABLE
> diff --git a/package/rpi-userland/Config.in b/package/rpi-userland/Config.in
> index 2303942..68b535b 100644
> --- a/package/rpi-userland/Config.in
> +++ b/package/rpi-userland/Config.in
> @@ -5,7 +5,7 @@ config BR2_PACKAGE_RPI_USERLAND
>  	depends on BR2_LARGEFILE
>  	depends on BR2_TOOLCHAIN_HAS_THREADS
>  	select BR2_PACKAGE_HAS_OPENGL_EGL
> -	select BR2_PACKAGE_HAS_OPENGL_ES
> +	select BR2_PACKAGE_HAS_LIBGLES
>  	select BR2_PACKAGE_HAS_OPENVG
>  	select BR2_PACKAGE_HAS_OPENMAX
>  	help
> @@ -22,7 +22,7 @@ if BR2_PACKAGE_RPI_USERLAND
>  config BR2_PACKAGE_PROVIDES_OPENGL_EGL
>  	default "rpi-userland"
>  
> -config BR2_PACKAGE_PROVIDES_OPENGL_ES
> +config BR2_PACKAGE_PROVIDES_LIBGLES
>  	default "rpi-userland"
>  
>  config BR2_PACKAGE_PROVIDES_OPENVG
> diff --git a/package/sunxi-mali/Config.in b/package/sunxi-mali/Config.in
> index 9f188a3..c47b6a3 100644
> --- a/package/sunxi-mali/Config.in
> +++ b/package/sunxi-mali/Config.in
> @@ -1,7 +1,7 @@
>  config BR2_PACKAGE_SUNXI_MALI
>  	bool "sunxi-mali"
>  	select BR2_PACKAGE_HAS_OPENGL_EGL
> -	select BR2_PACKAGE_HAS_OPENGL_ES
> +	select BR2_PACKAGE_HAS_LIBGLES
>  	# The egl/gles mali libraries are provided as a git submodule of the
>  	# sunxi-mali repo and are downloaded by the sunxi-mali-prop package.
>  	select BR2_PACKAGE_SUNXI_MALI_PROP
> @@ -21,7 +21,7 @@ if BR2_PACKAGE_SUNXI_MALI
>  config BR2_PACKAGE_PROVIDES_OPENGL_EGL
>  	default "sunxi-mali"
>  
> -config BR2_PACKAGE_PROVIDES_OPENGL_ES
> +config BR2_PACKAGE_PROVIDES_LIBGLES
>  	default "sunxi-mali"
>  
>  config BR2_PACKAGE_SUNXI_MALI_DBG
> diff --git a/package/ti-gfx/Config.in b/package/ti-gfx/Config.in
> index f455f4c..2bdc972 100644
> --- a/package/ti-gfx/Config.in
> +++ b/package/ti-gfx/Config.in
> @@ -1,7 +1,7 @@
>  config BR2_PACKAGE_TI_GFX
>  	bool "ti-gfx"
>  	select BR2_PACKAGE_HAS_OPENGL_EGL
> -	select BR2_PACKAGE_HAS_OPENGL_ES
> +	select BR2_PACKAGE_HAS_LIBGLES
>  	select BR2_PACKAGE_HAS_POWERVR
>  	depends on BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC && BR2_arm
>  	help
> @@ -14,7 +14,7 @@ if BR2_PACKAGE_TI_GFX
>  config BR2_PACKAGE_PROVIDES_OPENGL_EGL
>  	default "ti-gfx"
>  
> -config BR2_PACKAGE_PROVIDES_OPENGL_ES
> +config BR2_PACKAGE_PROVIDES_LIBGLES
>  	default "ti-gfx"
>  
>  config BR2_PACKAGE_PROVIDES_POWERVR
> 


-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 03/20] package/libopenmax: rename the _HAS and _PROVIDES variables
  2014-03-10 20:27 ` [Buildroot] [PATCH 03/20] package/libopenmax: " Yann E. MORIN
@ 2014-04-04 16:41   ` Arnout Vandecappelle
  0 siblings, 0 replies; 35+ messages in thread
From: Arnout Vandecappelle @ 2014-04-04 16:41 UTC (permalink / raw)
  To: buildroot

On 10/03/14 21:27, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> The basic rule for a package is to have its options named
> after the package name. There is no reason this should not
> also be the case for virtual packages.
> 
> Besides, this will allow us to switch libopenmax to use the
> soon-to-be-introduced virtual-package infrastructure.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> Cc: Mike Zick <minimod@morethan.org>
> Reviewed-by: Samuel Martin <s.martin49@gmail.com>

 This one is still correct so

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

(but just to be safe, use automated conversion instead of applying the
patch).


 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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 04/20] package/libopenvg: rename the _HAS and _PROVIDES variables
  2014-03-10 20:27 ` [Buildroot] [PATCH 04/20] package/libopenvg: " Yann E. MORIN
@ 2014-04-04 16:43   ` Arnout Vandecappelle
  0 siblings, 0 replies; 35+ messages in thread
From: Arnout Vandecappelle @ 2014-04-04 16:43 UTC (permalink / raw)
  To: buildroot

On 10/03/14 21:27, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> The basic rule for a package is to have its options named
> after the package name. There is no reason this should not
> also be the case for virtual packages.
> 
> Besides, renaming the package will allow us to switch libopenvg to use
> the soon-to-be-introduced virtual-package infrastructure.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> Cc: Mike Zick <minimod@morethan.org>
> Reviewed-by: Samuel Martin <s.martin49@gmail.com>
> Cc: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>

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


 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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 06/20] package/lua: rename config options
  2014-03-10 20:27 ` [Buildroot] [PATCH 06/20] package/lua: rename config options Yann E. MORIN
@ 2014-04-04 16:48   ` Arnout Vandecappelle
  0 siblings, 0 replies; 35+ messages in thread
From: Arnout Vandecappelle @ 2014-04-04 16:48 UTC (permalink / raw)
  To: buildroot

On 10/03/14 21:27, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> Package's options should be named after the package.
> 
> Lua is an interpreter, but the package is named 'lua'. So we want to
> name the config option with '_LUA_', not with '_LUA_INTERPRETER_'
> 
> Besides, naming them with '_LUA_INTERPRETER_' might be confusing, since
> there is a package named 'luainterpreter'.
> 
> Since the renamed options are part of a choice, we can't use the legacy
> options to select the new ones. So we instead instruct the user to go
> select the appropriate option in the choice.

 Although you're right that the interpreter bit is redundant, it's only a
bit confusing with LUAINTERPRETER, so for me there's not really
sufficient reason to make this change. Especially since there's no decent
legacy handling.

 Regards,
 Arnout

> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Francois Perrad <fperrad@gmail.com>
> Reviewed-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  Config.in.legacy      | 21 +++++++++++++++++++++
>  package/lua/Config.in | 10 +++++-----
>  package/lua/lua.mk    |  4 ++--
>  3 files changed, 28 insertions(+), 7 deletions(-)
> 
> diff --git a/Config.in.legacy b/Config.in.legacy
> index afcd3b1..e536ae0 100644
> --- a/Config.in.legacy
> +++ b/Config.in.legacy
> @@ -101,6 +101,27 @@ endif
>  ###############################################################################
>  comment "Legacy options removed in 2014.05"
>  
> +config BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE
> +	bool "Lua command-line editing none has been renamed"
> +	help
> +	  The BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE option has been
> +	  renamed to BR2_PACKAGE_LUA_EDITING_NONE. You will have to select
> +	  it in the corresponding choice.
> +
> +config BR2_PACKAGE_LUA_INTERPRETER_READLINE
> +	bool "Lua command-line editing using readline has been renamed"
> +	help
> +	  The BR2_PACKAGE_LUA_INTERPRETER_READLINE option has been
> +	  renamed to BR2_PACKAGE_LUA_READLINE. You will have to select
> +	  it in the corresponding choice.
> +
> +config BR2_PACKAGE_LUA_INTERPRETER_LINENOISE
> +	bool "Lua command-line editing using linenoise has been renamed"
> +	help
> +	  The BR2_PACKAGE_LUA_INTERPRETER_LINENOISE option has been
> +	  renamed to BR2_PACKAGE_LUA_LINENOISE. You will have to select
> +	  it in the corresponding choice.
> +
>  config BR2_KERNEL_HEADERS_SNAP
>  	bool "Local Linux snapshot support removed"
>  	select BR2_LEGACY
> diff --git a/package/lua/Config.in b/package/lua/Config.in
> index 2f1b25b..0e31858 100644
> --- a/package/lua/Config.in
> +++ b/package/lua/Config.in
> @@ -30,22 +30,22 @@ config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION
>  	default "5.2"	if BR2_PACKAGE_LUA_5_2
>  
>  choice
> -	prompt "Lua Interpreter command-line editing"
> -	default BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE
> +	prompt "Lua command-line editing"
> +	default BR2_PACKAGE_LUA_EDITING_NONE
>  
> -config BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE
> +config BR2_PACKAGE_LUA_EDITING_NONE
>  	bool "none"
>  	help
>  	  None.
>  
> -config BR2_PACKAGE_LUA_INTERPRETER_READLINE
> +config BR2_PACKAGE_LUA_READLINE
>  	bool "readline support"
>  	select BR2_PACKAGE_READLINE
>  	select BR2_PACKAGE_NCURSES
>  	help
>  	  Enables command-line editing in the Lua interpreter.
>  
> -config BR2_PACKAGE_LUA_INTERPRETER_LINENOISE
> +config BR2_PACKAGE_LUA_LINENOISE
>  	bool "linenoise support"
>  	select BR2_PACKAGE_LINENOISE
>  	help
> diff --git a/package/lua/lua.mk b/package/lua/lua.mk
> index bf68e65..bc8799a 100644
> --- a/package/lua/lua.mk
> +++ b/package/lua/lua.mk
> @@ -31,12 +31,12 @@ else
>  	LUA_MYLIBS += -ldl
>  endif
>  
> -ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_READLINE),y)
> +ifeq ($(BR2_PACKAGE_LUA_READLINE),y)
>  	LUA_DEPENDENCIES = readline ncurses
>  	LUA_MYLIBS += -lreadline -lhistory -lncurses
>  	LUA_CFLAGS += -DLUA_USE_READLINE
>  else
> -ifeq ($(BR2_PACKAGE_LUA_INTERPRETER_LINENOISE),y)
> +ifeq ($(BR2_PACKAGE_LUA_LINENOISE),y)
>  	LUA_DEPENDENCIES = linenoise
>  	LUA_MYLIBS += -llinenoise
>  	LUA_CFLAGS += -DLUA_USE_LINENOISE
> 


-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 07/20] manual: add virtual package tutorial
  2014-03-10 20:27 ` [Buildroot] [PATCH 07/20] manual: add virtual package tutorial Yann E. MORIN
@ 2014-04-04 16:54   ` Arnout Vandecappelle
  0 siblings, 0 replies; 35+ messages in thread
From: Arnout Vandecappelle @ 2014-04-04 16:54 UTC (permalink / raw)
  To: buildroot

On 10/03/14 21:27, Yann E. MORIN wrote:
> From: "eric.le.bihan.dev at free.fr" <eric.le.bihan.dev@free.fr>
> 
> The manual now features a new section with instructions about how to add a
> virtual package.
> 
> Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> [yann.morin.1998 at free.fr: move down statement about provider's .mk]
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Reviewed-by: Samuel Martin <s.martin49@gmail.com>

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


 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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 08/20] packages: add infrastructure for virtual packages
  2014-03-10 20:27 ` [Buildroot] [PATCH 08/20] packages: add infrastructure for virtual packages Yann E. MORIN
@ 2014-04-04 20:10   ` Arnout Vandecappelle
  2014-04-05 14:41     ` Yann E. MORIN
  0 siblings, 1 reply; 35+ messages in thread
From: Arnout Vandecappelle @ 2014-04-04 20:10 UTC (permalink / raw)
  To: buildroot

On 10/03/14 21:27, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> The virtual-package infrastructure allows to easily define a
> virtual package in a single line:
> 
>     $ cat package/some-virtual-package/some-virtual-package.mk
>     $(eval $(virtual-package))
> 
> And that's all. :-)
> 
> Thanks to ?ric for his work on the manual, that prompted the
> idea for this virtual-package infrastructure! ;-)
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> Cc: Mike Zick <minimod@morethan.org>
> Reviewed-by: Samuel Martin <s.martin49@gmail.com>
> ---
>  package/Makefile.in    |  1 +
>  package/pkg-virtual.mk | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 67 insertions(+)
>  create mode 100644 package/pkg-virtual.mk
> 
> diff --git a/package/Makefile.in b/package/Makefile.in
> index 454f614..c5cdf5a 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -362,4 +362,5 @@ include package/pkg-cmake.mk
>  include package/pkg-luarocks.mk
>  include package/pkg-perl.mk
>  include package/pkg-python.mk
> +include package/pkg-virtual.mk
>  include package/pkg-generic.mk
> diff --git a/package/pkg-virtual.mk b/package/pkg-virtual.mk
> new file mode 100644
> index 0000000..9b206ea
> --- /dev/null
> +++ b/package/pkg-virtual.mk
> @@ -0,0 +1,66 @@
> +################################################################################
> +# Virtual package infrastructure
> +#
> +# This file implements an infrastructure that eases development of
> +# package .mk files for virtual packages. It should be used for all
> +# virtual packages.
> +#
> +# See the Buildroot documentation for details on the usage of this
> +# infrastructure
> +#
> +# In terms of implementation, this virtual infrastructure requires
> +# the .mk file to only call the 'virtual-package' macro.
> +#
> +################################################################################
> +
> +
> +################################################################################
> +# inner-virtual-package -- defines the dependency rules of the virtual
> +# package against its provider.
> +#
> +#  argument 1 is the lowercase package name
> +#  argument 2 is the uppercase package name, including an 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)
> +################################################################################
> +
> +# Note: putting this comment here rather than in the define block, otherwise
> +# make would try to expand the $(error ...) in the comment, which is not
> +# really what we want.

 That could be avoided by $$-quoting it inside the comment as well :-)

> +# We need to use second-expansion for the $(error ...) call, below,
> +# so it is not evaluated now, but as part of the generated make code.
> +
> +define inner-virtual-package
> +
> +# Ensure the virtual package has an implementation defined.
> +ifeq ($(BR2_PACKAGE_HAS_$(2)),y)

 Even though it is not strictly necessary (it will anyway be eval'ed
immediately after expansion), I think it's better to consistently use $$
everywhere (except for $(1) etc. of course). Currently it's not done
consistently in package-generic but it would be better to make it
consistent here.

> +ifeq ($(call qstrip,$(BR2_PACKAGE_PROVIDES_$(2))),)
> +$$(error No implementation selected for virtual package $(1). Configuration error)

 I think "Configuration error" is a bit vague, but I can't think of
anything better.

> +endif
> +endif
> +
> +# A virtual package does not have any source associated
> +$(2)_SOURCE =
> +
> +# This must be repeated from inner-generic-package, otherwise we get an empty
> +# _DEPENDENCIES
> +$(2)_DEPENDENCIES ?= $(filter-out host-toolchain $(1),\
> +	$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
> +
> +# Add dependency against the provider
> +$(2)_DEPENDENCIES += $(call qstrip,$(BR2_PACKAGE_PROVIDES_$(2)))
> +
> +# Call the generic package infrastructure to generate the necessary
> +# make targets
> +$(call inner-generic-package,$(1),$(2),$(3),$(4))

 I don't really see the need to call inner-generic-package here. Isn't it
sufficient to do:

ifeq ($$(BR2_PACKAGE_HAS_$(2)),y)
ifeq ($$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2))),)
$$(error No implementation selected for virtual package $(1).
Configuration error)
endif
endif

$(1): $$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2))

 We don't need all the rest of the package infrastructure, do we? We
don't need to download any sources, we don't need legal info for the
virtual package, etc. etc. There's also no need to create stamp files


> +
> +endef
> +
> +################################################################################
> +# virtual-package -- the target generator macro for virtual packages
> +################################################################################
> +
> +virtual-package = $(call inner-virtual-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
> +host-virtual-package = $(call inner-virtual-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host)

 Note that with the simplification above, you only need the first two
arguments to the inner-virtual-package macro.

 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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 09/20] manual: update the virtual package section with the new infrastructure
  2014-03-10 20:27 ` [Buildroot] [PATCH 09/20] manual: update the virtual package section with the new infrastructure Yann E. MORIN
  2014-03-12 11:59   ` Eric Le Bihan
@ 2014-04-04 20:18   ` Arnout Vandecappelle
  1 sibling, 0 replies; 35+ messages in thread
From: Arnout Vandecappelle @ 2014-04-04 20:18 UTC (permalink / raw)
  To: buildroot

On 10/03/14 21:27, Yann E. MORIN wrote:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> Cc: Samuel Martin <s.martin49@gmail.com>
> Reviewed-by: Samuel Martin <s.martin49@gmail.com>

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


 Regards,
 Arnout

> ---
>  docs/manual/adding-packages-virtual.txt | 26 ++++++++++----------------
>  1 file changed, 10 insertions(+), 16 deletions(-)
> 
> diff --git a/docs/manual/adding-packages-virtual.txt b/docs/manual/adding-packages-virtual.txt
> index 76f5794..e8820a0 100644
> --- a/docs/manual/adding-packages-virtual.txt
> +++ b/docs/manual/adding-packages-virtual.txt
> @@ -1,10 +1,10 @@
>  // -*- mode:doc; -*-
>  // vim: set syntax=asciidoc:
>  
> -[[virtual-package-tutorial]]
> +Infrastructure for virtual packages
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  
> -Virtual package tutorial
> -~~~~~~~~~~~~~~~~~~~~~~~~
> +[[virtual-package-tutorial]]
>  
>  In Buildroot, a virtual package is a package whose functionalities are
>  provided by one or more packages, referred to as 'providers'. The virtual
> @@ -16,6 +16,9 @@ The implementation of this API is different for the 'Allwinner Tech Sunxi' and
>  the 'Texas Instruments OMAP35xx' plaftorms. So +libgles+ will be a virtual
>  package and +sunxi-mali+ and +ti-gfx+ will be the providers.
>  
> ++virtual-package+ tutorial
> +^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
>  In the following example, we will explain how to add a new virtual package
>  ('something-virtual') and a provider for it ('some-provider').
>  
> @@ -42,7 +45,7 @@ providers.
>  Virtual package's +*.mk+ file
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  
> -The Makefile +package/something-virtual/something-virtual.mk+ should contain:
> +The +.mk+ for the virtual package should just evaluate the +virtual-package+ macro:
>  
>  ---------------------------
>  01: ################################################################################
> @@ -51,20 +54,11 @@ The Makefile +package/something-virtual/something-virtual.mk+ should contain:
>  04: #
>  05: ################################################################################
>  06:
> -07: SOMETHING_VIRTUAL_SOURCE =
> -08: SOMETHING_VIRTUAL_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL))
> -09:
> -10: ifeq ($(BR2_PACKAGE_HAS_SOMETHING_VIRTUAL),y)
> -11: ifeq ($(SOMETHING_VIRTUAL_DEPENDENCIES),)
> -12: $(error No something-virtual implementation selected. Configuration error.)
> -13: endif
> -14: endif
> -15:
> -16: $(eval $(generic-package))
> +07: $(eval $(virtual-package))
>  ---------------------------
>  
> -The Makefile is quite small as it will only check if a provider for the
> -virtual package has been selected.
> +The ability to have target and host packages is also available, with the
> ++host-virtual-package+ macro.
>  
>  Provider's +Config.in+ file
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 


-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH 01/20] package/libgles: rename the _HAS and _PROVIDES variables
  2014-04-04 16:41   ` Arnout Vandecappelle
@ 2014-04-04 20:23     ` Yann E. MORIN
  0 siblings, 0 replies; 35+ messages in thread
From: Yann E. MORIN @ 2014-04-04 20:23 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2014-04-04 18:41 +0200, Arnout Vandecappelle spake thusly:
> On 10/03/14 21:27, Yann E. MORIN wrote:
> > From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > 
> > The basic rule for a package is to have its options named
> > after the package name. There is no reason this should not
> > also be the case for virtual packages.
> > 
> > Besides, this will allow us to switch libgles to use the
> > soon-to-be-introduced virtual-package infrastructure.
> > 
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> > Cc: Mike Zick <minimod@morethan.org>
> > Cc: Samuel Martin <s.martin49@gmail.com>
> > Reviewed-by: Samuel Martin <s.martin49@gmail.com>
> 
>  It no longer applies as is (well, it applies but it is not 
> correct anymore; it misses the new mesa3d and xbmc). Instead, 
> the change should be done with:
> 
> git grep -l 'BR2_PACKAGE_\(HAS\|PROVIDES\)_OPENGL_ES' | xargs sed -i 's/BR2_PACKAGE_\(HAS\|PROVIDES\)_OPENGL_ES/BR2_PACKAGE_\1_LIBGLES/g'

That's basically how I did generate those patches (IIRC).

I have anyway already rebased this on top of current master.
I was waiting for things to settle down a bit before I re-submitted
an updated series.

>  Other than that it gets my ack.

Thanks. :-)

>  Same for the next 4 patches: use the automated change 
> and it gets my ack.
> 
>  Please apply soonish to avoid further changes.

Hehe! :-)

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

* [Buildroot] [PATCH 08/20] packages: add infrastructure for virtual packages
  2014-04-04 20:10   ` Arnout Vandecappelle
@ 2014-04-05 14:41     ` Yann E. MORIN
  2014-04-06  9:01       ` Arnout Vandecappelle
  0 siblings, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2014-04-05 14:41 UTC (permalink / raw)
  To: buildroot

Arnout, all,

On 2014-04-04 22:10 +0200, Arnout Vandecappelle spake thusly:
> On 10/03/14 21:27, Yann E. MORIN wrote:
> > The virtual-package infrastructure allows to easily define a
> > virtual package in a single line:
[--SNIP--]
> > +# Note: putting this comment here rather than in the define block, otherwise
> > +# make would try to expand the $(error ...) in the comment, which is not
> > +# really what we want.
> 
>  That could be avoided by $$-quoting it inside the comment as well :-)

I've tried, but that's just ugly...

> > +# We need to use second-expansion for the $(error ...) call, below,
> > +# so it is not evaluated now, but as part of the generated make code.
> > +
> > +define inner-virtual-package
> > +
> > +# Ensure the virtual package has an implementation defined.
> > +ifeq ($(BR2_PACKAGE_HAS_$(2)),y)
> 
>  Even though it is not strictly necessary (it will anyway be eval'ed
> immediately after expansion), I think it's better to consistently use $$
> everywhere (except for $(1) etc. of course). Currently it's not done
> consistently in package-generic but it would be better to make it
> consistent here.

OK.

> > +ifeq ($(call qstrip,$(BR2_PACKAGE_PROVIDES_$(2))),)
> > +$$(error No implementation selected for virtual package $(1). Configuration error)
> 
>  I think "Configuration error" is a bit vague, but I can't think of
> anything better.

Well, that's mostly a developper's message. The message is here to ensure
the developper does not forget to set the _PROVIDES option.

When the configuration options are properly set, the user will never see
that error message.

> > +endif
> > +endif
> > +
> > +# A virtual package does not have any source associated
> > +$(2)_SOURCE =
> > +
> > +# This must be repeated from inner-generic-package, otherwise we get an empty
> > +# _DEPENDENCIES
> > +$(2)_DEPENDENCIES ?= $(filter-out host-toolchain $(1),\
> > +	$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
> > +
> > +# Add dependency against the provider
> > +$(2)_DEPENDENCIES += $(call qstrip,$(BR2_PACKAGE_PROVIDES_$(2)))
> > +
> > +# Call the generic package infrastructure to generate the necessary
> > +# make targets
> > +$(call inner-generic-package,$(1),$(2),$(3),$(4))
> 
>  I don't really see the need to call inner-generic-package here. Isn't it
> sufficient to do:
> 
> ifeq ($$(BR2_PACKAGE_HAS_$(2)),y)
> ifeq ($$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2))),)
> $$(error No implementation selected for virtual package $(1).
> Configuration error)
> endif
> endif
> 
> $(1): $$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2))
> 
>  We don't need all the rest of the package infrastructure, do we? We
> don't need to download any sources, we don't need legal info for the
> virtual package, etc. etc. There's also no need to create stamp files

I do not want o duplicate the logic in generic-package. For example:

  - with the now-possible parallel build, all packages must depend on
    'toolchain', which I'd have to add here;

  - clean-for-rebuild on a virtual package will eventually trigger a
    rebuild of all packages that depend on it (IIUC);

  - show-dpeends and graph-depends are interesting for virtual packages;

  - I can already think of a case where I'd need to run a post-install
    hook for a virtual package.

> > +
> > +endef
> > +
> > +################################################################################
> > +# virtual-package -- the target generator macro for virtual packages
> > +################################################################################
> > +
> > +virtual-package = $(call inner-virtual-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
> > +host-virtual-package = $(call inner-virtual-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host)
> 
>  Note that with the simplification above, you only need the first two
> arguments to the inner-virtual-package macro.

Maybe, but I would prefer we keep the same arguments when calling inner
functions, so all types of packages are handled the same. If we are to
add (or remove) an argument in the future, it will be much easier to do.

Plus the reasons expresed above.

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

* [Buildroot] [PATCH 08/20] packages: add infrastructure for virtual packages
  2014-04-05 14:41     ` Yann E. MORIN
@ 2014-04-06  9:01       ` Arnout Vandecappelle
  0 siblings, 0 replies; 35+ messages in thread
From: Arnout Vandecappelle @ 2014-04-06  9:01 UTC (permalink / raw)
  To: buildroot

On 05/04/14 16:41, Yann E. MORIN wrote:
> Arnout, all,
> 
> On 2014-04-04 22:10 +0200, Arnout Vandecappelle spake thusly:
>> On 10/03/14 21:27, Yann E. MORIN wrote:
>>> The virtual-package infrastructure allows to easily define a
>>> virtual package in a single line:
> [--SNIP--]
>>> +# Note: putting this comment here rather than in the define block, otherwise
>>> +# make would try to expand the $(error ...) in the comment, which is not
>>> +# really what we want.
>>
>>  That could be avoided by $$-quoting it inside the comment as well :-)
> 
> I've tried, but that's just ugly...

 Well, if $$ is used everywhere there is also no need for the comment :-)


> 
>>> +# We need to use second-expansion for the $(error ...) call, below,
>>> +# so it is not evaluated now, but as part of the generated make code.
>>> +
>>> +define inner-virtual-package
>>> +
>>> +# Ensure the virtual package has an implementation defined.
>>> +ifeq ($(BR2_PACKAGE_HAS_$(2)),y)
>>
>>  Even though it is not strictly necessary (it will anyway be eval'ed
>> immediately after expansion), I think it's better to consistently use $$
>> everywhere (except for $(1) etc. of course). Currently it's not done
>> consistently in package-generic but it would be better to make it
>> consistent here.
> 
> OK.
> 
>>> +ifeq ($(call qstrip,$(BR2_PACKAGE_PROVIDES_$(2))),)
>>> +$$(error No implementation selected for virtual package $(1). Configuration error)
>>
>>  I think "Configuration error" is a bit vague, but I can't think of
>> anything better.
> 
> Well, that's mostly a developper's message. The message is here to ensure
> the developper does not forget to set the _PROVIDES option.
> 
> When the configuration options are properly set, the user will never see
> that error message.
> 
>>> +endif
>>> +endif
>>> +
>>> +# A virtual package does not have any source associated
>>> +$(2)_SOURCE =
>>> +
>>> +# This must be repeated from inner-generic-package, otherwise we get an empty
>>> +# _DEPENDENCIES
>>> +$(2)_DEPENDENCIES ?= $(filter-out host-toolchain $(1),\
>>> +	$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
>>> +
>>> +# Add dependency against the provider
>>> +$(2)_DEPENDENCIES += $(call qstrip,$(BR2_PACKAGE_PROVIDES_$(2)))
>>> +
>>> +# Call the generic package infrastructure to generate the necessary
>>> +# make targets
>>> +$(call inner-generic-package,$(1),$(2),$(3),$(4))
>>
>>  I don't really see the need to call inner-generic-package here. Isn't it
>> sufficient to do:
>>
>> ifeq ($$(BR2_PACKAGE_HAS_$(2)),y)
>> ifeq ($$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2))),)
>> $$(error No implementation selected for virtual package $(1).
>> Configuration error)
>> endif
>> endif
>>
>> $(1): $$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2))
>>
>>  We don't need all the rest of the package infrastructure, do we? We
>> don't need to download any sources, we don't need legal info for the
>> virtual package, etc. etc. There's also no need to create stamp files
> 
> I do not want o duplicate the logic in generic-package. For example:
> 
>   - with the now-possible parallel build, all packages must depend on
>     'toolchain', which I'd have to add here;
> 
>   - clean-for-rebuild on a virtual package will eventually trigger a
>     rebuild of all packages that depend on it (IIUC);
> 
>   - show-dpeends and graph-depends are interesting for virtual packages;
> 
>   - I can already think of a case where I'd need to run a post-install
>     hook for a virtual package.

 OK, good points, thanks.


 Regards,
 Arnout

> 
>>> +
>>> +endef
>>> +
>>> +################################################################################
>>> +# virtual-package -- the target generator macro for virtual packages
>>> +################################################################################
>>> +
>>> +virtual-package = $(call inner-virtual-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
>>> +host-virtual-package = $(call inner-virtual-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host)
>>
>>  Note that with the simplification above, you only need the first two
>> arguments to the inner-virtual-package macro.
> 
> Maybe, but I would prefer we keep the same arguments when calling inner
> functions, so all types of packages are handled the same. If we are to
> add (or remove) an argument in the future, it will be much easier to do.
> 
> Plus the reasons expresed above.
> 
> Regards,
> Yann E. MORIN.
> 


-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

end of thread, other threads:[~2014-04-06  9:01 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-10 20:27 [Buildroot] [PATCH 0/20 v4] Add new virtual-package infrastructure (branch yem/virtual-packages) Yann E. MORIN
2014-03-10 20:27 ` [Buildroot] [PATCH 01/20] package/libgles: rename the _HAS and _PROVIDES variables Yann E. MORIN
2014-04-04 16:41   ` Arnout Vandecappelle
2014-04-04 20:23     ` Yann E. MORIN
2014-03-10 20:27 ` [Buildroot] [PATCH 02/20] package/libegl: " Yann E. MORIN
2014-03-10 20:27 ` [Buildroot] [PATCH 03/20] package/libopenmax: " Yann E. MORIN
2014-04-04 16:41   ` Arnout Vandecappelle
2014-03-10 20:27 ` [Buildroot] [PATCH 04/20] package/libopenvg: " Yann E. MORIN
2014-04-04 16:43   ` Arnout Vandecappelle
2014-03-10 20:27 ` [Buildroot] [PATCH 05/20] package/luainterpreter: " Yann E. MORIN
2014-03-10 20:27 ` [Buildroot] [PATCH 06/20] package/lua: rename config options Yann E. MORIN
2014-04-04 16:48   ` Arnout Vandecappelle
2014-03-10 20:27 ` [Buildroot] [PATCH 07/20] manual: add virtual package tutorial Yann E. MORIN
2014-04-04 16:54   ` Arnout Vandecappelle
2014-03-10 20:27 ` [Buildroot] [PATCH 08/20] packages: add infrastructure for virtual packages Yann E. MORIN
2014-04-04 20:10   ` Arnout Vandecappelle
2014-04-05 14:41     ` Yann E. MORIN
2014-04-06  9:01       ` Arnout Vandecappelle
2014-03-10 20:27 ` [Buildroot] [PATCH 09/20] manual: update the virtual package section with the new infrastructure Yann E. MORIN
2014-03-12 11:59   ` Eric Le Bihan
2014-04-04 20:18   ` Arnout Vandecappelle
2014-03-10 20:27 ` [Buildroot] [PATCH 10/20] package/powervr: convert to the virtual-package infrastructure Yann E. MORIN
2014-03-10 20:27 ` [Buildroot] [PATCH 11/20] package/libgles: " Yann E. MORIN
2014-03-12 12:15   ` Eric Le Bihan
2014-03-10 20:27 ` [Buildroot] [PATCH 12/20] package/libegl: " Yann E. MORIN
2014-03-12 12:18   ` Eric Le Bihan
2014-03-10 20:27 ` [Buildroot] [PATCH 13/20] package/libopenmax: " Yann E. MORIN
2014-03-10 20:27 ` [Buildroot] [PATCH 14/20] package/libopenvg: " Yann E. MORIN
2014-03-10 20:27 ` [Buildroot] [PATCH 15/20] package/luainterpreter: " Yann E. MORIN
2014-03-10 20:27 ` [Buildroot] [PATCH 16/20] package/jpeg: " Yann E. MORIN
2014-03-10 20:27 ` [Buildroot] [PATCH 17/20] package/cryptodev: " Yann E. MORIN
2014-03-10 20:27 ` [Buildroot] [PATCH 18/20] package/udev: " Yann E. MORIN
2014-03-12 12:20   ` Eric Le Bihan
2014-03-10 20:27 ` [Buildroot] [PATCH 19/20] virtual-package: fake a version string for virtual packages Yann E. MORIN
2014-03-10 20:27 ` [Buildroot] [PATCH 20/20] FOO: tentative target and host virt packages Yann E. MORIN

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