aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authorznerd <znerd@FreeBSD.org>2004-03-16 19:52:44 +0800
committerznerd <znerd@FreeBSD.org>2004-03-16 19:52:44 +0800
commit0b792a128d8c4eaf0492179628e35a0d664aef24 (patch)
tree94f8dbc6898995b2358576725582a89e07365b3a /multimedia
parent8302da489a8913e9aeb260fe2321725b6ba75583 (diff)
downloadfreebsd-ports-gnome-0b792a128d8c4eaf0492179628e35a0d664aef24.tar.gz
freebsd-ports-gnome-0b792a128d8c4eaf0492179628e35a0d664aef24.tar.zst
freebsd-ports-gnome-0b792a128d8c4eaf0492179628e35a0d664aef24.zip
Log:
[1] Enable DEBUG support [2] Resolve build problems on bento for non-i386 architectures [3] Introduce rtc interoperability PR: 64314 Submitted by: maintainer Reported by: znerd [1] kris [2] Michael Johnson <ahze@ahze.net> [3]
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/mplayer/Makefile51
-rw-r--r--multimedia/mplayer/files/patch-ad16
-rw-r--r--multimedia/mplayer/pkg-plist22
3 files changed, 74 insertions, 15 deletions
diff --git a/multimedia/mplayer/Makefile b/multimedia/mplayer/Makefile
index ee50ccea6422..40c2af33b741 100644
--- a/multimedia/mplayer/Makefile
+++ b/multimedia/mplayer/Makefile
@@ -74,6 +74,11 @@
# kernel config. This is standard for 5.x systems on I686_CPU and above.
# 4.x users will have to define this explicitly.
#
+# WITH_RTC
+# default: undefined
+# This option enables support for real time clock timing instead of
+# defaulting to usleep() timing. This can improve cpu load as well
+# as run-time accuracy.
#
# Feature options:
# These options influence, which libraries mplayer is linked to.
@@ -171,7 +176,7 @@
PORTNAME= mplayer
PORTVERSION= 0.92.0
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= multimedia audio ipv6
MASTER_SITES= http://www1.mplayerhq.hu/MPlayer/releases/ \
http://www2.mplayerhq.hu/MPlayer/releases/ \
@@ -220,8 +225,6 @@ WANT_SDL= yes
USE_REINPLACE= yes
MAN1= mplayer.1
MANCOMPRESSED= no
-INSTALLS_SHLIB= yes
-LDCONFIG_DIRS= %%PREFIX%%/lib %%PREFIX%%/lib/mplayer/vidix
CONFFILES= codecs.conf example.conf input.conf menu.conf
DOCFILES= bugreports.html cd-dvd.html codecs-in.html \
@@ -236,6 +239,21 @@ TOOLFILES= calcbpp.pl countquant.pl \
.include <bsd.port.pre.mk>
+#Building of vidix dependent shared libs is only possible
+#on i386 at the moment.
+.if ${ARCH} == "i386"
+INSTALLS_SHLIB= yes
+LDCONFIG_DIRS= %%PREFIX%%/lib %%PREFIX%%/lib/mplayer/vidix
+PLIST_SUB+= VIDIX=""
+.else
+CONFIGURE_ARGS+=--disable-vidix
+PLIST_SUB+= VIDIX="@comment "
+.endif
+
+#.if exists(${LOCALBASE}/modules/rtc.ko)
+#WITH_RTC= yes
+#.endif
+
.if exists(${LOCALBASE}/lib/libartsc.so.0)
WITH_ARTS= yes
.endif
@@ -321,6 +339,10 @@ WITH_LZO= yes
WITH_FREETYPE= yes
.endif
+.if defined (DEBUG)
+CONFIGURE_ARGS+= --enable-debug
+.endif
+
.if defined(WITH_OPTIMIZED_CFLAGS)
CFLAGS+= -O3 -ffast-math -fomit-frame-pointer
.endif
@@ -332,6 +354,15 @@ PLIST_SUB+= GMPLAYER=""
PLIST_SUB+= GMPLAYER="@comment "
.endif
+.if defined(WITH_RTC)
+BUILD_DEPENDS+= ${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc
+RUN_DEPENDS+= ${LOCALBASE}/modules/rtc.ko:${PORTSDIR}/emulators/rtc
+CONFIGURE_ARGS+= --enable-rtc
+CONFIGURE_ENV+= CFLAGS+="-I/${LOCALBASE}/include"
+.else
+CONFIGURE_ARGS+= --disable-rtc
+.endif
+
.if defined(WITH_GUI)
USE_GNOME+= gtk12
RUN_DEPENDS+= ${LOCALBASE}/share/mplayer/Skin:${PORTSDIR}/multimedia/mplayer-skins
@@ -553,6 +584,20 @@ post-patch:
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
@${REINPLACE_CMD} -Ee 's#-pthread|-lc_r#${PTHREAD_LIBS}#g' \
${WRKSRC}/configure
+.if defined(WITH_RTC)
+ @${REINPLACE_CMD} -e \
+ 's|<linux/rtc.h>|<rtc.h>|' \
+ ${WRKSRC}/mplayer.c
+ @${REINPLACE_CMD} -e \
+ 's|RTC_IRQP_SET|RTCIO_IRQP_SET|' \
+ ${WRKSRC}/mplayer.c
+ @${REINPLACE_CMD} -e \
+ 's|RTC_PIE_ON|RTCIO_PIE_ON|' \
+ ${WRKSRC}/mplayer.c
+ @${REINPLACE_CMD} -e \
+ 's|rtc_fd|rtc|' \
+ ${WRKSRC}/mplayer.c
+.endif
pre-configure:
.if defined(WITH_LIBDVDREAD)
diff --git a/multimedia/mplayer/files/patch-ad b/multimedia/mplayer/files/patch-ad
index 3c967cd0d615..b9b213de18e9 100644
--- a/multimedia/mplayer/files/patch-ad
+++ b/multimedia/mplayer/files/patch-ad
@@ -1,5 +1,5 @@
--- configure.orig Sat Aug 9 16:12:30 2003
-+++ configure Tue Dec 23 18:52:29 2003
++++ configure Mon Mar 15 20:51:21 2004
@@ -300,7 +300,7 @@
@@ -104,6 +104,20 @@
echores "yes (using $_ld_pthread)"
+@@ -3819,11 +3781,11 @@
+
+
+ echocheck "RTC"
+-if linux ; then
++if freebsd ; then
+ if test "$_rtc" = auto ; then
+ cat > $TMPC << EOF
+ #include <sys/ioctl.h>
+-#include <linux/rtc.h>
++#include <rtc.h>
+ int main(void) { return RTC_IRQP_READ; }
+ EOF
+ _rtc=no
@@ -4848,7 +4810,7 @@
CFLAGS="$CFLAGS -D_REENTRANT"
elif bsd ; then
diff --git a/multimedia/mplayer/pkg-plist b/multimedia/mplayer/pkg-plist
index 1e1c6ece95eb..bb64540ab50a 100644
--- a/multimedia/mplayer/pkg-plist
+++ b/multimedia/mplayer/pkg-plist
@@ -13,15 +13,15 @@ bin/mplayer
%%PORTDOCS%%share/doc/mplayer/sound.html
%%PORTDOCS%%share/doc/mplayer/video.html
%%PORTDOCS%%share/doc/mplayer/users_against_developers.html
-lib/libdha.so.0
-lib/libdha-0.so.1
-lib/mplayer/vidix/cyberblade_vid.so
-lib/mplayer/vidix/mach64_vid.so
-lib/mplayer/vidix/mga_crtc2_vid.so
-lib/mplayer/vidix/mga_vid.so
-lib/mplayer/vidix/pm3_vid.so
-lib/mplayer/vidix/radeon_vid.so
-lib/mplayer/vidix/rage128_vid.so
+%%VIDIX%%lib/libdha.so.0
+%%VIDIX%%lib/libdha-0.so.1
+%%VIDIX%%lib/mplayer/vidix/cyberblade_vid.so
+%%VIDIX%%lib/mplayer/vidix/mach64_vid.so
+%%VIDIX%%lib/mplayer/vidix/mga_crtc2_vid.so
+%%VIDIX%%lib/mplayer/vidix/mga_vid.so
+%%VIDIX%%lib/mplayer/vidix/pm3_vid.so
+%%VIDIX%%lib/mplayer/vidix/radeon_vid.so
+%%VIDIX%%lib/mplayer/vidix/rage128_vid.so
share/mplayer/tools/calcbpp.pl
share/mplayer/tools/countquant.pl
share/mplayer/tools/dvd2divxscript.pl
@@ -38,5 +38,5 @@ share/mplayer/menu.conf
@dirrm share/mplayer/tools
@unexec rmdir %D/share/mplayer 2>/dev/null || true
%%PORTDOCS%%@dirrm share/doc/mplayer
-@dirrm lib/mplayer/vidix
-@dirrm lib/mplayer
+%%VIDIX%%@dirrm lib/mplayer/vidix
+%%VIDIX%%@dirrm lib/mplayer