aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2011-07-20 02:52:34 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2011-07-20 02:52:34 +0000
commit472f73f0c08385ad7560de67049c7065d8192834 (patch)
treee54c305fefe30b615643a3750dd3ba12ef066a1a
parent2f61b9072e4c71f621b8d2f248af0445e0f79f9b (diff)
downloadports-472f73f0c08385ad7560de67049c7065d8192834.tar.gz
ports-472f73f0c08385ad7560de67049c7065d8192834.zip
Notes
-rw-r--r--multimedia/mencoder/Makefile19
-rw-r--r--multimedia/mplayer/Makefile19
-rw-r--r--multimedia/mplayer/files/patch-Makefile18
3 files changed, 53 insertions, 3 deletions
diff --git a/multimedia/mencoder/Makefile b/multimedia/mencoder/Makefile
index cfce4e7de66e..10128fc70092 100644
--- a/multimedia/mencoder/Makefile
+++ b/multimedia/mencoder/Makefile
@@ -41,6 +41,7 @@ OPTIONS+= X264 "Enable x264 (H.264) video codec support" on
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 @@ TOOLFILES= aconvert.sh binary_codecs.sh calcbpp.pl \
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 @@ ALL_TARGET= mencoder
.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 @@ post-patch:
'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' \
diff --git a/multimedia/mplayer/Makefile b/multimedia/mplayer/Makefile
index 1aaefe0d2d26..1557b24e4e7d 100644
--- a/multimedia/mplayer/Makefile
+++ b/multimedia/mplayer/Makefile
@@ -51,6 +51,7 @@ OPTIONS+= SPEEX "Enable speex audio codec support" on
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 @@ SUB_FILES= pkg-message
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 @@ CONFIGURE_ARGS+= --disable-ssse3 \
.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 @@ post-patch:
'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' \
diff --git a/multimedia/mplayer/files/patch-Makefile b/multimedia/mplayer/files/patch-Makefile
index 47bf54ebeffc..d6105221e21a 100644
--- a/multimedia/mplayer/files/patch-Makefile
+++ b/multimedia/mplayer/files/patch-Makefile
@@ -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: