diff mbox

vlc: new package

Message ID 1389046142-12472-1-git-send-email-spdawson@gmail.com
State Superseded
Headers show

Commit Message

Simon Dawson Jan. 6, 2014, 10:09 p.m. UTC
From: Simon Dawson <spdawson@gmail.com>

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 package/Config.in                         |   1 +
 package/vlc/Config.in                     |  12 ++
 package/vlc/vlc-0001-fix-link-error.patch |  28 ++++
 package/vlc/vlc.mk                        | 231 ++++++++++++++++++++++++++++++
 4 files changed, 272 insertions(+)
 create mode 100644 package/vlc/Config.in
 create mode 100644 package/vlc/vlc-0001-fix-link-error.patch
 create mode 100644 package/vlc/vlc.mk

Comments

Baruch Siach Jan. 7, 2014, 3:39 a.m. UTC | #1
Hi Simon,

On Mon, Jan 06, 2014 at 10:09:02PM +0000, spdawson@gmail.com wrote:
> From: Simon Dawson <spdawson@gmail.com>
> 
> Signed-off-by: Simon Dawson <spdawson@gmail.com>
> ---

[...]

> diff --git a/package/vlc/Config.in b/package/vlc/Config.in
> new file mode 100644
> index 0000000..83576e9
> --- /dev/null
> +++ b/package/vlc/Config.in
> @@ -0,0 +1,12 @@
> +config BR2_PACKAGE_VLC
> +	bool "vlc"
> +	depends on BR2_TOOLCHAIN_USES_GLIBC # spawn.h

My uClibc toolchain has spawn.h as well. Is this a specific feature that is 
missing in uClibc?

> +	help
> +	  VLC is a free and open source cross-platform multimedia player
> +	  and framework that plays most multimedia files as well as DVD,
> +	  Audio CD, VCD, and various streaming protocols.
> +
> +	  http://www.videolan.org/vlc/
> +
> +comment "vlc needs an (e)glibc toolchain"
> +	depends on !BR2_TOOLCHAIN_USES_GLIBC

baruch
Thomas Petazzoni Jan. 7, 2014, 6:26 a.m. UTC | #2
Simon,

On Mon,  6 Jan 2014 22:09:02 +0000, spdawson@gmail.com wrote:

> +ifeq ($(BR2_PACKAGE_ALSA_LIB),)

Maybe we should use positive logic everywhere, no? I.e invert all the
conditions to be:

ifeq ($(BR2_<foo>),y)
  use the feature
else
  don't use the feature
endif

> +ifeq ($(BR2_PACKAGE_LIVE555),)
> +VLC_CONF_OPT += --disable-live555
> +else
> +VLC_CONF_OPT += --disable-live555

This should be --enable-live555

> +VLC_DEPENDENCIES += live555
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LUA),)
> +VLC_CONF_OPT += --disable-lua
> +else
> +VLC_CONF_OPT += --disable-lua

Same mistake.

> +VLC_DEPENDENCIES += lua
> +endif
> +
> +ifeq ($(BR2_PACKAGE_QT),)
> +VLC_CONF_OPT += --disable-qt
> +else
> +VLC_CONF_OPT += --disable-qt

Ditto.

> +VLC_DEPENDENCIES += qt
> +endif
> +
> +ifeq ($(BR2_PACKAGE_SDL),)
> +VLC_CONF_OPT += --disable-sdl
> +else
> +VLC_CONF_OPT += --disable-sdl

Ditto.

> +VLC_DEPENDENCIES += sdl
> +endif
> +
> +ifeq ($(BR2_PACKAGE_SDL_IMAGE),)
> +VLC_CONF_OPT += --disable-sdl-image
> +else
> +VLC_CONF_OPT += --disable-sdl-image

Ditto.

> +VLC_DEPENDENCIES += sdl-image
> +endif
> +
> +ifeq ($(BR2_PACKAGE_SPEEX),)
> +VLC_CONF_OPT += --disable-speex
> +else
> +VLC_CONF_OPT += --enable-speex
> +VLC_DEPENDENCIES += speex
> +endif
> +
> +ifeq ($(BR2_PACKAGE_TREMOR),)
> +VLC_CONF_OPT += --disable-tremor
> +else
> +VLC_CONF_OPT += --enable-tremor
> +VLC_DEPENDENCIES += tremor
> +endif
> +
> +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),)
> +VLC_CONF_OPT += --without-x
> +else
> +VLC_CONF_OPT += --with-x
> +VLC_DEPENDENCIES += xlib_libX11
> +endif

I wonder if this block shouldn't interact with the XCB block above.

Best regards,

Thomas
Simon Dawson Jan. 7, 2014, 11:17 a.m. UTC | #3
Hi Baruch. Thanks for the feedback.

On 7 January 2014 03:39, Baruch Siach <baruch@tkos.co.il> wrote:
> My uClibc toolchain has spawn.h as well. Is this a specific feature that is
> missing in uClibc?

Are you sure that spawn.h is present? My uClibc 0.9.33.2 doesn't have
it, and I can't see where it would come from... Apparently, the spawn
function family is not currently supported in uClibc.

Simon.
Simon Dawson Jan. 7, 2014, 11:20 a.m. UTC | #4
Hi Thomas. Thanks for the feedback.

On 7 January 2014 06:26, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Maybe we should use positive logic everywhere, no? I.e invert all the
> conditions to be:
>
> ifeq ($(BR2_<foo>),y)
>   use the feature
> else
>   don't use the feature
> endif

Yes, that would make more sense I think.

>> +ifeq ($(BR2_PACKAGE_LIVE555),)
>> +VLC_CONF_OPT += --disable-live555
>> +else
>> +VLC_CONF_OPT += --disable-live555
>
> This should be --enable-live555

Oops. Will fix this, and all other occurrences of the same mistake.

>> +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),)
>> +VLC_CONF_OPT += --without-x
>> +else
>> +VLC_CONF_OPT += --with-x
>> +VLC_DEPENDENCIES += xlib_libX11
>> +endif
>
> I wonder if this block shouldn't interact with the XCB block above.

I'm not so sure. I know xlib_libX11 selects libxcb, but I don't see
that mirroring this dependency will add any value to the vlc package
make file. That said, I'm quite happy to change it if you think that
the right thing to do.

Simon.
Baruch Siach Jan. 7, 2014, 11:51 a.m. UTC | #5
Hi Simon,

On Tue, Jan 07, 2014 at 11:17:14AM +0000, Simon Dawson wrote:
> Hi Baruch. Thanks for the feedback.
> 
> On 7 January 2014 03:39, Baruch Siach <baruch@tkos.co.il> wrote:
> > My uClibc toolchain has spawn.h as well. Is this a specific feature that is
> > missing in uClibc?
> 
> Are you sure that spawn.h is present? My uClibc 0.9.33.2 doesn't have
> it, and I can't see where it would come from... Apparently, the spawn
> function family is not currently supported in uClibc.

This was added with uClibc commit 0dcf66744f53 (librt: add posix_spawn 
support), which is only in the snapshot version. I think you may add 
BR2_UCLIBC_VERSION_SNAPSHOT to the dependency list.

baruch
Simon Dawson Jan. 7, 2014, 11:52 a.m. UTC | #6
Hi Baruch,

On 7 January 2014 11:51, Baruch Siach <baruch@tkos.co.il> wrote:
> This was added with uClibc commit 0dcf66744f53 (librt: add posix_spawn
> support), which is only in the snapshot version. I think you may add
> BR2_UCLIBC_VERSION_SNAPSHOT to the dependency list.

Ah, right. Thanks for the information.

Simon.
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index e502cde..02097ff 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -23,6 +23,7 @@  source "package/opus-tools/Config.in"
 source "package/pulseaudio/Config.in"
 source "package/tidsp-binaries/Config.in"
 source "package/tstools/Config.in"
+source "package/vlc/Config.in"
 source "package/vorbis-tools/Config.in"
 source "package/wavpack/Config.in"
 source "package/yavta/Config.in"
diff --git a/package/vlc/Config.in b/package/vlc/Config.in
new file mode 100644
index 0000000..83576e9
--- /dev/null
+++ b/package/vlc/Config.in
@@ -0,0 +1,12 @@ 
+config BR2_PACKAGE_VLC
+	bool "vlc"
+	depends on BR2_TOOLCHAIN_USES_GLIBC # spawn.h
+	help
+	  VLC is a free and open source cross-platform multimedia player
+	  and framework that plays most multimedia files as well as DVD,
+	  Audio CD, VCD, and various streaming protocols.
+
+	  http://www.videolan.org/vlc/
+
+comment "vlc needs an (e)glibc toolchain"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
diff --git a/package/vlc/vlc-0001-fix-link-error.patch b/package/vlc/vlc-0001-fix-link-error.patch
new file mode 100644
index 0000000..0acae8f
--- /dev/null
+++ b/package/vlc/vlc-0001-fix-link-error.patch
@@ -0,0 +1,28 @@ 
+Fix a link error.
+
+Signed-off-by: Simon Dawson <spdawson@gmail.com>
+
+diff -Nurp a/bin/Makefile.am b/bin/Makefile.am
+--- a/bin/Makefile.am	2013-12-03 09:12:34.000000000 +0000
++++ b/bin/Makefile.am	2014-01-06 22:03:34.888581851 +0000
+@@ -44,7 +44,7 @@ vlc_static_CFLAGS = $(AM_CFLAGS) \
+ 	-DTOP_SRCDIR=\"$$(cd "$(top_srcdir)"; pwd)\" \
+ 	$(NULL)
+ vlc_static_DEPENDENCIES = $(vlc_DEPENDENCIES)
+-vlc_static_LDADD = $(vlc_LDADD)
++vlc_static_LDADD = $(vlc_LDADD) ../compat/libcompat.la
+ vlc_static_LDFLAGS = $(vlc_LDFLAGS)
+ 
+ if HAVE_WIN32
+diff -Nurp a/bin/Makefile.in b/bin/Makefile.in
+--- a/bin/Makefile.in	2013-12-07 16:17:01.000000000 +0000
++++ b/bin/Makefile.in	2014-01-06 22:04:10.888444978 +0000
+@@ -1049,7 +1049,7 @@ vlc_static_CFLAGS = $(AM_CFLAGS) \
+ 	$(NULL)
+ 
+ vlc_static_DEPENDENCIES = $(vlc_DEPENDENCIES)
+-vlc_static_LDADD = $(vlc_LDADD)
++vlc_static_LDADD = $(vlc_LDADD) ../compat/libcompat.la
+ vlc_static_LDFLAGS = $(vlc_LDFLAGS) $(am__append_7)
+ @HAVE_WIN32_TRUE@vlc_DEPENDENCIES = vlc_win32_rc.$(OBJEXT)
+ vlc_cache_gen_SOURCES = cachegen.c
diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk
new file mode 100644
index 0000000..1958f87
--- /dev/null
+++ b/package/vlc/vlc.mk
@@ -0,0 +1,231 @@ 
+################################################################################
+#
+# vlc
+#
+################################################################################
+
+VLC_VERSION = 2.1.2
+VLC_SITE = http://download.videolan.org/pub/videolan/vlc/$(VLC_VERSION)
+VLC_SOURCE = vlc-$(VLC_VERSION).tar.xz
+VLC_LICENSE = GPLv2+ LGPLv2.1+
+VLC_LICENSE_FILES = COPYING COPYING.LIB
+
+VLC_CONF_OPT += \
+	--disable-a52 \
+	--disable-shout \
+	--disable-mod \
+	--disable-faad \
+	--disable-twolame \
+	--disable-dca \
+	--disable-dirac \
+	--disable-schroedinger \
+	--disable-quicksync \
+	--disable-fluidsynth \
+	--disable-zvbi \
+	--disable-libass \
+	--disable-kate \
+	--disable-caca \
+	--disable-jack \
+	--disable-samplerate \
+	--disable-chromaprint \
+	--disable-goom \
+	--disable-projectm \
+	--disable-vsxu \
+	--disable-udev \
+	--disable-mtp
+
+ifeq ($(BR2_PACKAGE_ALSA_LIB),)
+VLC_CONF_OPT += --disable-alsa
+else
+VLC_CONF_OPT += --enable-alsa
+VLC_DEPENDENCIES += alsa-lib
+endif
+
+ifeq ($(BR2_PACKAGE_AVAHI),)
+VLC_CONF_OPT += --disable-bonjour
+else
+VLC_CONF_OPT += --enable-bonjour
+VLC_DEPENDENCIES += avahi
+endif
+
+ifeq ($(BR2_PACKAGE_DBUS),)
+VLC_CONF_OPT += --disable-dbus
+else
+VLC_CONF_OPT += --enable-dbus
+VLC_DEPENDENCIES += dbus
+endif
+
+ifeq ($(BR2_PACKAGE_DIRECTFB),)
+VLC_CONF_OPT += --disable-directfb
+else
+VLC_CONF_OPT += --enable-directfb
+VLC_DEPENDENCIES += directfb
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG),)
+VLC_CONF_OPT += --disable-avcodec
+else
+VLC_CONF_OPT += --enable-avcodec
+VLC_DEPENDENCIES += ffmpeg
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),)
+VLC_CONF_OPT += --disable-postproc
+else
+VLC_CONF_OPT += --enable-postproc
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),)
+VLC_CONF_OPT += --disable-swscale
+else
+VLC_CONF_OPT += --enable-swscale
+endif
+
+ifeq ($(BR2_PACKAGE_FLAC),)
+VLC_CONF_OPT += --disable-flac
+else
+VLC_CONF_OPT += --enable-flac
+VLC_DEPENDENCIES += flac
+endif
+
+ifeq ($(BR2_PACKAGE_OPUS),)
+VLC_CONF_OPT += --disable-opus
+else
+VLC_CONF_OPT += --enable-opus
+VLC_DEPENDENCIES += opus
+endif
+
+ifeq ($(BR2_PACKAGE_LIBGCRYPT),)
+VLC_CONF_OPT += --disable-libgcrypt
+else
+VLC_CONF_OPT += --enable-libgcrypt
+VLC_DEPENDENCIES += libgcrypt
+endif
+
+ifeq ($(BR2_PACKAGE_LIBMAD),)
+VLC_CONF_OPT += --disable-mad
+else
+VLC_CONF_OPT += --enable-mad
+VLC_DEPENDENCIES += libmad
+endif
+
+ifeq ($(BR2_PACKAGE_LIBMPEG2),)
+VLC_CONF_OPT += --disable-libmpeg2
+else
+VLC_CONF_OPT += --enable-libmpeg2
+VLC_DEPENDENCIES += libmpeg2
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPNG),)
+VLC_CONF_OPT += --disable-png
+else
+VLC_CONF_OPT += --enable-png
+VLC_DEPENDENCIES += libpng
+endif
+
+ifeq ($(BR2_PACKAGE_LIBSVG),)
+VLC_CONF_OPT += --disable-svg
+else
+VLC_CONF_OPT += --enable-svg
+VLC_DEPENDENCIES += libsvg
+endif
+
+ifeq ($(BR2_PACKAGE_LIBTHEORA),)
+VLC_CONF_OPT += --disable-theora
+else
+VLC_CONF_OPT += --enable-theora
+VLC_DEPENDENCIES += theora
+endif
+
+ifeq ($(BR2_PACKAGE_LIBUPNP),)
+VLC_CONF_OPT += --disable-upnp
+else
+VLC_CONF_OPT += --enable-upnp
+VLC_DEPENDENCIES += libupnp
+endif
+
+ifeq ($(BR2_PACKAGE_LIBVORBIS),)
+VLC_CONF_OPT += --disable-vorbis
+else
+VLC_CONF_OPT += --enable-vorbis
+VLC_DEPENDENCIES += libvorbis
+endif
+
+ifeq ($(BR2_PACKAGE_LIBV4L),)
+VLC_CONF_OPT += --disable-v4l2
+else
+VLC_CONF_OPT += --enable-v4l2
+VLC_DEPENDENCIES += libv4l
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXCB),)
+VLC_CONF_OPT += --disable-xcb
+else
+VLC_CONF_OPT += --enable-xcb
+VLC_DEPENDENCIES += libxcb
+endif
+
+ifeq ($(BR2_PACKAGE_LIBXML2),)
+VLC_CONF_OPT += --disable-libxml2
+else
+VLC_CONF_OPT += --enable-libxml2
+VLC_DEPENDENCIES += libxml2
+endif
+
+ifeq ($(BR2_PACKAGE_LIVE555),)
+VLC_CONF_OPT += --disable-live555
+else
+VLC_CONF_OPT += --disable-live555
+VLC_DEPENDENCIES += live555
+endif
+
+ifeq ($(BR2_PACKAGE_LUA),)
+VLC_CONF_OPT += --disable-lua
+else
+VLC_CONF_OPT += --disable-lua
+VLC_DEPENDENCIES += lua
+endif
+
+ifeq ($(BR2_PACKAGE_QT),)
+VLC_CONF_OPT += --disable-qt
+else
+VLC_CONF_OPT += --disable-qt
+VLC_DEPENDENCIES += qt
+endif
+
+ifeq ($(BR2_PACKAGE_SDL),)
+VLC_CONF_OPT += --disable-sdl
+else
+VLC_CONF_OPT += --disable-sdl
+VLC_DEPENDENCIES += sdl
+endif
+
+ifeq ($(BR2_PACKAGE_SDL_IMAGE),)
+VLC_CONF_OPT += --disable-sdl-image
+else
+VLC_CONF_OPT += --disable-sdl-image
+VLC_DEPENDENCIES += sdl-image
+endif
+
+ifeq ($(BR2_PACKAGE_SPEEX),)
+VLC_CONF_OPT += --disable-speex
+else
+VLC_CONF_OPT += --enable-speex
+VLC_DEPENDENCIES += speex
+endif
+
+ifeq ($(BR2_PACKAGE_TREMOR),)
+VLC_CONF_OPT += --disable-tremor
+else
+VLC_CONF_OPT += --enable-tremor
+VLC_DEPENDENCIES += tremor
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBX11),)
+VLC_CONF_OPT += --without-x
+else
+VLC_CONF_OPT += --with-x
+VLC_DEPENDENCIES += xlib_libX11
+endif
+
+$(eval $(autotools-package))