aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/mplayer
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2011-07-20 10:52:34 +0800
committerlioux <lioux@FreeBSD.org>2011-07-20 10:52:34 +0800
commit1f7a368eaab1cf44893a76d8990b9936fcd9e2db (patch)
treed53da60f8e0122cc7112d371f55f885b9854438e /multimedia/mplayer
parent0ffd441063edca4febd5ea55310de02d7e155b36 (diff)
downloadfreebsd-ports-gnome-1f7a368eaab1cf44893a76d8990b9936fcd9e2db.tar.gz
freebsd-ports-gnome-1f7a368eaab1cf44893a76d8990b9936fcd9e2db.tar.zst
freebsd-ports-gnome-1f7a368eaab1cf44893a76d8990b9936fcd9e2db.zip
o Fix build when multimedia/libass is already installed when one
tries to build multimedia/mplayer * Add option 'ASS "Enable ASS/SSA subtitle rendering"' with default off - However, override user decision to on if multimedia/libass is already installed: mplayer does not uphold configure options disabling dependency on external port. * Do not bump PORTREVISION since nothing has really changed for users who didn't have multimedia/libass on their systems PR: ports/159021 Approved by: maintainer
Diffstat (limited to 'multimedia/mplayer')
-rw-r--r--multimedia/mplayer/Makefile19
-rw-r--r--multimedia/mplayer/files/patch-Makefile18
2 files changed, 34 insertions, 3 deletions
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: