All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/3] New packages libglfw/cal3d/vsxu
@ 2015-11-07 16:50 Bernd Kuhls
  2015-11-07 16:50 ` [Buildroot] [PATCH v2 1/3] package/libglfw: new package Bernd Kuhls
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Bernd Kuhls @ 2015-11-07 16:50 UTC (permalink / raw)
  To: buildroot

these package will be needed by the upcoming
kodi-visualisation-vsxu package, part of the Kodi 16.0-Jarvis bump:

https://github.com/notspiff/visualization.vsxu/blob/master/CMakeLists.txt#L8

Regards, Bernd

Bernd Kuhls (3):
  package/libglfw: new package
  package/cal3d: new package
  package/vsxu: new package

 package/Config.in                         |  3 +++
 package/cal3d/Config.in                   |  6 +++++
 package/cal3d/cal3d.mk                    | 10 ++++++++
 package/libglfw/Config.in                 | 16 ++++++++++++
 package/libglfw/libglfw.hash              |  2 ++
 package/libglfw/libglfw.mk                | 28 +++++++++++++++++++++
 package/vsxu/0001-disable-backtrace.patch | 35 ++++++++++++++++++++++++++
 package/vsxu/0002-fix-includes.patch      | 41 +++++++++++++++++++++++++++++++
 package/vsxu/Config.in                    | 20 +++++++++++++++
 package/vsxu/vsxu.mk                      | 31 +++++++++++++++++++++++
 10 files changed, 192 insertions(+)
 create mode 100644 package/cal3d/Config.in
 create mode 100644 package/cal3d/cal3d.mk
 create mode 100644 package/libglfw/Config.in
 create mode 100644 package/libglfw/libglfw.hash
 create mode 100644 package/libglfw/libglfw.mk
 create mode 100644 package/vsxu/0001-disable-backtrace.patch
 create mode 100644 package/vsxu/0002-fix-includes.patch
 create mode 100644 package/vsxu/Config.in
 create mode 100644 package/vsxu/vsxu.mk

-- 
2.6.2

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

* [Buildroot] [PATCH v2 1/3] package/libglfw: new package
  2015-11-07 16:50 [Buildroot] [PATCH v2 0/3] New packages libglfw/cal3d/vsxu Bernd Kuhls
@ 2015-11-07 16:50 ` Bernd Kuhls
  2015-12-19 13:59   ` Thomas Petazzoni
  2015-11-07 16:50 ` [Buildroot] [PATCH v2 2/3] package/cal3d: " Bernd Kuhls
  2015-11-07 16:50 ` [Buildroot] [PATCH v2 3/3] package/vsxu: " Bernd Kuhls
  2 siblings, 1 reply; 14+ messages in thread
From: Bernd Kuhls @ 2015-11-07 16:50 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: fixed typos: glew => glfw
    added _CONF_OPTS to disable building examples/tests/docs
    added optional dependencies to xlib_libXi & xlib_libXxf86vm

 package/Config.in            |  1 +
 package/libglfw/Config.in    | 16 ++++++++++++++++
 package/libglfw/libglfw.hash |  2 ++
 package/libglfw/libglfw.mk   | 28 ++++++++++++++++++++++++++++
 4 files changed, 47 insertions(+)
 create mode 100644 package/libglfw/Config.in
 create mode 100644 package/libglfw/libglfw.hash
 create mode 100644 package/libglfw/libglfw.mk

diff --git a/package/Config.in b/package/Config.in
index a6d1f38..d278e64 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -827,6 +827,7 @@ menu "Graphics"
 	source "package/libgeotiff/Config.in"
 	source "package/libglade/Config.in"
 	source "package/libglew/Config.in"
+	source "package/libglfw/Config.in"
 	source "package/libglu/Config.in"
 	source "package/libgtk2/Config.in"
 	source "package/libgtk3/Config.in"
diff --git a/package/libglfw/Config.in b/package/libglfw/Config.in
new file mode 100644
index 0000000..045bd26
--- /dev/null
+++ b/package/libglfw/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_LIBGLFW
+	bool "libglfw"
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_XLIB_LIBXCURSOR
+	select BR2_PACKAGE_XLIB_LIBXEXT
+	select BR2_PACKAGE_XLIB_LIBXINERAMA
+	select BR2_PACKAGE_XLIB_LIBXRANDR
+	help
+	  GLFW is an Open Source, multi-platform library for creating
+	  windows with OpenGL contexts and receiving input and events.
+
+	  http://www.glfw.org
+
+comment "libglfw depends on X.org and needs an OpenGL backend"
+	depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_HAS_LIBGL
diff --git a/package/libglfw/libglfw.hash b/package/libglfw/libglfw.hash
new file mode 100644
index 0000000..3226aad
--- /dev/null
+++ b/package/libglfw/libglfw.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256	6ac642087682aaf7f8397761a41a99042b2c656498217a1c63ba9706d1eef122	libglfw-3.1.2.tar.gz
diff --git a/package/libglfw/libglfw.mk b/package/libglfw/libglfw.mk
new file mode 100644
index 0000000..0b1730d
--- /dev/null
+++ b/package/libglfw/libglfw.mk
@@ -0,0 +1,28 @@
+################################################################################
+#
+# libglfw
+#
+################################################################################
+
+LIBGLFW_VERSION = 3.1.2
+LIBGLFW_SITE = $(call github,glfw,glfw,$(LIBGLFW_VERSION))
+LIBGLFW_INSTALL_STAGING = YES
+LIBGLFW_DEPENDENCIES = libgl xlib_libXcursor xlib_libXext \
+	xlib_libXinerama xlib_libXrandr
+LIBGLFW_LICENSE = zlib
+LIBGLFW_LICENSE_FILES = COPYING.txt
+
+LIBGLFW_CONF_OPTS += \
+	-DGLFW_BUILD_EXAMPLES=OFF \
+	-DGLFW_BUILD_TESTS=OFF \
+	-DGLFW_BUILD_DOCS=OFF
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y)
+LIBGLFW_DEPENDENCIES += xlib_libXi
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
+LIBGLFW_DEPENDENCIES += xlib_libXxf86vm
+endif
+
+$(eval $(cmake-package))
-- 
2.6.2

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

* [Buildroot] [PATCH v2 2/3] package/cal3d: new package
  2015-11-07 16:50 [Buildroot] [PATCH v2 0/3] New packages libglfw/cal3d/vsxu Bernd Kuhls
  2015-11-07 16:50 ` [Buildroot] [PATCH v2 1/3] package/libglfw: new package Bernd Kuhls
@ 2015-11-07 16:50 ` Bernd Kuhls
  2015-12-19 14:00   ` Thomas Petazzoni
  2015-12-19 14:39   ` Arnout Vandecappelle
  2015-11-07 16:50 ` [Buildroot] [PATCH v2 3/3] package/vsxu: " Bernd Kuhls
  2 siblings, 2 replies; 14+ messages in thread
From: Bernd Kuhls @ 2015-11-07 16:50 UTC (permalink / raw)
  To: buildroot

This package only provides a git submodule for the vsxu package.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: no changes

 package/Config.in       |  1 +
 package/cal3d/Config.in |  6 ++++++
 package/cal3d/cal3d.mk  | 10 ++++++++++
 3 files changed, 17 insertions(+)
 create mode 100644 package/cal3d/Config.in
 create mode 100644 package/cal3d/cal3d.mk

diff --git a/package/Config.in b/package/Config.in
index d278e64..eb601e8 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -227,6 +227,7 @@ comment "Graphic applications"
 	source "package/rrdtool/Config.in"
 
 comment "Graphic libraries"
+	source "package/cal3d/Config.in"
 	source "package/cegui06/Config.in"
 	source "package/directfb/Config.in"
 	source "package/directfb-examples/Config.in"
diff --git a/package/cal3d/Config.in b/package/cal3d/Config.in
new file mode 100644
index 0000000..231d905
--- /dev/null
+++ b/package/cal3d/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_CAL3D
+	help
+	  Cal3D is a skeletal based character animation library.
+	  This package provides a git submodule for the vsxu package.
+
+	  https://github.com/vovoid/cal3d
diff --git a/package/cal3d/cal3d.mk b/package/cal3d/cal3d.mk
new file mode 100644
index 0000000..0a7813f
--- /dev/null
+++ b/package/cal3d/cal3d.mk
@@ -0,0 +1,10 @@
+################################################################################
+#
+# cal3d
+#
+################################################################################
+
+CAL3D_VERSION = 0f640189eec913973c64db3bc1c1685554cb7202
+CAL3D_SITE = $(call github,vovoid,cal3d,$(CAL3D_VERSION))
+
+$(eval $(generic-package))
-- 
2.6.2

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

* [Buildroot] [PATCH v2 3/3] package/vsxu: new package
  2015-11-07 16:50 [Buildroot] [PATCH v2 0/3] New packages libglfw/cal3d/vsxu Bernd Kuhls
  2015-11-07 16:50 ` [Buildroot] [PATCH v2 1/3] package/libglfw: new package Bernd Kuhls
  2015-11-07 16:50 ` [Buildroot] [PATCH v2 2/3] package/cal3d: " Bernd Kuhls
@ 2015-11-07 16:50 ` Bernd Kuhls
  2015-12-19 14:43   ` Arnout Vandecappelle
  2015-12-19 15:14   ` Thomas Petazzoni
  2 siblings, 2 replies; 14+ messages in thread
From: Bernd Kuhls @ 2015-11-07 16:50 UTC (permalink / raw)
  To: buildroot

This package needs cal3d source code which is included upstream as a git
submodule, something not supported by the git download helper.
To include cal3d I used a method described by Arnout:
http://lists.busybox.net/pipermail/buildroot/2013-March/069971.html

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: added patch to make BR2_COMPILER_PARANOID_UNSAFE_PATH=y happy

 package/Config.in                         |  1 +
 package/vsxu/0001-disable-backtrace.patch | 35 ++++++++++++++++++++++++++
 package/vsxu/0002-fix-includes.patch      | 41 +++++++++++++++++++++++++++++++
 package/vsxu/Config.in                    | 20 +++++++++++++++
 package/vsxu/vsxu.mk                      | 31 +++++++++++++++++++++++
 5 files changed, 128 insertions(+)
 create mode 100644 package/vsxu/0001-disable-backtrace.patch
 create mode 100644 package/vsxu/0002-fix-includes.patch
 create mode 100644 package/vsxu/Config.in
 create mode 100644 package/vsxu/vsxu.mk

diff --git a/package/Config.in b/package/Config.in
index eb601e8..6080e15 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -225,6 +225,7 @@ comment "Graphic applications"
 	source "package/mesa3d-demos/Config.in"
 	source "package/qt5cinex/Config.in"
 	source "package/rrdtool/Config.in"
+	source "package/vsxu/Config.in"
 
 comment "Graphic libraries"
 	source "package/cal3d/Config.in"
diff --git a/package/vsxu/0001-disable-backtrace.patch b/package/vsxu/0001-disable-backtrace.patch
new file mode 100644
index 0000000..1c5e2a4
--- /dev/null
+++ b/package/vsxu/0001-disable-backtrace.patch
@@ -0,0 +1,35 @@
+uClibc has no support for execinfo.h/backtrace
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+--- a/engine/include/debug/vsx_backtrace.h	2015-05-23 13:21:46.000000000 +0200
++++ b/engine/include/debug/vsx_backtrace.h	2015-11-05 20:46:48.000000000 +0100
+@@ -7,7 +7,7 @@
+ 
+ #include <stdio.h>
+ #include <errno.h>
+-#include <execinfo.h>
++//#include <execinfo.h>
+ #include <unistd.h>
+ #include <string.h>
+ #include <malloc.h>
+@@ -18,7 +18,8 @@
+ 
+ inline void full_write(int fd, const char *buf, size_t len)
+ {
+-#if !(PLATFORM_FAMILY == PLATFORM_FAMILY_WINDOWS)
++#if 0
++//#if !(PLATFORM_FAMILY == PLATFORM_FAMILY_WINDOWS)
+   while (len > 0) {
+   ssize_t ret = write(fd, buf, len);
+ 
+@@ -34,7 +35,8 @@
+ 
+ inline void print_backtrace(void)
+ {
+-#if !(PLATFORM_FAMILY == PLATFORM_FAMILY_WINDOWS)
++#if 0
++//#if !(PLATFORM_FAMILY == PLATFORM_FAMILY_WINDOWS)
+   static const char start[] = "BACKTRACE ------------\n";
+   static const char end[] = "----------------------\n";
+ 
diff --git a/package/vsxu/0002-fix-includes.patch b/package/vsxu/0002-fix-includes.patch
new file mode 100644
index 0000000..5d94496
--- /dev/null
+++ b/package/vsxu/0002-fix-includes.patch
@@ -0,0 +1,41 @@
+Do not use host paths when cross-compiling.
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+diff -uNr vsxu-4a34b08ec9e51605ca55d1a833f23e9601b2aa88.org/plugins/src/render.text/CMakeLists.txt vsxu-4a34b08ec9e51605ca55d1a833f23e9601b2aa88/plugins/src/render.text/CMakeLists.txt
+--- vsxu-4a34b08ec9e51605ca55d1a833f23e9601b2aa88.org/plugins/src/render.text/CMakeLists.txt	2015-05-23 13:21:46.000000000 +0200
++++ vsxu-4a34b08ec9e51605ca55d1a833f23e9601b2aa88/plugins/src/render.text/CMakeLists.txt	2015-11-07 17:42:53.277922806 +0100
+@@ -8,6 +8,8 @@
+ 
+ message("configuring vsxu module            " ${module_id})
+ 
++find_package(Freetype REQUIRED)
++
+ # set defines for MOD_CM, MOD_DM, MOD_NM
+ CREATE_STATIC_GLUE(${module_id})
+ 
+@@ -21,7 +23,7 @@
+ endif(WIN32)
+ 
+ if(UNIX)
+-  include_directories(/usr/include/freetype2)
++  include_directories(${FREETYPE_INCLUDE_DIRS})
+ endif(UNIX)
+ 
+ # include common
+diff -uNr vsxu-4a34b08ec9e51605ca55d1a833f23e9601b2aa88.org/plugins/src/texture/CMakeLists.txt vsxu-4a34b08ec9e51605ca55d1a833f23e9601b2aa88/plugins/src/texture/CMakeLists.txt
+--- vsxu-4a34b08ec9e51605ca55d1a833f23e9601b2aa88.org/plugins/src/texture/CMakeLists.txt	2015-05-23 13:21:46.000000000 +0200
++++ vsxu-4a34b08ec9e51605ca55d1a833f23e9601b2aa88/plugins/src/texture/CMakeLists.txt	2015-11-07 17:41:33.000000000 +0100
+@@ -8,7 +8,11 @@
+ 
+ message("configuring vsxu module            " ${module_id})
+ 
+-include_directories(/usr/include/OpenEXR)
++find_package(OpenEXR)
++
++if(OpenEXR_FOUND)
++  include_directories(${OPENEXR_INCLUDE_DIRS})
++endif(OpenEXR_FOUND)
+ 
+ # set defines for MOD_CM, MOD_DM, MOD_NM
+ CREATE_STATIC_GLUE(${module_id})
diff --git a/package/vsxu/Config.in b/package/vsxu/Config.in
new file mode 100644
index 0000000..8639c0c
--- /dev/null
+++ b/package/vsxu/Config.in
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_VSXU
+	bool "vsxu"
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_FREETYPE
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_LIBGLEW
+	select BR2_PACKAGE_LIBGLFW
+	select BR2_PACKAGE_LIBGLU
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_ZLIB
+	help
+	  VSXu (VSX Ultra) is an OpenGL-based (hardware-accelerated),
+	  modular programming environment with its main purpose to
+	  visualize music and create real time graphic effects.
+
+	  http://www.vsxu.com
+
+comment "vsxu depends on X.org and needs an OpenGL backend"
+	depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_HAS_LIBGL
diff --git a/package/vsxu/vsxu.mk b/package/vsxu/vsxu.mk
new file mode 100644
index 0000000..7dcbf74
--- /dev/null
+++ b/package/vsxu/vsxu.mk
@@ -0,0 +1,31 @@
+################################################################################
+#
+# vsxu
+#
+################################################################################
+
+# instead of using master branch we use branch glfw3
+VSXU_VERSION = 4a34b08ec9e51605ca55d1a833f23e9601b2aa88
+VSXU_SITE = $(call github,vovoid,vsxu,$(VSXU_VERSION))
+VSXU_LICENSE = GPLv3
+VSXU_LICENSE_FILES = COPYING
+VSXU_INSTALL_STAGING = YES
+VSXU_DEPENDENCIES = cal3d freetype jpeg libgl libglew libglfw libglu \
+	libpng zlib
+
+# cal3d is a git submodule
+define VSXU_LINK_CAL3D
+	rm -rf $(@D)/plugins/src/mesh.importers/cal3d/
+	ln -sf $(CAL3D_DIR) $(@D)/plugins/src/mesh.importers/cal3d
+endef
+VSXU_POST_EXTRACT_HOOKS += VSXU_LINK_CAL3D
+
+ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
+VSXU_DEPENDENCIES += alsa-lib
+endif
+
+ifeq ($(BR2_PACKAGE_OPENCV),y)
+VSXU_DEPENDENCIES += opencv
+endif
+
+$(eval $(cmake-package))
-- 
2.6.2

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

* [Buildroot] [PATCH v2 1/3] package/libglfw: new package
  2015-11-07 16:50 ` [Buildroot] [PATCH v2 1/3] package/libglfw: new package Bernd Kuhls
@ 2015-12-19 13:59   ` Thomas Petazzoni
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2015-12-19 13:59 UTC (permalink / raw)
  To: buildroot

Dear Bernd Kuhls,

On Sat,  7 Nov 2015 17:50:51 +0100, Bernd Kuhls wrote:
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v2: fixed typos: glew => glfw
>     added _CONF_OPTS to disable building examples/tests/docs
>     added optional dependencies to xlib_libXi & xlib_libXxf86vm

Applied, thanks.

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

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

* [Buildroot] [PATCH v2 2/3] package/cal3d: new package
  2015-11-07 16:50 ` [Buildroot] [PATCH v2 2/3] package/cal3d: " Bernd Kuhls
@ 2015-12-19 14:00   ` Thomas Petazzoni
  2015-12-19 14:25     ` Yann E. MORIN
  2015-12-19 14:35     ` Arnout Vandecappelle
  2015-12-19 14:39   ` Arnout Vandecappelle
  1 sibling, 2 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2015-12-19 14:00 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 Nov 2015 17:50:52 +0100, Bernd Kuhls wrote:
> This package only provides a git submodule for the vsxu package.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

I don't really like the interaction between this package and the vsxu
package, but I don't really have a better proposal to be honest.

Yann, Peter, Arnout, do you have some suggestions on how to handle such
git submodule cases?

Thanks,

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

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

* [Buildroot] [PATCH v2 2/3] package/cal3d: new package
  2015-12-19 14:00   ` Thomas Petazzoni
@ 2015-12-19 14:25     ` Yann E. MORIN
  2015-12-19 14:35       ` Thomas Petazzoni
                         ` (2 more replies)
  2015-12-19 14:35     ` Arnout Vandecappelle
  1 sibling, 3 replies; 14+ messages in thread
From: Yann E. MORIN @ 2015-12-19 14:25 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2015-12-19 15:00 +0100, Thomas Petazzoni spake thusly:
> On Sat,  7 Nov 2015 17:50:52 +0100, Bernd Kuhls wrote:
> > This package only provides a git submodule for the vsxu package.
> > 
> > Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> 
> I don't really like the interaction between this package and the vsxu
> package, but I don't really have a better proposal to be honest.
> 
> Yann, Peter, Arnout, do you have some suggestions on how to handle such
> git submodule cases?

I really don't know what to do with git-submodules.

But in this precise case, I would:
  - dump the cal3d package
  - add a post-download hook (or an extra-download URL) to vsxu to also
    download cal3d
  - add a post-extract hook to vsxu to also extract cal3d in the correct
    location.

Then, when/if cal3d is later used by other packages, we can revisit the
situation.

Otherwise, for proper git-submodule handling, we would have to do
(roughly):

    git clone blabla pkg-version
    cd pkg-version
    git checkout pkg-version
    git submodule update --init --recursive
    find . -name .git -exec rm -rf {} +
    cd ..
    tar czf DL_DIR/pkg-version.tar.gz pkg-version/

This is not very complex, but is stil la significant change from our
current git wrapper.

And then, what about svn externals? About Hg subrepos? Does bzr also
have such a thing?

Note that I would not really mind doing such a change. But is it worth
it, given that we currently have only one package that needs submodules?
Or do we have others for which we had to "deal with it" in a crude way?

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

* [Buildroot] [PATCH v2 2/3] package/cal3d: new package
  2015-12-19 14:25     ` Yann E. MORIN
@ 2015-12-19 14:35       ` Thomas Petazzoni
  2015-12-19 14:47       ` Arnout Vandecappelle
  2015-12-20 21:52       ` Peter Korsgaard
  2 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2015-12-19 14:35 UTC (permalink / raw)
  To: buildroot

Yann,

On Sat, 19 Dec 2015 15:25:09 +0100, Yann E. MORIN wrote:

> But in this precise case, I would:
>   - dump the cal3d package
>   - add a post-download hook (or an extra-download URL) to vsxu to also
>     download cal3d

A post-download hook wouldn't play well with "make source", "make
legal-info" and all. We have to take this into account. But an
EXTRA_DOWNLOADS should work fine.

>   - add a post-extract hook to vsxu to also extract cal3d in the correct
>     location.

Could be a solution, I'll try this.

> Otherwise, for proper git-submodule handling, we would have to do
> (roughly):
> 
>     git clone blabla pkg-version
>     cd pkg-version
>     git checkout pkg-version
>     git submodule update --init --recursive
>     find . -name .git -exec rm -rf {} +
>     cd ..
>     tar czf DL_DIR/pkg-version.tar.gz pkg-version/
> 
> This is not very complex, but is stil la significant change from our
> current git wrapper.
> 
> And then, what about svn externals? About Hg subrepos? Does bzr also
> have such a thing?
> 
> Note that I would not really mind doing such a change. But is it worth
> it, given that we currently have only one package that needs submodules?
> Or do we have others for which we had to "deal with it" in a crude way?

I don't want to go down this route for the moment, I'd prefer to see
how many of these git submodule users we have.

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

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

* [Buildroot] [PATCH v2 2/3] package/cal3d: new package
  2015-12-19 14:00   ` Thomas Petazzoni
  2015-12-19 14:25     ` Yann E. MORIN
@ 2015-12-19 14:35     ` Arnout Vandecappelle
  1 sibling, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2015-12-19 14:35 UTC (permalink / raw)
  To: buildroot

On 19-12-15 15:00, Thomas Petazzoni wrote:
> Hello,
> 
> On Sat,  7 Nov 2015 17:50:52 +0100, Bernd Kuhls wrote:
>> This package only provides a git submodule for the vsxu package.
>>
>> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> 
> I don't really like the interaction between this package and the vsxu
> package, but I don't really have a better proposal to be honest.
> 
> Yann, Peter, Arnout, do you have some suggestions on how to handle such
> git submodule cases?

 Good that Bernd put that reference to my mail of two years ago [1]. When I read
that again I first thought that I would retract my statements from back then,
but in fact it still makes sense.

 There are basically two ways that we can consider such packages.

 The first way is to say it is a bundled package, in other words we download and
extract the submodule as part of the master. We have a precendent for this:
perl-cross (though there it's a bit the other way round, the principle is the
same). I described this approach as the first option for [1].

 The second way is to say that it is a separate package and we basically
unbundle it. Since the package itself doesn't support that, we have to do some
hacks to make it work, just like any distro has to make hacks to unbundle stuff.

 The second way is hackish because:
- we're instantiating the submodule in a different way than the package expects
it (as a symlink rather as a subtree);
- we're referring to the source of one package from another package.

 This last bit, however, is something we do all the time with LINUX_DIR, so
maybe it's not that much of a hack after all.

 The second way tends to be a bit less verbose too, because we can use a lot of
infrastructure that just doesn't exist to support the sub-package approach. But
it's not as bad anymore as when I wrote [1], because now we can use
_EXTRA_DOWNLOADS at least, so we just need to add a post-extract hook. So the
difference is just 2-3 lines.

 I have a slight preference for the first approach, but I would be fine with the
second approach (which Bernd chose here) as well. Though I do have a few
comments on that, which I'll state in the patch itself.

 Regards,
 Arnout


[1] http://lists.busybox.net/pipermail/buildroot/2013-March/069971.html


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

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

* [Buildroot] [PATCH v2 2/3] package/cal3d: new package
  2015-11-07 16:50 ` [Buildroot] [PATCH v2 2/3] package/cal3d: " Bernd Kuhls
  2015-12-19 14:00   ` Thomas Petazzoni
@ 2015-12-19 14:39   ` Arnout Vandecappelle
  1 sibling, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2015-12-19 14:39 UTC (permalink / raw)
  To: buildroot

On 07-11-15 17:50, Bernd Kuhls wrote:
> This package only provides a git submodule for the vsxu package.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v2: no changes
> 
>  package/Config.in       |  1 +
>  package/cal3d/Config.in |  6 ++++++
>  package/cal3d/cal3d.mk  | 10 ++++++++++
>  3 files changed, 17 insertions(+)
>  create mode 100644 package/cal3d/Config.in
>  create mode 100644 package/cal3d/cal3d.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index d278e64..eb601e8 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -227,6 +227,7 @@ comment "Graphic applications"
>  	source "package/rrdtool/Config.in"
>  
>  comment "Graphic libraries"
> +	source "package/cal3d/Config.in"
>  	source "package/cegui06/Config.in"
>  	source "package/directfb/Config.in"
>  	source "package/directfb-examples/Config.in"
> diff --git a/package/cal3d/Config.in b/package/cal3d/Config.in
> new file mode 100644
> index 0000000..231d905
> --- /dev/null
> +++ b/package/cal3d/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_CAL3D
> +	help
> +	  Cal3D is a skeletal based character animation library.
> +	  This package provides a git submodule for the vsxu package.
> +
> +	  https://github.com/vovoid/cal3d

 If you take this approach (which, given Yann's and Thomas's feedback, you
probably won't), then I don't think you should add a Config.in file. It makes no
sense at all for the user to be able to select this package, because it doesn't
install anything in staging or target so it cannot be used.

 Regards,
 Arnout

> diff --git a/package/cal3d/cal3d.mk b/package/cal3d/cal3d.mk
> new file mode 100644
> index 0000000..0a7813f
> --- /dev/null
> +++ b/package/cal3d/cal3d.mk
> @@ -0,0 +1,10 @@
> +################################################################################
> +#
> +# cal3d
> +#
> +################################################################################
> +
> +CAL3D_VERSION = 0f640189eec913973c64db3bc1c1685554cb7202
> +CAL3D_SITE = $(call github,vovoid,cal3d,$(CAL3D_VERSION))
> +
> +$(eval $(generic-package))
> 


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

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

* [Buildroot] [PATCH v2 3/3] package/vsxu: new package
  2015-11-07 16:50 ` [Buildroot] [PATCH v2 3/3] package/vsxu: " Bernd Kuhls
@ 2015-12-19 14:43   ` Arnout Vandecappelle
  2015-12-19 15:14   ` Thomas Petazzoni
  1 sibling, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2015-12-19 14:43 UTC (permalink / raw)
  To: buildroot

On 07-11-15 17:50, Bernd Kuhls wrote:
> This package needs cal3d source code which is included upstream as a git
> submodule, something not supported by the git download helper.
> To include cal3d I used a method described by Arnout:
> http://lists.busybox.net/pipermail/buildroot/2013-March/069971.html
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[snip]
> diff --git a/package/vsxu/Config.in b/package/vsxu/Config.in
> new file mode 100644
> index 0000000..8639c0c
> --- /dev/null
> +++ b/package/vsxu/Config.in
> @@ -0,0 +1,20 @@
> +config BR2_PACKAGE_VSXU
> +	bool "vsxu"
> +	depends on BR2_PACKAGE_XORG7
> +	depends on BR2_PACKAGE_HAS_LIBGL

 Since you've added BR2_PACKAGE_CAL3D, you have to select it here. But as I
wrote, the symbol probably shouldn't even be defined.


 Regards,
 Arnout

> +	select BR2_PACKAGE_FREETYPE
> +	select BR2_PACKAGE_JPEG
> +	select BR2_PACKAGE_LIBGLEW
> +	select BR2_PACKAGE_LIBGLFW
> +	select BR2_PACKAGE_LIBGLU
> +	select BR2_PACKAGE_LIBPNG
> +	select BR2_PACKAGE_ZLIB
> +	help
> +	  VSXu (VSX Ultra) is an OpenGL-based (hardware-accelerated),
> +	  modular programming environment with its main purpose to
> +	  visualize music and create real time graphic effects.
> +
> +	  http://www.vsxu.com
> +
> +comment "vsxu depends on X.org and needs an OpenGL backend"
> +	depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_HAS_LIBGL
> diff --git a/package/vsxu/vsxu.mk b/package/vsxu/vsxu.mk
> new file mode 100644
> index 0000000..7dcbf74
> --- /dev/null
> +++ b/package/vsxu/vsxu.mk
> @@ -0,0 +1,31 @@
> +################################################################################
> +#
> +# vsxu
> +#
> +################################################################################
> +
> +# instead of using master branch we use branch glfw3
> +VSXU_VERSION = 4a34b08ec9e51605ca55d1a833f23e9601b2aa88
> +VSXU_SITE = $(call github,vovoid,vsxu,$(VSXU_VERSION))
> +VSXU_LICENSE = GPLv3
> +VSXU_LICENSE_FILES = COPYING
> +VSXU_INSTALL_STAGING = YES
> +VSXU_DEPENDENCIES = cal3d freetype jpeg libgl libglew libglfw libglu \
> +	libpng zlib
> +
> +# cal3d is a git submodule
> +define VSXU_LINK_CAL3D
> +	rm -rf $(@D)/plugins/src/mesh.importers/cal3d/
> +	ln -sf $(CAL3D_DIR) $(@D)/plugins/src/mesh.importers/cal3d
> +endef
> +VSXU_POST_EXTRACT_HOOKS += VSXU_LINK_CAL3D
> +
> +ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
> +VSXU_DEPENDENCIES += alsa-lib
> +endif
> +
> +ifeq ($(BR2_PACKAGE_OPENCV),y)
> +VSXU_DEPENDENCIES += opencv
> +endif
> +
> +$(eval $(cmake-package))
> 


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

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

* [Buildroot] [PATCH v2 2/3] package/cal3d: new package
  2015-12-19 14:25     ` Yann E. MORIN
  2015-12-19 14:35       ` Thomas Petazzoni
@ 2015-12-19 14:47       ` Arnout Vandecappelle
  2015-12-20 21:52       ` Peter Korsgaard
  2 siblings, 0 replies; 14+ messages in thread
From: Arnout Vandecappelle @ 2015-12-19 14:47 UTC (permalink / raw)
  To: buildroot

On 19-12-15 15:25, Yann E. MORIN wrote:
> Thomas, All,
> 
> On 2015-12-19 15:00 +0100, Thomas Petazzoni spake thusly:
>> On Sat,  7 Nov 2015 17:50:52 +0100, Bernd Kuhls wrote:
>>> This package only provides a git submodule for the vsxu package.
>>>
>>> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
>>
>> I don't really like the interaction between this package and the vsxu
>> package, but I don't really have a better proposal to be honest.
>>
>> Yann, Peter, Arnout, do you have some suggestions on how to handle such
>> git submodule cases?
[snip]
> Otherwise, for proper git-submodule handling, we would have to do
> (roughly):
> 
>     git clone blabla pkg-version
>     cd pkg-version
>     git checkout pkg-version
>     git submodule update --init --recursive
>     find . -name .git -exec rm -rf {} +
>     cd ..
>     tar czf DL_DIR/pkg-version.tar.gz pkg-version/

 Err, anything wrong with just adding --recursive to the clone command? Or is
that a recent addition? Oh, but git archive still wouldn't add it of course.

 But anyway, in this particular case we're using a github tarball download so it
wouldn't help. Unless it would switch to git download instead.

> 
> This is not very complex, but is stil la significant change from our
> current git wrapper.
> 
> And then, what about svn externals? About Hg subrepos? Does bzr also
> have such a thing?
> 
> Note that I would not really mind doing such a change. But is it worth
> it, given that we currently have only one package that needs submodules?
> Or do we have others for which we had to "deal with it" in a crude way?

 I'm pretty sure there aren't any other packages that need it.

 Regards,
 Arnout

> 
> 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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH v2 3/3] package/vsxu: new package
  2015-11-07 16:50 ` [Buildroot] [PATCH v2 3/3] package/vsxu: " Bernd Kuhls
  2015-12-19 14:43   ` Arnout Vandecappelle
@ 2015-12-19 15:14   ` Thomas Petazzoni
  1 sibling, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2015-12-19 15:14 UTC (permalink / raw)
  To: buildroot

Dear Bernd Kuhls,

On Sat,  7 Nov 2015 17:50:53 +0100, Bernd Kuhls wrote:
> This package needs cal3d source code which is included upstream as a git
> submodule, something not supported by the git download helper.
> To include cal3d I used a method described by Arnout:
> http://lists.busybox.net/pipermail/buildroot/2013-March/069971.html
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

Here is what I've done to remove the submodule issue:

diff --git a/package/vsxu/vsxu.mk b/package/vsxu/vsxu.mk
index 7dcbf74..9553f81 100644
--- a/package/vsxu/vsxu.mk
+++ b/package/vsxu/vsxu.mk
@@ -7,18 +7,22 @@
 # instead of using master branch we use branch glfw3
 VSXU_VERSION = 4a34b08ec9e51605ca55d1a833f23e9601b2aa88
 VSXU_SITE = $(call github,vovoid,vsxu,$(VSXU_VERSION))
+VSXU_CAL3D_VERSION = 0f640189eec913973c64db3bc1c1685554cb7202
+VSXU_CAL3D_SOURCE = cal3d-$(VSXU_CAL3D_VERSION).tar.gz
+VSXU_EXTRA_DOWNLOADS = $(call github,vovoid,cal3d,$(VSXU_CAL3D_VERSION))/$(VSXU_CAL3D_SOURCE)
 VSXU_LICENSE = GPLv3
 VSXU_LICENSE_FILES = COPYING
 VSXU_INSTALL_STAGING = YES
-VSXU_DEPENDENCIES = cal3d freetype jpeg libgl libglew libglfw libglu \
+VSXU_DEPENDENCIES = freetype jpeg libgl libglew libglfw libglu \
        libpng zlib
 
 # cal3d is a git submodule
-define VSXU_LINK_CAL3D
-       rm -rf $(@D)/plugins/src/mesh.importers/cal3d/
-       ln -sf $(CAL3D_DIR) $(@D)/plugins/src/mesh.importers/cal3d
+define VSXU_EXTRACT_CAL3D
+       mkdir -p $(@D)/plugins/src/mesh.importers/cal3d
+        $(call suitable-extractor,$(VSXU_CAL3D_SOURCE)) $(DL_DIR)/$(VSXU_CAL3D_SOURCE) | \
+        $(TAR) --strip-components=1 -C $(@D)/plugins/src/mesh.importers/cal3d $(TAR_OPTIONS) -
 endef
-VSXU_POST_EXTRACT_HOOKS += VSXU_LINK_CAL3D
+VSXU_POST_EXTRACT_HOOKS += VSXU_EXTRACT_CAL3D
 
 ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
 VSXU_DEPENDENCIES += alsa-lib

However, it fails to build on ARM because CMakeLists.txt hardcodes
-mtune=nocona:

[  2%] Building CXX object engine/CMakeFiles/vsxu_engine.dir/src/vsxfst/Common/String.cpp.o
arm-linux-g++.br_real: error: unrecognized argument in option ?-mtune=nocona?

Can you have a look into this and check that it builds on ARM ?

> diff --git a/package/vsxu/0001-disable-backtrace.patch b/package/vsxu/0001-disable-backtrace.patch
> new file mode 100644
> index 0000000..1c5e2a4
> --- /dev/null
> +++ b/package/vsxu/0001-disable-backtrace.patch
> @@ -0,0 +1,35 @@
> +uClibc has no support for execinfo.h/backtrace
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> +
> +--- a/engine/include/debug/vsx_backtrace.h	2015-05-23 13:21:46.000000000 +0200
> ++++ b/engine/include/debug/vsx_backtrace.h	2015-11-05 20:46:48.000000000 +0100
> +@@ -7,7 +7,7 @@
> + 
> + #include <stdio.h>
> + #include <errno.h>
> +-#include <execinfo.h>
> ++//#include <execinfo.h>

This is not a super great solution. What about instead:

include(CheckIncludeFiles)

check_include_files(execinfo.h HAVE_EXECINFO)

and then #ifdef HAVE_EXECINFO ... #endif in the source code ?

This way, the solution is clean, and you can submit the patch upstream :-)

> diff --git a/package/vsxu/0002-fix-includes.patch b/package/vsxu/0002-fix-includes.patch
> new file mode 100644
> index 0000000..5d94496
> --- /dev/null
> +++ b/package/vsxu/0002-fix-includes.patch
> @@ -0,0 +1,41 @@
> +Do not use host paths when cross-compiling.
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

Looks good, please submit upstream. Since the package is on github, it
would be better if you used Git formatted patches.

Could you rework the patch to take into account those comments, and
send an updated version?

Thanks!

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

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

* [Buildroot] [PATCH v2 2/3] package/cal3d: new package
  2015-12-19 14:25     ` Yann E. MORIN
  2015-12-19 14:35       ` Thomas Petazzoni
  2015-12-19 14:47       ` Arnout Vandecappelle
@ 2015-12-20 21:52       ` Peter Korsgaard
  2 siblings, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2015-12-20 21:52 UTC (permalink / raw)
  To: buildroot

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

Hi,

 > I really don't know what to do with git-submodules.

 > But in this precise case, I would:
 >   - dump the cal3d package
 >   - add a post-download hook (or an extra-download URL) to vsxu to also
 >     download cal3d
 >   - add a post-extract hook to vsxu to also extract cal3d in the correct
 >     location.

 > Then, when/if cal3d is later used by other packages, we can revisit the
 > situation.

Yes, I think that makes sense as well.


 > Otherwise, for proper git-submodule handling, we would have to do
 > (roughly):

 >     git clone blabla pkg-version
 >     cd pkg-version
 >     git checkout pkg-version
 >     git submodule update --init --recursive
 >     find . -name .git -exec rm -rf {} +
 >     cd ..
 >     tar czf DL_DIR/pkg-version.tar.gz pkg-version/

 > This is not very complex, but is stil la significant change from our
 > current git wrapper.

Yes, I would prefer if we wouldn't have to do that.

 > And then, what about svn externals? About Hg subrepos? Does bzr also
 > have such a thing?

For svn we create the tarball ourselves, so I believe externals should
work.

I'm not really familiar with hg, but I guess it behaves like git.


 > Note that I would not really mind doing such a change. But is it worth
 > it, given that we currently have only one package that needs submodules?
 > Or do we have others for which we had to "deal with it" in a crude way?

I had a local package at work that originally used git submodules, and
the gstreamer packages use a submodule for "common stuff", so we would
have the issue if we ever moved to getting these from git.

So I think there is a potential use case for it, but it is really quite
a pity that they aren't handled natively by git archive.

Perhaps we should bring it up with the git developers?

-- 
Venlig hilsen,
Peter Korsgaard 

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

end of thread, other threads:[~2015-12-20 21:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-07 16:50 [Buildroot] [PATCH v2 0/3] New packages libglfw/cal3d/vsxu Bernd Kuhls
2015-11-07 16:50 ` [Buildroot] [PATCH v2 1/3] package/libglfw: new package Bernd Kuhls
2015-12-19 13:59   ` Thomas Petazzoni
2015-11-07 16:50 ` [Buildroot] [PATCH v2 2/3] package/cal3d: " Bernd Kuhls
2015-12-19 14:00   ` Thomas Petazzoni
2015-12-19 14:25     ` Yann E. MORIN
2015-12-19 14:35       ` Thomas Petazzoni
2015-12-19 14:47       ` Arnout Vandecappelle
2015-12-20 21:52       ` Peter Korsgaard
2015-12-19 14:35     ` Arnout Vandecappelle
2015-12-19 14:39   ` Arnout Vandecappelle
2015-11-07 16:50 ` [Buildroot] [PATCH v2 3/3] package/vsxu: " Bernd Kuhls
2015-12-19 14:43   ` Arnout Vandecappelle
2015-12-19 15:14   ` Thomas Petazzoni

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