From 61c98b57b74f1776a763a4befc3684faf0f45548 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Tue, 28 Jan 2014 19:24:24 -0800 Subject: fix parallel building in the debian package: ffmpeg at least was only building serially before --- debian/rules | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/debian/rules b/debian/rules index 5b28c4b..5671493 100755 --- a/debian/rules +++ b/debian/rules @@ -5,39 +5,52 @@ ifeq ($(DEB_HOST_ARCH_CPU),$(filter $(DEB_HOST_ARCH_CPU),powerpc sparc)) export CC=gcc-4.8 # fixes #73363 endif +# To enable parallel building: +# You can either set DEB_BUILD_OPTIONS=paralell= in your build environment +# or provide the -j option to debuild or dpkg-buildpackage, which +# ammounts to the same thing. +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + # use MFLAGS, rather than MAKEFLAGS as the latter is mysteriously given the "w" flag without "-" + MFLAGS += -j$(NUMJOBS) + WAFFLAGS += -j$(NUMJOBS) +endif + # make .PHONY all the targets that have name collisions with the scripts # see http://www.debian.org/doc/manuals/maint-guide/dreq.en.html#rules .PHONY: clean build install # Apparently, the above isn't enough because of the "%" target. Make the problematic targets explicit clean: - exec dh $@ --parallel + exec dh $@ build: - exec dh $@ --parallel + exec dh $@ install: - exec dh $@ --parallel -# handle all other targets in the usual way + exec dh $@ +# Handle all other targets in the usual way. +# The --parallel flag to dh doesn't seem to have the intended effect +# so leave it out. %: - exec dh $@ --parallel + exec dh $@ + # this should really create multiple shared object debian packages but # this will do for now - # the dependencies must be built before mpv is configured ffmpeg_config: scripts/ffmpeg-config ffmpeg_build:ffmpeg_config - scripts/ffmpeg-build + scripts/ffmpeg-build $(MFLAGS) libass_config: scripts/libass-config libass_build:libass_config - scripts/libass-build + scripts/libass-build $(MFLAGS) # put the config in the right place and drop the local/ since it's package managed now override_dh_auto_configure:ffmpeg_build libass_build scripts/mpv-config --prefix=/usr --confdir=/etc/mpv override_dh_auto_build: - scripts/mpv-build + scripts/mpv-build $(WAFLAGS) # call waf to install to the debian packageing dir override_dh_auto_install: -- cgit v1.2.3 From 9ce245ecf9b42c22e69048912d3003b01a6c43c9 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Wed, 29 Jan 2014 16:26:25 -0800 Subject: allow user to specify ffmpeg options from either or both the ffmpeg_options file and arguments to the scripts/ffmpeg-config script --- scripts/ffmpeg-config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ffmpeg-config b/scripts/ffmpeg-config index 2213171..57f2bd1 100755 --- a/scripts/ffmpeg-config +++ b/scripts/ffmpeg-config @@ -3,8 +3,9 @@ set -e BUILD="$(pwd)" +USER_OPTS="$@" if test -f "$BUILD"/ffmpeg_options ; then - USER_OPTS=$(cat "$BUILD"/ffmpeg_options) + USER_OPTS="$(cat "$BUILD"/ffmpeg_options) $USER_OPTS" fi OPTIONS="--enable-gpl --enable-avresample --disable-debug --disable-doc $USER_OPTS" -- cgit v1.2.3 From a69576067aada36feb390179d36a8a2e0d85c667 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Wed, 29 Jan 2014 16:37:52 -0800 Subject: debian package: build-depend and enable libmp3lame and libx264 in ffmpeg add note to package description about what this package is and where it came from --- debian/control | 8 +++++++- debian/rules | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index e929f4f..d961d69 100644 --- a/debian/control +++ b/debian/control @@ -28,6 +28,7 @@ Build-Depends: liblcms2-dev, liblircclient-dev, liblua5.1-0-dev, + libmp3lame-dev, libncurses5-dev, libncursesw5-dev, libpulse-dev, @@ -38,6 +39,7 @@ Build-Depends: libva-dev, libvdpau-dev, libwayland-dev [linux-any], + libx264-dev, libx11-dev, libxext-dev, libxinerama-dev, @@ -52,6 +54,10 @@ Build-Depends: Package: mpv Architecture: any -Depends: ${shlibs:Depends},debconf +Depends: ${shlibs:Depends}, ${misc:Depends} Description: mplayer/mplayer2 based video player MPV is a versatile CLI movie player, based on mplayer and mplayer2. + . + This package is not part of Debian. It was created by mpv-build scripts with + statically linked ffmpeg (not libav) and libass from upstream. +Homepage:https://github.com/mpv-player/mpv-build diff --git a/debian/rules b/debian/rules index 5671493..6fee1a4 100755 --- a/debian/rules +++ b/debian/rules @@ -32,12 +32,11 @@ install: %: exec dh $@ - # this should really create multiple shared object debian packages but # this will do for now # the dependencies must be built before mpv is configured ffmpeg_config: - scripts/ffmpeg-config + scripts/ffmpeg-config --enable-libx264 --enable-libmp3lame ffmpeg_build:ffmpeg_config scripts/ffmpeg-build $(MFLAGS) libass_config: -- cgit v1.2.3 From 162ab271b59198b2fd77adfd5090637808c04a52 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Wed, 29 Jan 2014 18:57:49 -0800 Subject: update debian changelog --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 30fd4ef..e7475cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mpv (1:0.3.3-1) UNRELEASED; urgency=medium + + * enable libx264 and libmp3lame in ffmpeg build + * make building on multiple cores actually work + + -- Kevin Mitchell Wed, 29 Jan 2014 18:46:08 -0800 + mpv (1:0.3.3) UNRELEASED; urgency=low * reimagine for waf build system -- cgit v1.2.3 From f72489f2b692760f91510b30210f79c35abaaaa0 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Wed, 29 Jan 2014 19:24:25 -0800 Subject: add notes about non-free codecs to README.debian --- debian/README.debian | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/README.debian b/debian/README.debian index b3e2ac3..d6292e5 100644 --- a/debian/README.debian +++ b/debian/README.debian @@ -4,3 +4,12 @@ mpv for Debian You can build the package using 'debuild -uc -us -b -j'. -- Wessel Dankers , Sun, 06 Jan 2013 13:44:11 +0100 + + libx264 and libmp3lame are already enabled. To enable + non-free codecs, install libfdk-aac-dev and add the options to the + mpv-build/ffmpeg_options file + + echo --enable-libfdk-aac >> ffmpeg_options + echo --enable-nonfree >> ffmpeg_options + +-- Kevin Mitchell Wed, 29 Jan 2014 19:21:44 -0800 -- cgit v1.2.3