* [Buildroot] [PATCH 1/2] vlc: new package
@ 2012-02-26 11:45 Ismael Luceno
2012-02-26 11:45 ` [Buildroot] [PATCH 2/2] vlc: Patch to get it compiling with qt-embedded Ismael Luceno
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Ismael Luceno @ 2012-02-26 11:45 UTC (permalink / raw)
To: buildroot
Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
---
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
diff --git a/package/multimedia/Config.in b/package/multimedia/Config.in
index a05d1d9..fc20d74 100644
--- a/package/multimedia/Config.in
+++ b/package/multimedia/Config.in
@@ -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
diff --git a/package/multimedia/vlc/Config.in b/package/multimedia/vlc/Config.in
new file mode 100644
index 0000000..ee8d942
--- /dev/null
+++ b/package/multimedia/vlc/Config.in
@@ -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
diff --git a/package/multimedia/vlc/vlc-uclibc-fixes.patch b/package/multimedia/vlc/vlc-uclibc-fixes.patch
new file mode 100644
index 0000000..3ce60b3
--- /dev/null
+++ b/package/multimedia/vlc/vlc-uclibc-fixes.patch
@@ -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,
diff --git a/package/multimedia/vlc/vlc.mk b/package/multimedia/vlc/vlc.mk
new file mode 100644
index 0000000..413dfd4
--- /dev/null
+++ b/package/multimedia/vlc/vlc.mk
@@ -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
+
+VLC_CFLAGS = $(TARGET_CFLAGS)
+VLC_LDFLAGS = $(TARGET_LDFLAGS)
+
+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
+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
+
+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
+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)
+
+# 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
+
+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
+
+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))
--
1.7.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] vlc: Patch to get it compiling with qt-embedded
2012-02-26 11:45 [Buildroot] [PATCH 1/2] vlc: new package Ismael Luceno
@ 2012-02-26 11:45 ` Ismael Luceno
2012-02-27 9:26 ` Luca Ceresoli
2012-02-27 9:16 ` [Buildroot] [PATCH 1/2] vlc: new package Luca Ceresoli
2012-02-27 13:05 ` Maxime Ripard
2 siblings, 1 reply; 7+ messages in thread
From: Ismael Luceno @ 2012-02-26 11:45 UTC (permalink / raw)
To: buildroot
---
.../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
diff --git a/package/multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch b/package/multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch
new file mode 100644
index 0000000..61cd586
--- /dev/null
+++ b/package/multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch
@@ -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
--
1.7.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] vlc: new package
2012-02-26 11:45 [Buildroot] [PATCH 1/2] vlc: new package Ismael Luceno
2012-02-26 11:45 ` [Buildroot] [PATCH 2/2] vlc: Patch to get it compiling with qt-embedded Ismael Luceno
@ 2012-02-27 9:16 ` Luca Ceresoli
2012-02-27 9:34 ` Peter Korsgaard
2012-02-27 13:05 ` Maxime Ripard
2 siblings, 1 reply; 7+ messages in thread
From: Luca Ceresoli @ 2012-02-27 9:16 UTC (permalink / raw)
To: buildroot
Hi Ismael,
thanks for you patch submission.
Ismael Luceno wrote:
> Signed-off-by: Ismael Luceno<ismael.luceno@gmail.com>
> ---
> 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
>
> diff --git a/package/multimedia/Config.in b/package/multimedia/Config.in
> index a05d1d9..fc20d74 100644
> --- a/package/multimedia/Config.in
> +++ b/package/multimedia/Config.in
> @@ -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
> diff --git a/package/multimedia/vlc/Config.in b/package/multimedia/vlc/Config.in
> new file mode 100644
> index 0000000..ee8d942
> --- /dev/null
> +++ b/package/multimedia/vlc/Config.in
> @@ -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.
> +
> +if BR2_PACKAGE_VLC
> +
> +config BR2_PACKAGE_VLC_VLC
> + bool "Build and install vlc"
> + default y
> + help
> + This will install the video player.
> +
> +endif
> diff --git a/package/multimedia/vlc/vlc-uclibc-fixes.patch b/package/multimedia/vlc/vlc-uclibc-fixes.patch
> new file mode 100644
> index 0000000..3ce60b3
> --- /dev/null
> +++ b/package/multimedia/vlc/vlc-uclibc-fixes.patch
> @@ -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).
> +@@ -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,
> diff --git a/package/multimedia/vlc/vlc.mk b/package/multimedia/vlc/vlc.mk
> new file mode 100644
> index 0000000..413dfd4
> --- /dev/null
> +++ b/package/multimedia/vlc/vlc.mk
> @@ -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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] vlc: Patch to get it compiling with qt-embedded
2012-02-26 11:45 ` [Buildroot] [PATCH 2/2] vlc: Patch to get it compiling with qt-embedded Ismael Luceno
@ 2012-02-27 9:26 ` Luca Ceresoli
2012-02-28 20:49 ` Arnout Vandecappelle
0 siblings, 1 reply; 7+ messages in thread
From: Luca Ceresoli @ 2012-02-27 9:26 UTC (permalink / raw)
To: buildroot
Ismael Luceno wrote:
> ---
> .../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.
>
> diff --git a/package/multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch b/package/multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch
> new file mode 100644
> index 0000000..61cd586
> --- /dev/null
> +++ b/package/multimedia/vlc/vlc-qt-4.8-embedded-fixes.patch
> @@ -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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] vlc: new package
2012-02-27 9:16 ` [Buildroot] [PATCH 1/2] vlc: new package Luca Ceresoli
@ 2012-02-27 9:34 ` Peter Korsgaard
0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2012-02-27 9:34 UTC (permalink / raw)
To: buildroot
>>>>> "Luca" == Luca Ceresoli <luca@lucaceresoli.net> writes:
Luca> Hi Ismael,
>> diff --git a/package/multimedia/vlc/vlc-uclibc-fixes.patch b/package/multimedia/vlc/vlc-uclibc-fixes.patch
>> new file mode 100644
>> index 0000000..3ce60b3
>> --- /dev/null
>> +++ b/package/multimedia/vlc/vlc-uclibc-fixes.patch
>> @@ -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.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/2] vlc: new package
2012-02-26 11:45 [Buildroot] [PATCH 1/2] vlc: new package Ismael Luceno
2012-02-26 11:45 ` [Buildroot] [PATCH 2/2] vlc: Patch to get it compiling with qt-embedded Ismael Luceno
2012-02-27 9:16 ` [Buildroot] [PATCH 1/2] vlc: new package Luca Ceresoli
@ 2012-02-27 13:05 ` Maxime Ripard
2 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2012-02-27 13:05 UTC (permalink / raw)
To: buildroot
Hi,
Thanks for the patch.
On 26/02/2012 12:45, Ismael Luceno wrote:
> Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
> ---
> 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
>
> diff --git a/package/multimedia/Config.in b/package/multimedia/Config.in
> index a05d1d9..fc20d74 100644
> --- a/package/multimedia/Config.in
> +++ b/package/multimedia/Config.in
> @@ -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
> diff --git a/package/multimedia/vlc/Config.in b/package/multimedia/vlc/Config.in
> new file mode 100644
> index 0000000..ee8d942
> --- /dev/null
> +++ b/package/multimedia/vlc/Config.in
> @@ -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.
This is confusing. Why would you have a first option to build vlc, and
then another version to build vlc ?
> +endif
> diff --git a/package/multimedia/vlc/vlc-uclibc-fixes.patch b/package/multimedia/vlc/vlc-uclibc-fixes.patch
> new file mode 100644
> index 0000000..3ce60b3
> --- /dev/null
> +++ b/package/multimedia/vlc/vlc-uclibc-fixes.patch
> @@ -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,
> diff --git a/package/multimedia/vlc/vlc.mk b/package/multimedia/vlc/vlc.mk
> new file mode 100644
> index 0000000..413dfd4
> --- /dev/null
> +++ b/package/multimedia/vlc/vlc.mk
> @@ -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 ?
> +VLC_CFLAGS = $(TARGET_CFLAGS)
> +VLC_LDFLAGS = $(TARGET_LDFLAGS)
This seems redundant with the defaults.
> +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
> +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.
> +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
> +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.
> +# 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.
> +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
> +
> +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.
--
Maxime Ripard, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] vlc: Patch to get it compiling with qt-embedded
2012-02-27 9:26 ` Luca Ceresoli
@ 2012-02-28 20:49 ` Arnout Vandecappelle
0 siblings, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2012-02-28 20:49 UTC (permalink / raw)
To: buildroot
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
--
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-02-28 20:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-26 11:45 [Buildroot] [PATCH 1/2] vlc: new package Ismael Luceno
2012-02-26 11:45 ` [Buildroot] [PATCH 2/2] vlc: Patch to get it compiling with qt-embedded Ismael Luceno
2012-02-27 9:26 ` Luca Ceresoli
2012-02-28 20:49 ` Arnout Vandecappelle
2012-02-27 9:16 ` [Buildroot] [PATCH 1/2] vlc: new package Luca Ceresoli
2012-02-27 9:34 ` Peter Korsgaard
2012-02-27 13:05 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox