vlc: new package
PATCH 1/2 vlc: new package
--- package/multimedia/Config.in | 1 + package/multimedia/vlc/Config.in | 14 ++ package/multimedia/vlc/vlc-uclibc-fixes.patch | 20 +++ package/multimedia/vlc/vlc.mk | 204 +++++++++++++++++++++++++ 4 files changed, 239 insertions(+), 0 deletions(-) create mode 100644 package/multimedia/vlc/Config.in create mode 100644 package/multimedia/vlc/vlc-uclibc-fixes.patch create mode 100644 package/multimedia/vlc/vlc.mk
package/multimedia/Config.in +1 -0
@@ -44,6 +44,7 @@ source "package/multimedia/speex/Config.in" source "package/multimedia/tidsp-binaries/Config.in" source "package/multimedia/taglib/Config.in" source "package/multimedia/tremor/Config.in" +source "package/multimedia/vlc/Config.in" source "package/multimedia/vorbis-tools/Config.in" source "package/multimedia/wavpack/Config.in" endmenu
package/multimedia/vlc/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_VLC + bool "vlc" + help + VLC + +if BR2_PACKAGE_VLC + +config BR2_PACKAGE_VLC_VLC + bool "Build and install vlc" + default y + help + This will install the video player. + +endif
package/multimedia/vlc/vlc-uclibc-fixes.patch new file +20 -0
@@ -0,0 +1,20 @@ +diff -u a/src/posix/linux_specific.c b/src/posix/linux_specific.c +--- a/src/posix/linux_specific.c 2012-02-08 16:43:30.000000000 -0200 ++++ b/src/posix/linux_specific.c 2012-02-09 03:51:20.925504594 -0200 +@@ -74,14 +74,14 @@ + return (path != NULL) ? path : strdup (PKGLIBDIR); + } + +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && !defined(__UCLIBC__) + # include <gnu/libc-version.h> + # include <stdlib.h> + #endif + + void system_Init (void) + { +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && !defined(__UCLIBC__) + const char *glcv = gnu_get_libc_version (); + + /* gettext in glibc 2.5-2.7 is not thread-safe. LibVLC keeps crashing,
package/multimedia/vlc/vlc.mk new file +204 -0
204 lines not on this page · raw message
Signature · 1 line
1.7.9.1
PATCH 2/2 vlc: Patch to get it compiling with qt-embedded
--- .../multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch | 33 ++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) create mode 100644 package/multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch
package/multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch new file +33 -0
@@ -0,0 +1,33 @@ +--- a/modules/gui/qt4/qt4.cpp 2012-02-23 22:42:45.760340077 -0200 ++++ b/modules/gui/qt4/qt4.cpp 2012-02-24 00:13:04.878082822 -0200 +@@ -627,21 +627,19 @@ + unsigned i_width = cfg->width; + unsigned i_height = cfg->height; + +-#if defined (Q_WS_X11) +- p_wnd->handle.xid = p_mi->getVideo( &i_x, &i_y, &i_width, &i_height ); +- if( !p_wnd->handle.xid ) ++ void *tmp = (void*)p_mi->getVideo( &i_x, &i_y, &i_width, &i_height ); ++ ++ if ( !tmp ) + return VLC_EGENERIC; ++#if defined (Q_WS_X11) ++ p_wnd->handle.xid = tmp; + p_wnd->display.x11 = NULL; +- + #elif defined (Q_WS_WIN) || defined(Q_WS_PM) +- p_wnd->handle.hwnd = (void *)p_mi->getVideo( &i_x, &i_y, &i_width, &i_height ); +- if( !p_wnd->handle.hwnd ) +- return VLC_EGENERIC; +- ++ p_wnd->handle.hwnd = tmp; + #elif defined (Q_WS_MAC) +- p_wnd->handle.nsobject = (void *)p_mi->getVideo( &i_x, &i_y, &i_width, &i_height ); +- if( !p_wnd->handle.nsobject ) +- return VLC_EGENERIC; ++ p_wnd->handle.nsobject = tmp; ++#elif defined (Q_WS_QWS) ++# warning QWS support not implemented! + #else + # error FIXME + #endif
Signature · 1 line
1.7.9.1
PATCH 2/2 vlc: Patch to get it compiling with qt-embedded
Quoted 4 lines · Ismael Luceno
--- .../multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch | 33 ++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-)create mode 100644
package/multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch
In general you should signoff your patches before submission.
But in the case of this one, it looks like a aprt of your other patch ("vlc: new package"). So it should be in the same commit.
package/multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch line 2
Quoted 9 lines
package/multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch new file +2
-0@@ -0,0 +1,33 @@ +--- a/modules/gui/qt4/qt4.cpp 2012-02-23 22:42:45.760340077 -0200 ++++ b/modules/gui/qt4/qt4.cpp 2012-02-24 00:13:04.878082822 -0200
Here as well you should state why the patch is needed and where it comes from.
Luca
PATCH 2/2 vlc: Patch to get it compiling with qt-embedded
Quoted 2 lines · On Monday 27 February 2012 09:26:53 Luca Ceresoli wrote:
Here as well you should state why the patch is needed and where it comes from.
And also send the patches upstream, please! You may get comments on the
patches from upstream, which will allow us to improve the patches inside buildroot as well.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 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
PATCH 1/2 vlc: new package
In reply to Ismael LucenoHi Ismael,
thanks for you patch submission.
Quoted 29 lines · Ismael Luceno
Signed-off-by Ismael Luceno<[email protected]>--- package/multimedia/Config.in | 1 + package/multimedia/vlc/Config.in | 14 ++ package/multimedia/vlc/vlc-uclibc-fixes.patch | 20 +++ package/multimedia/vlc/vlc.mk | 204 +++++++++++++++++++++++++ 4 files changed, 239 insertions(+), 0 deletions(-)create mode 100644 package/multimedia/vlc/Config.in create mode 100644
package/multimedia/vlc/vlc-uclibc-fixes.patchcreate mode 100644package/multimedia/vlc/vlc.mkpackage/multimedia/Config.in +1
-0@@ -44,6 +44,7 @@ source "package/multimedia/speex/Config.in" source "package/multimedia/tidsp-binaries/Config.in" source "package/multimedia/taglib/Config.in" source "package/multimedia/tremor/Config.in" +source "package/multimedia/vlc/Config.in" source "package/multimedia/vorbis-tools/Config.in" source "package/multimedia/wavpack/Config.in" endmenupackage/multimedia/vlc/Config.in new file +0
-0
package/multimedia/vlc/Config.in line 4
Quoted 4 lines
package/multimedia/vlc/Config.in new file +4
-0@@ -0,0 +1,14 @@ +config BR2_PACKAGE_VLC + bool "vlc" + help + VLC
A help text that's equal to the menu text is useless. You should provide a short description
(this is usually taken from the project website).
A link to the project homepage is useful as well, see other packages for an example.
Quoted 16 lines
package/multimedia/vlc/Config.in new file +10
-0+ +if BR2_PACKAGE_VLC + +config BR2_PACKAGE_VLC_VLC + bool "Build and install vlc" + default y + help + This will install the video player. + +endifpackage/multimedia/vlc/vlc-uclibc-fixes.patch new file +0
-0
package/multimedia/vlc/vlc-uclibc-fixes.patch line 3
Quoted 3 lines
package/multimedia/vlc/vlc-uclibc-fixes.patch new file +3
-0@@ -0,0 +1,20 @@ +diff -u a/src/posix/linux_specific.c b/src/posix/linux_specific.c +--- a/src/posix/linux_specific.c 2012-02-08 16:43:30.000000000 -0200 ++++ b/src/posix/linux_specific.c 2012-02-09 03:51:20.925504594 -0200
It's better to add a few lines at the beginning of patches to clarify why it's needed and
the source (e.g. the URL of a website or mailng list where it came from).
Quoted 23 lines
package/multimedia/vlc/vlc-uclibc-fixes.patch new file +17
-0+@@ -74,14 +74,14 @@ + return (path != NULL) ? path : strdup (PKGLIBDIR); + } + +-#ifdef __GLIBC__ ++#if defined(__GLIBC__)&& !defined(__UCLIBC__) + # include<gnu/libc-version.h> + # include<stdlib.h> + #endif + + void system_Init (void) + { +-#ifdef __GLIBC__ ++#if defined(__GLIBC__)&& !defined(__UCLIBC__) + const char *glcv = gnu_get_libc_version (); + + /* gettext in glibc 2.5-2.7 is not thread-safe. LibVLC keeps crashing,package/multimedia/vlc/vlc.mk new file +0
-0
package/multimedia/vlc/vlc.mk line 9
Quoted 9 lines
package/multimedia/vlc/vlc.mk new file +9
-0@@ -0,0 +1,204 @@ +############################################################# +# +# vlc +# +############################################################# +VLC_VERSION = 500c190 +# VLC_SOURCE = vlc-$(VLC_VERSION).tar.bz2 +# VLC_SITE = http://download.videolan.org/pub/videolan/vlc/$(VLC_VERSION) +VLC_SITE = git://git.videolan.org/vlc.git
Why using a git checkout when there are officially released tarballs? If there's
a reason please add a comment explanining it, otherwise use the tarball.
Also, don't submit files with commented lines: if they are not needed, remove them.
Luca
PATCH 1/2 vlc: new package
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Luca" == Luca Ceresoli <[email protected]> writes:
Luca> Hi Ismael,
Quoted 9 lines
package/multimedia/vlc/vlc-uclibc-fixes.patch line 3
Quoted 9 lines
package/multimedia/vlc/vlc-uclibc-fixes.patch new file +3
-0@@ -0,0 +1,20 @@ +diff -u a/src/posix/linux_specific.c b/src/posix/linux_specific.c +--- a/src/posix/linux_specific.c 2012-02-08 16:43:30.000000000 -0200 ++++ b/src/posix/linux_specific.c 2012-02-09 03:51:20.925504594 -0200
Luca> It's better to add a few lines at the beginning of patches to clarify Luca> why it's needed and
Luca> the source (e.g. the URL of a website or mailng list where it came from).
And if you are the author, please add your signed-off-by line here as well.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 vlc: new package
In reply to Ismael LucenoHi,
Thanks for the patch.
Quoted 31 lines · Ismael Luceno
Signed-off-by Ismael Luceno <[email protected]>--- package/multimedia/Config.in | 1 + package/multimedia/vlc/Config.in | 14 ++ package/multimedia/vlc/vlc-uclibc-fixes.patch | 20 +++ package/multimedia/vlc/vlc.mk | 204 +++++++++++++++++++++++++ 4 files changed, 239 insertions(+), 0 deletions(-) create mode 100644 package/multimedia/vlc/Config.in create mode 100644 package/multimedia/vlc/vlc-uclibc-fixes.patch create mode 100644 package/multimedia/vlc/vlc.mkpackage/multimedia/Config.in +1
-0@@ -44,6 +44,7 @@ source "package/multimedia/speex/Config.in" source "package/multimedia/tidsp-binaries/Config.in" source "package/multimedia/taglib/Config.in" source "package/multimedia/tremor/Config.in" +source "package/multimedia/vlc/Config.in" source "package/multimedia/vorbis-tools/Config.in" source "package/multimedia/wavpack/Config.in" endmenupackage/multimedia/vlc/Config.in new file +2
-0@@ -0,0 +1,14 @@ +config BR2_PACKAGE_VLC + bool "vlc"
package/multimedia/vlc/Config.in line 12
Quoted 10 lines
package/multimedia/vlc/Config.in new file +10
-0+ help + VLC + +if BR2_PACKAGE_VLC + +config BR2_PACKAGE_VLC_VLC + bool "Build and install vlc" + default y + help + This will install the video player.
This is confusing. Why would you have a first option to build vlc, and then another version to build vlc ?
Quoted 33 lines
package/multimedia/vlc/Config.in new file +1
-0+endifpackage/multimedia/vlc/vlc-uclibc-fixes.patch new file +20
-0@@ -0,0 +1,20 @@ +diff -u a/src/posix/linux_specific.c b/src/posix/linux_specific.c +--- a/src/posix/linux_specific.c 2012-02-08 16:43:30.000000000 -0200 ++++ b/src/posix/linux_specific.c 2012-02-09 03:51:20.925504594 -0200 +@@ -74,14 +74,14 @@ + return (path != NULL) ? path : strdup (PKGLIBDIR); + } + +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && !defined(__UCLIBC__) + # include <gnu/libc-version.h> + # include <stdlib.h> + #endif + + void system_Init (void) + { +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && !defined(__UCLIBC__) + const char *glcv = gnu_get_libc_version (); + + /* gettext in glibc 2.5-2.7 is not thread-safe. LibVLC keeps crashing,package/multimedia/vlc/vlc.mk new file +0
-0
package/multimedia/vlc/vlc.mk line 9
Quoted 9 lines
package/multimedia/vlc/vlc.mk new file +9
-0@@ -0,0 +1,204 @@ +############################################################# +# +# vlc +# +############################################################# +VLC_VERSION = 500c190 +# VLC_SOURCE = vlc-$(VLC_VERSION).tar.bz2 +# VLC_SITE = http://download.videolan.org/pub/videolan/vlc/$(VLC_VERSION) +VLC_SITE = git://git.videolan.org/vlc.git
Remove the commented lines. Also, why use git instead of tarballs ?
package/multimedia/vlc/vlc.mk line 12
Quoted 2 lines
package/multimedia/vlc/vlc.mk new file +2
-0+VLC_CFLAGS = $(TARGET_CFLAGS) +VLC_LDFLAGS = $(TARGET_LDFLAGS)
This seems redundant with the defaults.
Quoted 23 lines
package/multimedia/vlc/vlc.mk new file +23
-0+ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +VLC_DEPENDENCIES += alsa-lib +VLC_CONF_OPTS += --enable-alsa +else +VLC_CONF_OPTS += --disable-alsa +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB),y) +VLC_CONF_OPTS += --enable-directfb +VLC_DEPENDENCIES += directfb +else +VLC_CONF_OPTS += --disable-directfb +endif + +ifeq ($(BR2_PACKAGE_SDL),y) +VLC_CONF_OPTS += --enable-sdl +VLC_DEPENDENCIES += sdl +else +VLC_CONF_OPTS += --disable-sdl +endif + +ifeq ($(BR2_PACKAGE_SDL_IMAGE),y) +VLC_CONF_OPTS += --enable-sdl-image
package/multimedia/vlc/vlc.mk line 46
Quoted 10 lines
package/multimedia/vlc/vlc.mk new file +10
-0+VLC_DEPENDENCIES += sdl_image +else +VLC_CONF_OPTS += --disable-sdl-image +endif + +ifeq ($(BR2_PACKAGE_VLC_VLC),y) +VLC_CONF_OPTS += --enable-vlc +else +VLC_CONF_OPTS += --disable-vlc +endif
Ah, I see what you meant here now. I would do it the other way around. Having BR2_PACKAGE_VLC and BR2_PACKAGE_VLC_LIBVLC_ONLY options, with a default for the latter to no, and such building vlc by default.
Quoted 94 lines
package/multimedia/vlc/vlc.mk new file +94
-0+ifeq ($(BR2_PACKAGE_LIBMAD),y) +VLC_CONF_OPTS += --enable-mad +VLC_DEPENDENCIES += libmad +else +VLC_CONF_OPTS += --disable-mad +endif + +ifeq ($(BR2_PACKAGE_TREMOR),y) +VLC_DEPENDENCIES += tremor +VLC_CONF_OPTS += --enable-tremor +else +VLC_CONF_OPTS += --disable-tremor +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +VLC_DEPENDENCIES += libpng +VLC_CONF_OPTS += --enable-png +else +VLC_CONF_OPTS += --disable-png +endif + +ifeq ($(BR2_PACKAGE_FFMPEG),y) +VLC_DEPENDENCIES += ffmpeg +VLC_CONF_OPTS += --enable-avcodec +else +VLC_CONF_OPTS += --disable-avcodec +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y) +VLC_CONF_OPTS += --enable-postproc +else +VLC_CONF_OPTS += --disable-postproc +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y) +VLC_CONF_OPTS += --enable-swscale +else +VLC_CONF_OPTS += --disable-swscale +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +VLC_DEPENDENCIES += dbus +VLC_CONF_OPTS += --enable-dbus +else +VLC_CONF_OPTS += --disable-dbus +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +VLC_DEPENDENCIES += libgcrypt +VLC_CONF_OPTS += --enable-libgcrypt +else +VLC_CONF_OPTS += --disable-libgcrypt +endif + +ifeq ($(BR2_PACKAGE_LIBV4L),y) +VLC_DEPENDENCIES += libv4l +VLC_CONF_OPTS += --enable-libv4l2 +else +VLC_CONF_OPTS += --disable-libv4l2 +endif + +ifeq ($(BR2_PACKAGE_LUA),y) +VLC_DEPENDENCIES += lua +VLC_CONF_OPTS += --enable-lua +else +VLC_CONF_OPTS += --disable-lua +endif + +ifeq ($(BR2_PACKAGE_LIBXCB),y) +VLC_DEPENDENCIES += libxcb +VLC_CONF_OPTS += --enable-xcb +else +VLC_CONF_OPTS += --disable-xcb +endif + +ifeq ($(BR2_PACKAGE_LIVE555),y) +VLC_DEPENDENCIES += live555 +VLC_CONF_OPTS += --enable-live555 +else +VLC_CONF_OPTS += --disable-live555 +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +VLC_DEPENDENCIES += xlib_libX11 +VLC_CONF_OPTS += --with-x +else +VLC_CONF_OPTS += --without-x +endif + +ifeq ($(BR2_PACKAGE_QT),y) +VLC_DEPENDENCIES += qt +VLC_CONF_OPTS += --enable-qt4 +else +VLC_CONF_OPTS += --disable-qt4
package/multimedia/vlc/vlc.mk line 151
Quoted 10 lines
package/multimedia/vlc/vlc.mk new file +10
-0+endif + +VLC_DEPENDENCIES += \ + $(if $(BR2_PACKAGE_FREETYPE),freetype) \ + $(if $(BR2_PACKAGE_FLAC),flac) \ + $(if $(BR2_PACKAGE_SPEEX),speex) \ + $(if $(BR2_PACKAGE_LIBVORBIS),libvorbis) \ + $(if $(BR2_PACKAGE_LIBTHEORA),libtheora) \ + $(if $(BR2_PACKAGE_XLIB_LIBX11),xlib_libX11) \ + $(if $(BR2_PACKAGE_XLIB_LIBXV),xlib_libXv)
Maybe you could add Kconfig options as well for all of these ? This would be easier for the user to find out which options are available and what they should or should not build.
package/multimedia/vlc/vlc.mk line 161
Quoted 9 lines
package/multimedia/vlc/vlc.mk new file +9
-0+# ARM optimizations +ifeq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),armv7-a) +VLC_CONF_OPTS += --enable-neon +else +VLC_CONF_OPTS += --disable-neon +endif + +# FIXME: features disabled due lack of packages +VLC_CONF_OPTS += --disable-a52
Maybe the comment here is unecessary.
Quoted 32 lines
package/multimedia/vlc/vlc.mk new file +32
-0+ifeq ($(BR2_i386),y) +VLC_CFLAGS += -fomit-frame-pointer +endif + +define VLC_CONFIGURE_CMDS + echo $(VLC_VERSION) > $(@D)/src/revision.txt + (cd $(@D); rm -rf config.cache; \ + test -x configure || ./bootstrap; \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --build=$(GNU_HOST_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --disable-rpath \ + $(VLC_CONF_OPTS) \ + CXXFLAGS="$(VLC_CFLAGS)"; \ + ) + $(SED) '1i#define HAVE_VASPRINTF 1' $(@D)/config.h +endef + +define VLC_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define VLC_INSTALL_TARGET_CMDS + find $(@D) -name '*.la' -exec $(SED) '/^relink_command=/d' '{}' + + touch $(@D)/modules/access/zip/libzip_plugin.la \ + $(@D)/modules/misc/liblogger_plugin.la + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install +endef
package/multimedia/vlc/vlc.mk line 204
Quoted 10 lines
package/multimedia/vlc/vlc.mk new file +10
-0+ +define VLC_UNINSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall +endef + +define VLC_CLEAN_CMDS + $(MAKE) -C $(@D) clean +endef + +$(eval $(call GENTARGETS))
You might want to use the autotargets here as it uses the autotools.
Signature · 4 lines
Maxime Ripard, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com