ports/64314: features and bugfixes for mplayer
Thomas E. Zander
riggs at rrr.de
Mon Mar 15 21:10:08 UTC 2004
>Number: 64314
>Category: ports
>Synopsis: features and bugfixes for mplayer
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Mar 15 13:10:07 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Thomas E. Zander
>Release: FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD o503.hadiko.de 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Tue Mar 9 02:02:04 CET 2004 root at o503.hadiko.de:/usr/obj/usr/src/sys/MARVIN i386
>Description:
This update to multimedia/mplayer is a combined feature request/bugfix release:
o enable DEBUG support (feature request by Ernst de Haan <znerd at freebsd.org>)
o resolve build problems on bento for non-i386 architectures
(reported by Kris Kennaway <kris at obsecurity.org>)
o introduce rtc interoperability (suggested by Michael Johnson <ahze at ahze.net>)
Please close pr 63913 when committing this, it contains Michael's patches.
>How-To-Repeat:
>Fix:
Please apply to multimedia/mplayer:
diff -ruN mplayer-old/Makefile mplayer/Makefile
--- mplayer-old/Makefile Mon Mar 15 18:09:32 2004
+++ mplayer/Makefile Mon Mar 15 21:48:55 2004
@@ -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 @@
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 @@
.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_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="@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 @@
${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 -ruN mplayer-old/files/patch-ad mplayer/files/patch-ad
--- mplayer-old/files/patch-ad Mon Dec 29 00:06:50 2003
+++ mplayer/files/patch-ad Mon Mar 15 20:52:07 2004
@@ -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 -ruN mplayer-old/pkg-plist mplayer/pkg-plist
--- mplayer-old/pkg-plist Wed Mar 26 17:17:59 2003
+++ mplayer/pkg-plist Mon Mar 15 21:10:13 2004
@@ -13,15 +13,15 @@
%%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 @@
@dirrm share/mplayer/tools
@unexec rmdir %D/share/mplayer 2>/dev/null || true
%%PORTDOCS%%@dirrm share/doc/mplayer
- at dirrm lib/mplayer/vidix
- at dirrm lib/mplayer
+%%VIDIX%%@dirrm lib/mplayer/vidix
+%%VIDIX%%@dirrm lib/mplayer
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list