Date: 18 Jul 2011 23:42:13 -0300 From: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: riggs@rrr.de Subject: ports/159021: [PATCH] multimedia/mplayer: (and multimedia/mencoder) Fix build with multimedia/libass installed Message-ID: <20110719024237.38813.qmail@exxodus.fedaykin.here> Resent-Message-ID: <201107190250.p6J2o8K8016635@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 159021 >Category: ports >Synopsis: [PATCH] multimedia/mplayer: (and multimedia/mencoder) Fix build with multimedia/libass installed >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jul 19 02:50:07 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Mario Sergio Fujikawa Ferreira >Release: FreeBSD 8.2-STABLE amd64 >Organization: >Environment: System: FreeBSD exxodus.fedaykin.here 8.2-STABLE FreeBSD 8.2-STABLE #12: Sun Jul 10 17:40:20 BRT 2011 >Description: - Fix build when multimedia/libass is installed. - Unfortunately, mplayer's configure honors neither --disable-ass nor --disable-ass-internal. Therefore, we must circumvent this glitch with some port Makefile magic: 1) Allow user to decide if he wants to install libass 2) If it is already installed, override user decision to "always depend on it" 3) It libass is installed, patch mplayer Makefile accordingly 4) Then, REINPLACE with correct libass CFLAGS to fix codec-cfg.c build - Follow patches for both mplayer and mencoder. Port maintainer (riggs@rrr.de) is cc'd. Generated with FreeBSD Port Tools 0.99 >How-To-Repeat: >Fix: --- mplayer-1.0.r20110329_2.patch begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/mplayer/Makefile,v retrieving revision 1.206 diff -d -u -u -r1.206 Makefile --- Makefile 26 Jun 2011 05:07:09 -0000 1.206 +++ Makefile 19 Jul 2011 02:36:08 -0000 @@ -51,6 +51,7 @@ OPTIONS+= THEORA "Enable ogg theora video support" off OPTIONS+= VPX "Enable VP8 video via libvpx" off OPTIONS+= SCHROEDINGER "Dirac codec via libschroedinger" off +OPTIONS+= ASS "Enable ASS/SSA subtitle rendering" Off .if !defined(PACKAGE_BUILDING) OPTIONS+= WIN32 "Enable win32 codec set on the IA32 arch" on .endif @@ -73,6 +74,12 @@ CONFFILES= example.conf input.conf menu.conf dvb-menu.conf +# fix for bug when libass is installed, mplayer configure does not +# uphold --disable-ass +.if exists(${LOCALBASE}/lib/libass.so) +WITH_ASS= yes +.endif + .include <bsd.port.pre.mk> .if ${ARCH} == "sparc64" @@ -93,6 +100,15 @@ .include "${.CURDIR}/Makefile.options" +.if defined(WITH_ASS) +LIB_DEPENDS+= ass.5:${PORTSDIR}/multimedia/libass +USE_GNOME+= pkgconfig +LIBASS_PKGCONFIG_CFLAGS= pkg-config --cflags --silence-errors libass +.else +CONFIGURE_ARGS+= --disable-ass --disable-ass-internal +LIBASS_PKGCONFIG_CFLAGS= ${ECHO_CMD} +.endif + .if !defined(WITHOUT_GUI) && !defined(WITHOUT_X11) MLINKS+= mplayer.1 gmplayer.1 PLIST_SUB+= GMPLAYER="" @@ -266,6 +282,9 @@ 's|irqp = 1024|irqp = ${DEFAULT_KERN_HZ}|' \ ${WRKSRC}/mplayer.c .endif + @${REINPLACE_CMD} \ + -e 's|%%LIBASS_PKGCONFIG_CFLAGS%%|${LIBASS_PKGCONFIG_CFLAGS}|' \ + ${BUILD_WRKSRC}/${MAKEFILE} post-configure: @${REINPLACE_CMD} -e 's#-pthread#${PTHREAD_LIBS}#g' \ Index: files/patch-Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/mplayer/files/patch-Makefile,v retrieving revision 1.1 diff -d -u -u -r1.1 patch-Makefile --- files/patch-Makefile 21 Apr 2010 13:07:22 -0000 1.1 +++ files/patch-Makefile 19 Jul 2011 02:36:08 -0000 @@ -1,6 +1,18 @@ ---- Makefile.orig 2010-01-03 17:39:16.000000000 +0100 -+++ Makefile 2010-01-06 21:15:58.372494408 +0100 -@@ -914,20 +914,16 @@ +--- Makefile.orig 2011-03-28 12:50:56.000000000 -0300 ++++ Makefile 2011-07-18 23:23:16.000000000 -0300 +@@ -814,8 +814,10 @@ + mencoder$(EXESUF) mplayer$(EXESUF): + $(CC) -o $@ $^ $(EXTRALIBS) + ++CFLAGS_LIBASS := $(shell %%LIBASS_PKGCONFIG_CFLAGS%%) ++ + codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h +- $(HOST_CC) -O -DCODECS2HTML -I. -Iffmpeg -o $@ $< ++ $(HOST_CC) -O -DCODECS2HTML $(CFLAGS_LIBASS) -I. -Iffmpeg -o $@ $< + + codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf + ./$^ > $@ +@@ -890,20 +892,16 @@ install: $(INSTALL_TARGETS-yes) install-dirs: --- mplayer-1.0.r20110329_2.patch ends here --- --- mencoder-1.0.r20110329_1.patch begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/mencoder/Makefile,v retrieving revision 1.27 diff -d -u -u -r1.27 Makefile --- Makefile 23 Jun 2011 18:09:45 -0000 1.27 +++ Makefile 19 Jul 2011 02:40:27 -0000 @@ -41,6 +41,7 @@ OPTIONS+= VPX "Enable VP8 video via libvpx" off OPTIONS+= DIRAC "Enable dirac video codec support" off OPTIONS+= SCHROEDINGER "Dirac codec via libschroedinger" off +OPTIONS+= ASS "Enable ASS/SSA subtitle rendering" Off OPTIONS+= REALPLAYER "Enable real player plugin" off OPTIONS+= LIVEMEDIA "Enable LIVE555 streaming support" off OPTIONS+= SMB "Enable Samba input support" off @@ -64,6 +65,12 @@ psnr-video.sh qepdvcd.sh subedit.pl \ subsearch.sh w32codec_dl.pl wma2ogg.pl \ +# fix for bug when libass is installed, mplayer configure does not +# uphold --disable-ass +.if exists(${LOCALBASE}/lib/libass.so) +WITH_ASS= yes +.endif + .include <bsd.port.pre.mk> LIB_DEPENDS+= mp3lame.0:${PORTSDIR}/audio/lame @@ -90,6 +97,15 @@ .include "${.CURDIR}/../mplayer/Makefile.options" +.if defined(WITH_ASS) +LIB_DEPENDS+= ass.5:${PORTSDIR}/multimedia/libass +USE_GNOME+= pkgconfig +LIBASS_PKGCONFIG_CFLAGS= pkg-config --cflags --silence-errors libass +.else +CONFIGURE_ARGS+= --disable-ass --disable-ass-internal +LIBASS_PKGCONFIG_CFLAGS= ${ECHO_CMD} +.endif + .if defined(WITH_FONTCONFIG) LIB_DEPENDS+= fontconfig.1:${PORTSDIR}/x11-fonts/fontconfig .else @@ -161,6 +177,9 @@ 's|/usr/\\:local/\\:etc/\\:mplayer|${DATADIR:S/\//\/\\\:/g}|g ; \ s|/dev/\\:(dvd[[:alnum:]]*[[:>:]])|${DEFAULT_DVD_DEVICE:S/dev\//dev\/\\\:/}|g ; \ s|/dev/\\:(cdrom[[:alnum:]]*[[:>:]])|${DEFAULT_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g' + @${REINPLACE_CMD} \ + -e 's|%%LIBASS_PKGCONFIG_CFLAGS%%|${LIBASS_PKGCONFIG_CFLAGS}|' \ + ${BUILD_WRKSRC}/${MAKEFILE} post-configure: @${REINPLACE_CMD} -e 's#-pthread#${PTHREAD_LIBS}#g' \ --- mencoder-1.0.r20110329_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110719024237.38813.qmail>