Skip to contentSkip to conversation

New packages libglfw/cal3d/vsxu

PATCH New Bernd Kuhls 5 participants 14 messages Nov 7, 2015 – Dec 20, 2015

lore
Share & tools
lore
#0 lore raw

v2 cover New packages libglfw/cal3d/vsxu

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
Signature · 1 line
2.6.2
#1 lore raw

PATCH v2 1/3 package/libglfw: new package

---
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
package/Config.in +1 -0
index a6d1f38..d278e64 100644
@@ -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"
package/libglfw/Config.in new file +16 -0
new file mode 100644
index 0000000..045bd26
@@ -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
package/libglfw/libglfw.hash new file +2 -0
new file mode 100644
index 0000000..3226aad
@@ -0,0 +1,2 @@
+# Locally computed
+sha256	6ac642087682aaf7f8397761a41a99042b2c656498217a1c63ba9706d1eef122	libglfw-3.1.2.tar.gz
package/libglfw/libglfw.mk new file +28 -0
new file mode 100644
index 0000000..0b1730d
@@ -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))
Signature · 1 line
2.6.2
#2 lore raw

PATCH v2 1/3 package/libglfw: new package

Dear Bernd Kuhls,

Quoted 5 lines · Bernd Kuhls

---
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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v2 2/3 package/cal3d: new package

In reply to Bernd Kuhls

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

---
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
package/Config.in +1 -0
index d278e64..eb601e8 100644
@@ -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"
package/cal3d/Config.in new file +6 -0
new file mode 100644
index 0000000..231d905
@@ -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
package/cal3d/cal3d.mk new file +10 -0
new file mode 100644
index 0000000..0a7813f
@@ -0,0 +1,10 @@
+################################################################################
+#
+# cal3d
+#
+################################################################################
+
+CAL3D_VERSION = 0f640189eec913973c64db3bc1c1685554cb7202
+CAL3D_SITE = $(call github,vovoid,cal3d,$(CAL3D_VERSION))
+
+$(eval $(generic-package))
Signature · 1 line
2.6.2
#4 lore raw

PATCH v2 2/3 package/cal3d: new package

Hello,

Quoted 3 lines · Bernd Kuhls

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

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH v2 2/3 package/cal3d: new package

Thomas, All,

On 2015-12-19 15:00 +0100, Thomas Petazzoni spake thusly:

Quoted 10 lines · Bernd Kuhls
Quoted 3 lines

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

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.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH v2 2/3 package/cal3d: new package

Yann,

Quoted 4 lines · Yann E. MORIN

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.

Quoted 2 lines

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

Could be a solution, I'll try this.

Quoted 14 lines

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.

Quoted 6 lines

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH v2 2/3 package/cal3d: new package

In reply to Yann E. MORIN
Quoted 13 lines · Yann E. MORIN

Thomas, All,

On 2015-12-19 15:00 +0100, Thomas Petazzoni spake thusly:

Quoted 10 lines · Bernd Kuhls
Quoted 3 lines

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

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]

Quoted 10 lines

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.

Quoted 10 lines

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

Quoted 4 lines

Regards,
Yann E. MORIN.

Signature · 6 lines
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
#8 lore raw

PATCH v2 2/3 package/cal3d: new package

In reply to Yann E. MORIN
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Hi,

Quoted 11 lines

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.

Quoted 11 lines

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/

Quoted 2 lines

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.

Quoted 2 lines

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.

Quoted 3 lines

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?

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard 
#9 lore raw

PATCH v2 2/3 package/cal3d: new package

In reply to Thomas Petazzoni
Quoted 5 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · Bernd Kuhls

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

Quoted 7 lines
Quoted 1 line

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

Signature · 6 lines
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
#10 lore raw

PATCH v2 2/3 package/cal3d: new package

In reply to Bernd Kuhls
Quoted 31 lines · Bernd Kuhls

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

---
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
package/Config.in +1 -0
index d278e64..eb601e8 100644
@@ -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"
package/cal3d/Config.in new file +0 -0
new file mode 100644
index 0000000..231d905

package/cal3d/Config.in line 6

Quoted 6 lines
package/cal3d/Config.in new file +6 -0
@@ -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

Quoted 17 lines
package/cal3d/cal3d.mk new file +10 -0
new file mode 100644
index 0000000..0a7813f
@@ -0,0 +1,10 @@
+################################################################################
+#
+# cal3d
+#
+################################################################################
+
+CAL3D_VERSION = 0f640189eec913973c64db3bc1c1685554cb7202
+CAL3D_SITE = $(call github,vovoid,cal3d,$(CAL3D_VERSION))
+
+$(eval $(generic-package))
Signature · 6 lines
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
#11 lore raw

PATCH v2 3/3 package/vsxu: new package

In reply to Bernd Kuhls

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

---
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
package/Config.in +1 -0
index eb601e8..6080e15 100644
@@ -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"
package/vsxu/0001-disable-backtrace.patch new file +35 -0
new file mode 100644
index 0000000..1c5e2a4
@@ -0,0 +1,35 @@
+uClibc has no support for execinfo.h/backtrace
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+--- 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";
+ 
package/vsxu/0002-fix-includes.patch new file +41 -0

41 lines not on this page · raw message

package/vsxu/Config.in new file +20 -0
new file mode 100644
index 0000000..8639c0c
@@ -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
package/vsxu/vsxu.mk new file +31 -0
new file mode 100644
index 0000000..7dcbf74
@@ -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))
Signature · 1 line
2.6.2
#12 lore raw

PATCH v2 3/3 package/vsxu: new package

Quoted 6 lines · Bernd Kuhls

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

[snip]

package/vsxu/Config.in line 4

Quoted 10 lines
package/vsxu/Config.in new file +4 -0
new file mode 100644
index 0000000..8639c0c
@@ -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

Quoted 54 lines
package/vsxu/Config.in new file +16 -0
+	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
package/vsxu/vsxu.mk new file +31 -0
new file mode 100644
index 0000000..7dcbf74
@@ -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))
Signature · 6 lines
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
#13 lore raw

PATCH v2 3/3 package/vsxu: new package

In reply to Bernd Kuhls

Dear Bernd Kuhls,

Quoted 6 lines · Bernd Kuhls

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

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

package/vsxu/vsxu.mk +9 -5
index 7dcbf74..9553f81 100644
@@ -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 ?

Quoted 8 lines
package/vsxu/0001-disable-backtrace.patch new file +2 -0
new file mode 100644
index 0000000..1c5e2a4
@@ -0,0 +1,35 @@
+uClibc has no support for execinfo.h/backtrace
+

package/vsxu/0001-disable-backtrace.patch line 12

Quoted 10 lines
package/vsxu/0001-disable-backtrace.patch new file +10 -0
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+--- 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 :-)

package/vsxu/0002-fix-includes.patch line 3

Quoted 9 lines
package/vsxu/0002-fix-includes.patch new file +3 -0
new file mode 100644
index 0000000..5d94496
@@ -0,0 +1,41 @@
+Do not use host paths when cross-compiling.
+
+Signed-off-by: Bernd Kuhls <[email protected]>

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

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