aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/mplayerxp
diff options
context:
space:
mode:
authorlioux <lioux@FreeBSD.org>2002-11-28 04:02:54 +0800
committerlioux <lioux@FreeBSD.org>2002-11-28 04:02:54 +0800
commiteec1f3f748fb134a24fcf176e630b279725d7112 (patch)
tree7a65fd8b95f25b9d6c6ca94a33c73cb9a0444b6a /multimedia/mplayerxp
parent7d20eca1550f8e6f8e452de1b136b83efb3046a6 (diff)
downloadfreebsd-ports-gnome-eec1f3f748fb134a24fcf176e630b279725d7112.tar.gz
freebsd-ports-gnome-eec1f3f748fb134a24fcf176e630b279725d7112.tar.zst
freebsd-ports-gnome-eec1f3f748fb134a24fcf176e630b279725d7112.zip
o After repo copy from graphics/mplayer:
- Update to mplayerxp version 0.1.9 - Take over maintainership Repo copied by: joe (cvs hat) Approved by: knu (portmgr hat)
Diffstat (limited to 'multimedia/mplayerxp')
-rw-r--r--multimedia/mplayerxp/Makefile460
-rw-r--r--multimedia/mplayerxp/distinfo2
-rw-r--r--multimedia/mplayerxp/files/install-user55
-rw-r--r--multimedia/mplayerxp/files/patch-ad98
-rw-r--r--multimedia/mplayerxp/files/patch-ae62
-rw-r--r--multimedia/mplayerxp/files/patch-loader::Makefile11
-rw-r--r--multimedia/mplayerxp/files/patch-mplayerxp::Makefile26
-rw-r--r--multimedia/mplayerxp/files/patch-mplayerxp::libdha::mmi.c10
-rw-r--r--multimedia/mplayerxp/files/patch-mplayerxp::vidix::drivers::radeon_vid.c10
-rw-r--r--multimedia/mplayerxp/pkg-comment2
-rw-r--r--multimedia/mplayerxp/pkg-descr15
-rw-r--r--multimedia/mplayerxp/pkg-message18
-rw-r--r--multimedia/mplayerxp/pkg-plist59
13 files changed, 330 insertions, 498 deletions
diff --git a/multimedia/mplayerxp/Makefile b/multimedia/mplayerxp/Makefile
index 31b630f0ff76..acbdad62b31a 100644
--- a/multimedia/mplayerxp/Makefile
+++ b/multimedia/mplayerxp/Makefile
@@ -1,283 +1,273 @@
-# New ports collection makefile for: mplayer
+# New ports collection makefile for: mplayerxp
# Date created: 10 August 2001
# Whom: Thomas E. Zander
# with lots of help from Vladimir Kushnir
# $FreeBSD$
#
-PORTNAME= mplayer
-PORTVERSION= 0.90.0.10
-PORTREVISION= 1
-CATEGORIES= graphics
-MASTER_SITES= http://ftp.mplayerhq.hu/MPlayer/releases/ \
- http://www.mplayerhq.hu/MPlayer/releases/ \
- http://www2.mplayerhq.hu/MPlayer/releases/ \
- http://ftp.lug.udel.edu/MPlayer/releases/ \
- ftp://ftp.mplayerhq.hu/MPlayer/releases/ \
- ftp://ftp2.mplayerhq.hu/MPlayer/releases/ \
- ftp://ftp.lug.udel.edu/MPlayer/releases/ \
- http://www.rrr.de/~riggs/mplayer/
-DISTNAME= MPlayer-0.90pre10
+PORTNAME= mplayerxp
+PORTVERSION= 0.1.9
+CATEGORIES= multimedia audio
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ${PORTNAME}
-MAINTAINER= riggs@rrr.de
+MAINTAINER= lioux@FreeBSD.org
-LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png \
- iconv.3:${PORTSDIR}/converters/libiconv \
- mp3lame.0:${PORTSDIR}/audio/lame
+LIB_DEPENDS= iconv.3:${PORTSDIR}/converters/libiconv \
+ jpeg.9:${PORTSDIR}/graphics/jpeg \
+ mp3lame.0:${PORTSDIR}/audio/lame \
+ png.5:${PORTSDIR}/graphics/png
+RUN_DEPENDS= ${LOCALBASE}/share/mplayer/fonts:${PORTSDIR}/multimedia/mplayer-fonts
+ONLY_FOR_ARCHS= i386
USE_BZIP2= yes
-USE_GMAKE= yes
-USE_XLIB= yes
-GNU_CONFIGURE= yes
-CONFIGURE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
- PTHREAD_LIBS=${PTHREAD_LIBS}
-CONFIGURE_ARGS= --with-extralibdir=${LOCALBASE}/lib \
- --with-extraincdir=${LOCALBASE}/include \
- --disable-vidix
-
USE_GNOMENG= yes
-WANT_GNOME= yes
-MAN1= mplayer.1
-MLINKS= mplayer.1 mencoder.1
-MANCOMPRESSED= no
-
-CONFFILES= codecs.conf example.conf input.conf
-DOCFILES= bugreports.html cd-dvd.html codecs-in.html \
- codecs.html documentation.html faq.html skin-en.html \
- encoding.html formats.html sound.html \
- users_against_developers.html \
- video.html
-
-.include <bsd.port.pre.mk>
+USE_GNOME= gtk12
+USE_XLIB= yes
+USE_GMAKE= yes
+USE_REINPLACE= yes
+HAS_CONFIGURE= yes
-.if exists(${LOCALBASE}/lib/libdvdcss.so.2)
-WITH_DVD= yes
-.endif
+MAN1= mplayerxp.1
-.if exists(${LOCALBASE}/lib/libvga.so.1)
-WITH_SVGALIB= yes
-.endif
+SDL_CONFIG?= "${LOCALBASE}/bin/sdl11-config"
+WIN32_CODEC_PREFIX= ${LOCALBASE}/lib/win32
-.if exists(${LOCALBASE}/lib/libSDL-1.1.so.4)
-WITH_SDL= yes
-.endif
+# dirs to create before installation
+DIRS_TO_CREATE= etc/mplayerxp \
+ lib/mplayerxp/codecs \
+ lib/mplayerxp/wine
-.if exists(${LOCALBASE}/lib/libvorbis.so.2)
-WITH_VORBIS= yes
-.endif
+.include <bsd.port.pre.mk>
-.if exists(${LOCALBASE}/lib/libjpeg.so.9)
-LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg
+# add this after <bsd.port.pre.mk> so that we inherit /etc/make.conf
+CONFIGURE_ARGS+= --with-extralibdir=${LOCALBASE}/lib \
+ --with-extraincdir=${LOCALBASE}/include \
+ --with-x11incdir=${X11BASE}/include \
+ --with-x11libdir=${X11BASE}/lib \
+ --cc=${CC} \
+ --prefix=${PREFIX} \
+ --confdir=${PREFIX}/etc/${PORTNAME} \
+ --datadir=${LOCALBASE}/share/mplayer \
+ --disable-cdparanoia \
+ --disable-fbdev \
+ --disable-lirc \
+ --disable-rtc \
+ --disable-tv-v4l
+# insure CC,LD safeness
+MAKE_ARGS+= CC="${CC}" LD="${LD}"
+
+##
+## Feature detection
+##
+
+# KDE aRts
+.if exists(${LOCALBASE}/lib/libartsc.so)
+WITH_ARTS=yes
+.endif
+# xine libdvdnav
+.if exists(${LOCALBASE}/lib/libdvdnav.so)
+WITH_DVD=yes
+WITH_LIBDVDNAV=yes
+.endif
+# ogle's libdvdread (dvd support)
+.if exists(${LOCALBASE}/lib/libdvdread.a)
+WITH_DVD=yes
+.endif
+# sdl
+.if exists(${LOCALBASE}/lib/libSDL-1.1.a)
+WITH_SDL=yes
+.endif
+# sdl_image
+.if exists(${LOCALBASE}/lib/libSDL_image.a)
+WITH_SDL_IMAGE=yes
+.endif
+# xvid
+.if exists(${LOCALBASE}/lib/libxvidcore.so)
+WITH_XVID=yes
+.endif
+
+##
+## Feature activation and Library Dependencies
+##
+
+# libdvdnav does not currently work
+.undef WITH_LIBDVDNAV
+WITHOUT_LIBDVDNAV=yes
+
+# compilation optimizations
+.ifdef(WITH_OPTIMIZED_CFLAGS)
+CFLAGS+= -O3 -ffast-math -fomit-frame-pointer
+.endif
+# 3dnow optimizations
+.if !defined(WITHOUT_3DNOW) && ${OSVERSION} >= 400021
+CONFIGURE_ARGS+= --enable-3dnow --enable-3dnowex
.endif
-
-.if exists(${X11BASE}/bin/xanim)
-WITH_XANIM= yes
+# sse optimizations
+.if !defined(WITHOUT_SSE) && ${OSVERSION} >= 400021
+CONFIGURE_ARGS+= --enable-sse --enable-sse2
.endif
-
-.if exists(${LOCALBASE}/lib/RealPlayer8/realplay)
-WITH_REALPLAYER= yes
+# KDE aRts
+.ifdef(WITH_ARTS)
+LIB_DEPENDS+= artsc.0:${PORTSDIR}/audio/arts
.endif
+# dvd support
+.ifdef(WITH_DVD)
+LIB_DEPENDS+= dvdread.2:${PORTSDIR}/multimedia/libdvdread
-.if exists(${LOCALBASE}/live/liveMedia/libliveMedia.a)
-WITH_LIVEMEDIA= yes
+CONFIGURE_ARGS+= --with-csslibdir=${LOCALBASE}/lib
.endif
+# xine libdvdnav
+.if defined(WITH_LIBDVDNAV) && !defined(WITHOUT_LIBDVDNAV)
+LIB_DEPENDS+= dvdnav.1:${PORTSDIR}/graphics/libdvdnav
-.if defined(WITH_OPTIMIZED_CFLAGS)
-CFLAGS+= -O3 -ffast-math -fomit-frame-pointer
+CONFIGURE_ARGS+= --with-libdvdnav=${LOCALBASE}
.endif
+# sdl
+.ifdef(WITH_SDL)
+LIB_DEPENDS+= SDL-1.1.4:${PORTSDIR}/devel/sdl12
-.if ${HAVE_GNOME:Mgtk12}!=""
-WITH_GUI= yes
-PLIST_SUB+= GMPLAYER=""
+CONFIGURE_ARGS+= --enable-sdl
+CONFIGURE_ENV+= SDL_CONFIG=${SDL_CONFIG}
.else
-PLIST_SUB+= GMPLAYER="@comment "
-.endif
-
-.if defined(WITH_GUI)
-USE_GNOME+= gtk12
-PKGNAMESUFFIX= -gtk
-CONFIGURE_ARGS+= --enable-gui
+CONFIGURE_ARGS+= --disable-sdl
.endif
+# sdl_image
+.ifdef(WITH_SDL_IMAGE)
+LIB_DEPENDS+= SDL_image.10:${PORTSDIR}/graphics/sdl_image
-.if defined(WITH_DVD)
-.if !defined(WITH_LIBDVDREAD)
-LIB_DEPENDS+= dvdcss.2:${PORTSDIR}/graphics/libdvdcss
+CONFIGURE_ARGS+= --enable-sdl-image
.else
-LIB_DEPENDS+= dvdread.2:${PORTSDIR}/graphics/libdvdread
-.endif
-.endif
-
-.if defined(WITH_SVGALIB)
-LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib
-.endif
-
-.if defined(WITH_SDL)
-LIB_DEPENDS+= SDL-1.1.4:${PORTSDIR}/devel/sdl12
+CONFIGURE_ARGS+= --disable-sdl-image
.endif
+# xvid
+.ifdef(WITH_XVID)
+LIB_DEPENDS+= xvidcore.0:${PORTSDIR}/graphics/xvid
-.if defined(WITH_VORBIS)
-LIB_DEPENDS+= vorbis.2:${PORTSDIR}/audio/libvorbis
-.endif
-
-.if defined(WITH_REALPLAYER)
-CONFIGURE_ARGS+= --enable-real \
- --with-reallibdir=${LOCALBASE}/lib/RealPlayer8/Codecs
-RUN_DEPENDS+= realplay:${PORTSDIR}/audio/linux-realplayer
-BUILD_DEPENDS+= realplay:${PORTSDIR}/audio/linux-realplayer
-.endif
-
-.if defined(WITH_LIVEMEDIA)
-CONFIGURE_ARGS+= --enable-live \
- --with-livelibdir=${LOCALBASE}/live
-RUN_DEPENDS+= ${LOCALBASE}/live/liveMedia/libliveMedia.a:${PORTSDIR}/net/liveMedia
-BUILD_DEPENDS+= ${LOCALBASE}/live/liveMedia/libliveMedia.a:${PORTSDIR}/net/liveMedia
-.endif
-
-.if defined(WITH_FREETYPE)
-CONFIGURE_ARGS+= --with-extraincdir=${LOCALBASE}/include/freetype2 \
- --enable-freetype
-LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2
+CONFIGURE_ARGS+= --enable-xvid \
+ --with-xvidcore=${LOCALBASE}
.else
-RUN_DEPENDS+= ${LOCALBASE}/share/mplayer/fonts:${PORTSDIR}/graphics/mplayer-fonts
+CONFIGURE_ARGS+= --disable-xvid
.endif
-
-.if defined(WITH_XANIM)
-BUILD_DEPENDS+= xanim:${PORTSDIR}/graphics/xanim
-
-CONFIGURE_ARGS+=--enable-xanim --with-xanimlibdir=${X11BASE}/lib/X11/xanim
+# termcap key support
+# mplayerxp does not clean up after itself yet
+.ifdef(WITH_TERMCAP)
+CONFIGURE_ARGS+= --enable-termcap
.else
-CONFIGURE_ARGS+=--disable-xanim
-.endif
-
-# "enable" build for other archs
-.if ${ARCH} == "i386"
-.if !defined(WITHOUT_RUNTIME_CPUDETECTION)
-CONFIGURE_ARGS+=--enable-runtime-cpudetection
-.else #WITHOUT_RUNTIME_CPUDETECTION
-.if defined(WITHOUT_MMX)
-CONFIGURE_ARGS+=--disable-mmx
-.endif
-.if defined(WITHOUT_3DNOW) || ${OSVERSION} < 400021
-CONFIGURE_ARGS+=--disable-3dnow
-.endif
-.if defined(WITHOUT_DSP) || defined(WITHOUT_3DNOW) || ${OSVERSION} < 400021
-CONFIGURE_ARGS+=--disable-3dnowex
-.endif
-.if defined(WITHOUT_SSE)
-CONFIGURE_ARGS+=--disable-mmx2 --disable-sse
-.endif
-.endif #WITHOUT_RUNTIME_CPUDETECTION
-.if !defined(WITH_SVGALIB)
-CONFIGURE_ARGS+=--disable-svga
-.endif
-.if !defined(WITH_SDL)
-CONFIGURE_ARGS+=--disable-sdl
-.endif
-.if !defined(WITH_VORBIS)
-CONFIGURE_ARGS+=--disable-vorbis
+CONFIGURE_ARGS+= --disable-termcap
.endif
+# win32 binary dll codecs
.if !defined(WITHOUT_WIN32_CODECS)
RUN_DEPENDS+= ${CODEC_DETECTION_FILE}:${CODEC_PORT}
-CONFIGURE_ARGS+= --with-win32libdir=${LOCALBASE}/lib/win32
-
-CODEC_PORT= ${PORTSDIR}/graphics/win32-codecs
+CODEC_PORT= ${PORTSDIR}/multimedia/win32-codecs
CODEC_DETECTION_FILE!= ${MAKE} -f ${CODEC_PORT}/Makefile -V CODEC_DETECTION_FILE
.endif
-.endif # ARCH == i386
pre-everything::
-.if defined(WITH_GUI)
- @${ECHO_MSG} "You can download official skin collections from"
- @${ECHO_MSG} "http://www.mplayerhq.hu/homepage/dload.html"
-.endif
-.if !defined(WITH_OPTIMIZED_CFLAGS)
- @${ECHO_MSG} "You can enable additional compilation optimizations"
- @${ECHO_MSG} "by defining WITH_OPTIMIZED_CFLAGS"
-.endif
-.if !defined(WITH_GUI) && ${HAVE_GNOME:Mgtk12}==""
- @${ECHO_MSG} "You can enable GTK GUI by defining WITH_GUI."
-.endif
-.if !defined(WITH_DVD)
- @${ECHO_MSG} "You can enable DVD support by defining WITH_DVD."
-.endif
-.if defined(WITH_DVD) && !defined(WITH_LIBDVDREAD)
- @${ECHO_MSG} "You can replace mplayer internal DVD routines with libdvdread"
- @${ECHO_MSG} "support by defining WITH_LIBDVDREAD."
-.endif
-.if !defined(WITH_SVGALIB)
- @${ECHO_MSG} "You can enable SVGALIB support by defining WITH_SVGALIB."
-.endif
-.if !defined(WITH_SDL)
- @${ECHO_MSG} "You can enable SDL support by defining WITH_SDL."
-.endif
-.if !defined(WITH_VORBIS)
- @${ECHO_MSG} "You can enable VORBIS sound support by defining WITH_VORBIS."
-.endif
-.if !defined(WITH_XANIM)
- @${ECHO_MSG} "You can enable XAnim DLL support by defining WITH_XANIM."
-.endif
-.if !defined(WITH_LIVEMEDIA)
- @${ECHO_MSG} "You can enable liveMedia support by defining WITH_LIVEMEDIA."
-.endif
-.if !defined(WITH_FREETYPE)
- @${ECHO_MSG} "You can enable truetype font support by defining WITH_FREETYPE."
- @${ECHO_MSG} " But use with caution. mplayer won't use the standard fonts anymore."
-.endif
-.if ${ARCH} == "i386"
-.if !defined(WITHOUT_WIN32_CODECS)
- @${ECHO_MSG} "You can disable support (this turns this into a X86 only port)"
- @${ECHO_MSG} "for Win32 codecs by defining WITHOUT_WIN32_CODECS"
-.if !defined(WITH_REALPLAYER)
- @${ECHO_MSG} \
- "You can enable RealPlayer DLL support by defining WITH_REALPLAYER."
-.endif
-.endif
-.if defined(WITHOUT_RUNTIME_CPUDETECTION)
-.if !defined(WITHOUT_SSE)
- @${ECHO_MSG} "You have to enable \"options CPU_ENABLE_SSE\" in your kernel"
- @${ECHO_MSG} "config in order to enable kernel support for SSE/MMX2."
-.endif
-.if !defined(WITHOUT_MMX)
- @${ECHO_MSG} "You can disable use of MMX routines by defining WITHOUT_MMX."
+.ifndef(WITH_OPTIMIZED_CFLAGS)
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> You can enable additional compilation optimizations'
+ @${ECHO_MSG} ' by defining WITH_OPTIMIZED_CFLAGS.'
.endif
.if !defined(WITHOUT_3DNOW) && ${OSVERSION} >= 400021
- @${ECHO_MSG} "You can disable use of 3DNow! optimized routines by defining WITHOUT_3DNOW."
-.endif
-.if !defined(WITHOUT_3DNOW) && !defined(WITHOUT_DSP) && ${OSVERSION} >= 400021
- @${ECHO_MSG} "You can disable support for Athlon DSP extensions by defining WITHOUT_DSP."
-.endif
- @${ECHO_MSG} "Note: The cpu features are autodetected, so there is probably no need"
- @${ECHO_MSG} "to manually disable them."
-.else
- @${ECHO_MSG} "You can disable runtime cpu detection features by defining WITHOUT_RUNTIME_CPUDETECTION"
-.endif
-.endif # ARCH == i386
-
-pre-configure:
-.if defined(WITH_LIBDVDREAD)
- @${RM} -Rf ${WRKSRC}/libmpdvdkit2/
-.endif
-
-post-install:
- @${MKDIR} ${DATADIR}
- @${CHMOD} 755 ${DATADIR}
-.for conf in ${CONFFILES}
- ${INSTALL_DATA} ${WRKSRC}/etc/${conf} ${DATADIR}
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> You can disable 3DNow! optimized routines by defining WITHOUT_3DNOW.'
+.endif
+.if !defined(WITHOUT_SSE) && ${OSVERSION} >= 400021
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> You can disable SSE optimized routines by defining WITHOUT_SSE.'
+.endif
+.ifndef(WITH_ARTS)
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> You can enable KDE ARTS support by defining WITH_ARTS.'
+.endif
+.ifndef(WITH_DVD)
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> You can enable DVD support by defining WITH_DVD.'
+.endif
+.ifndef(WITH_LIBDVDNAV)
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> You can enable LIBDVDNAV support by defining WITH_LIBDVDNAV.'
+.endif
+.ifndef(WITH_SDL)
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> You can enable SDL support by defining WITH_SDL.'
+.endif
+.ifndef(WITH_SDL_IMAGE)
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> You can enable SDL_image support by defining WITH_SDL_IMAGE.'
+.endif
+.ifndef(WITH_TERMCAP)
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> You can enable termcap key database support by defining WITH_TERMCAP.'
+.endif
+.ifndef(WITH_XVID)
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> You can enable XVID support by defining WITH_XVID.'
+.endif
+.ifndef(WITHOUT_WIN32_CODECS)
+ @${ECHO_MSG} '===>'
+ @${ECHO_MSG} '===> You can disable support for Win32 codecs by defining WITHOUT_WIN32_CODECS'
+.endif
+ @${ECHO_MSG} '===>'
+
+post-patch:
+# fix detection of libdvdnav
+.ifdef(WITH_LIBDVDNAV)
+ @${REINPLACE_CMD} -E -e \
+ 's|(-I\$$_dvdnavdir)|\1/include/dvdnav|; \
+ s|(-L\$$_dvdnavdir)/.libs|\1/lib|; \
+ s|(-ldvdnav)|\1 ${PTHREAD_LIBS}|' \
+ ${WRKSRC}/mplayerxp/configure
+.endif
+# linux/ioctl.h -> sys/ioctl.h
+.for file in mplayerxp/libdha/kernelhelper/dhahelper.h \
+ mplayerxp/vidix/drivers/radeon_vid.c
+ @${REINPLACE_CMD} -e 's|linux/ioctl.h|sys/ioctl.h|' \
+ ${WRKSRC}/${file}
.endfor
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- @${CHMOD} 755 ${DOCSDIR}
-.for doc in ${DOCFILES}
- @${INSTALL_DATA} ${WRKSRC}/DOCS/${doc} ${DOCSDIR}
+# correct SDL prefix installation
+# -lpthread -> ${PHREAD_LIBS}
+# win32 codec location
+ @${FIND} ${WRKSRC} -type f | \
+ ${XARGS} -x -n 10 ${REINPLACE_CMD} -E -e \
+ 's|SDL/|SDL11/|; \
+ s|-lpthread|${PTHREAD_LIBS}|; \
+ s|/usr/local/lib/win32|${WIN32_CODEC_PREFIX}|'
+# win32 codec location
+ @${REINPLACE_CMD} -E -e \
+ 's|WIN32_PATH|"${WIN32_CODEC_PREFIX}"|' \
+ ${WRKSRC}/loader/win32.c
+# FreeBSD's install utility does not support -D flag
+ @${FIND} ${WRKSRC} -name Makefile | \
+ ${XARGS} -x -n 10 ${REINPLACE_CMD} -E -e \
+ 's,(\$$\(INSTALL\)|install)(.*)-D,${INSTALL}\2,'
+# PTHREAD_{CFLAGS,LIBS}
+# location of xine libdvdnav header files
+ @${REINPLACE_CMD} -E -e \
+ 's|-pthread|${PTHREAD_LIBS}|; \
+ s|-D_THREAD_SAFE|${PTHREAD_CFLAGS}|' \
+ ${WRKSRC}/mplayerxp/configure
+# FreeBSD does not have -ldl
+ @${REINPLACE_CMD} -e 's|-ldl||' \
+ ${WRKSRC}/mplayerxp/vidix/Makefile
+# ffmpeg currently is not compatible with mplayerxp
+.for file in ad_ffmp3.c vd_ffmpeg.c
+ @${REINPLACE_CMD} -e 's|libavcodec.so|libNOTavcodec.so|' \
+ ${WRKSRC}/mplayerxp/libmpcodecs/${file}
+.endfor
+# native libdivxdecore is not compatible with mplayerxp
+.for file in vd_divx4.c vd_xvid.c
+ @${REINPLACE_CMD} -e 's|libdivxdecore|libNOTdivxdecore|' \
+ ${WRKSRC}/mplayerxp/libmpcodecs/${file}
.endfor
-.endif
-.if defined(WITH_GUI)
- @${LN} -sf ${PREFIX}/bin/mplayer ${PREFIX}/bin/gmplayer
-.endif
- @${CAT} ${.CURDIR}/pkg-message
-install-user:
- @${PERL} ${FILESDIR}/install-user
+pre-install:
+# create dirs before installation since the port uses a install
+# utility option not available in FreeBSD
+.for dir in ${DIRS_TO_CREATE}
+ @${MKDIR} ${PREFIX}/${dir}
+.endfor
.include <bsd.port.post.mk>
diff --git a/multimedia/mplayerxp/distinfo b/multimedia/mplayerxp/distinfo
index e7c16cce02df..beb2d281865a 100644
--- a/multimedia/mplayerxp/distinfo
+++ b/multimedia/mplayerxp/distinfo
@@ -1 +1 @@
-MD5 (MPlayer-0.90pre10.tar.bz2) = cd972417e29cc7ca692dc7dd214a2cd0
+MD5 (mplayerxp-0.1.9.tar.bz2) = c85c07053ad2fa94a8b102ab869769f9
diff --git a/multimedia/mplayerxp/files/install-user b/multimedia/mplayerxp/files/install-user
deleted file mode 100644
index deef2d700fa8..000000000000
--- a/multimedia/mplayerxp/files/install-user
+++ /dev/null
@@ -1,55 +0,0 @@
-#This perl script links the codec config file
-#and the fonts dir to the user's home dir.
-#Last touched: 2002-05-04 riggs
-
-if (-e "$ENV{HOME}/.mplayer/")
-{
- print "Sorry, you should execute this target without having a .mplayer directory in your homedir.\n";
- exit 1;
-}
-
-#Determining location of fonts:
-
-@pkg=`pkg_info -Lx mplayer-fonts`;
-print "$prefix[3]";
-$prefix=$pkg[3];
-$prefix=~ s/(.+mplayer).*/$1/;
-chop $prefix;
-
-print "You may choose any of the available language sets:\n\n";
-print "ISO-8859-1 Font : 1\n";
-print "ISO-8859-2 Font : 2\n";
-print "(old) Cyrillic fonts : c\n";
-print "Russian fonts : r\n";
-
-print "Your decision? ";
-chomp ($lang=<STDIN>);
-print "\n";
-
-if ($lang eq "1" || $lang eq "2")
-{
- print "The available sizes for this font are 14,18,24,28.\n";
- print "Please enter the wanted size: \n";
- chomp ($size=<STDIN>);
- if ($size ne "14" && $size ne "18" && $size ne "24" && $size ne "28") {$size=14;}
-}
-
-
-system "mkdir $ENV{HOME}/.mplayer";
-if ($lang eq "c")
-{
- system "ln -sv $prefix/fonts/cyrillic/ $ENV{HOME}/.mplayer/font";
-}
-elsif ($lang eq "r")
-{
- system "ln -sv $prefix/fonts/koi8r-font/ $ENV{HOME}/.mplayer/font";
-}
-elsif ($lang eq "2")
-{
- system "ln -sv $prefix/fonts/iso-8859-2/arial-$size/ $ENV{HOME}/.mplayer/font";
-}
-else {system "ln -sv $prefix/fonts/iso-8859-1/arial-$size/ $ENV{HOME}/.mplayer/font"};
-
-system "ln -sv $prefix/codecs.conf $ENV{HOME}/.mplayer/codecs.conf";
-system "cp -pv $prefix/example.conf $ENV{HOME}/.mplayer/example.conf";
-system "cp -pv $prefix/input.conf $ENV{HOME}/.mplayer/input.conf";
diff --git a/multimedia/mplayerxp/files/patch-ad b/multimedia/mplayerxp/files/patch-ad
deleted file mode 100644
index cfd8603b66f5..000000000000
--- a/multimedia/mplayerxp/files/patch-ad
+++ /dev/null
@@ -1,98 +0,0 @@
---- configure.orig Thu Oct 24 20:12:40 2002
-+++ configure Fri Nov 1 12:46:36 2002
-@@ -495,19 +495,10 @@
-
- # Try to find the available options for the current CPU
- if x86 || ppc; then
-- if test -r /proc/cpuinfo ; then
-- # linux with /proc mounted, extract cpu information from it
-- _cpuinfo="cat /proc/cpuinfo"
-- elif test -r /compat/linux/proc/cpuinfo ; then
-- # FreeBSD with linux emulation /proc mounted,
-- # extract cpu information from it
-- _cpuinfo="cat /compat/linux/proc/cpuinfo"
-- elif x86; then
- # all other OS try to extract cpu information from a small helper
- # program TOOLS/cpuinfo instead
- $_cc -o TOOLS/cpuinfo TOOLS/cpuinfo.c
- _cpuinfo="TOOLS/cpuinfo"
-- fi
-
- pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -1`
- pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
-@@ -1302,8 +1293,8 @@
- ;;
-
- *)
-- echo "Unknown parameter: $ac_option"
-- exit
-+ echo -n "Unknown parameter: $ac_option"
-+ echo " (ignoring)"
- ;;
-
- esac
-@@ -1313,7 +1304,7 @@
- test -z "$_bindir" && _bindir="$_prefix/bin"
- test -z "$_datadir" && _datadir="$_prefix/share/mplayer"
- test -z "$_mandir" && _mandir="$_prefix/man"
--test -z "$_confdir" && _confdir="$_prefix/etc/mplayer"
-+test -z "$_confdir" && _confdir="$_prefix/share/mplayer"
- test -z "$_libdir" && _libdir="$_prefix/lib"
- test -z "$_mlibdir" && _mlibdir="$MLIBHOME"
-
-@@ -1702,13 +1693,7 @@
-
-
- echocheck "memalign()"
--# XXX restrict to x86 ? extend to other CPUs/cacheline sizes ?
--cat > $TMPC << EOF
--#include <malloc.h>
--int main (void) { (void) memalign(64, sizeof(char)); return 0; }
--EOF
- _memalign=no
--cc_check && _memalign=yes
- if test "$_memalign" = yes ; then
- _def_memalign='#define HAVE_MEMALIGN 1'
- else
-@@ -1785,31 +1770,7 @@
-
-
- echocheck "pthread"
--cat > $TMPC << EOF
--#include <pthread.h>
--void* func(void *arg) { return arg; }
--int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; }
--EOF
--if ( cc_check && $TMPO ) ; then # QNX
-- _ld_pthread=''
--elif ( cc_check -lpthread && $TMPO ) ; then
-- _ld_pthread='-lpthread'
--elif ( cc_check -pthread && $TMPO ) ; then
-- _ld_pthread='-pthread'
--else
-- if test "$_ld_static" ; then
-- # for crosscompilation, we cannot execute the program, be happy if we can link statically
-- if ( cc_check -lpthread ) ; then
-- _ld_pthread='-lpthread'
-- elif ( cc_check -pthread ) ; then
-- _ld_pthread='-pthread'
-- else
-- die "Static lib pthread not found (needed by Windows and networking stufff)."
-- fi
-- else
-- die "Lib pthread not found (needed by Windows and networking stuff)."
-- fi
--fi
-+_ld_pthread="${PTHREAD_LIBS}"
- echores "yes (using $_ld_pthread)"
-
-
-@@ -4277,7 +4238,7 @@
- CFLAGS="$CFLAGS -D_REENTRANT"
- elif bsd ; then
- # FIXME bsd needs this so maybe other OS'es
-- CFLAGS="$CFLAGS -D_THREAD_SAFE"
-+ CFLAGS="$CFLAGS ${PTHREAD_CFLAGS}"
- fi
- # 64 bit file offsets?
- if test "$_largefiles" = yes || freebsd ; then
diff --git a/multimedia/mplayerxp/files/patch-ae b/multimedia/mplayerxp/files/patch-ae
deleted file mode 100644
index b9d7a7e3daba..000000000000
--- a/multimedia/mplayerxp/files/patch-ae
+++ /dev/null
@@ -1,62 +0,0 @@
---- Makefile.orig Wed Oct 23 19:20:59 2002
-+++ Makefile Fri Nov 1 12:31:48 2002
-@@ -24,7 +24,7 @@
- endif
-
- # a BSD compatible 'install' program
--INSTALL = install
-+INSTALL = @${BSD_INSTALL_PROGRAM}
-
- SRCS_COMMON = cpudetect.c codec-cfg.c cfgparser.c my_profile.c spudec.c playtree.c playtreeparser.c asxparser.c vobsub.c subreader.c sub_cc.c find_sub.c
- SRCS_MENCODER = mencoder.c mp_msg-mencoder.c $(SRCS_COMMON) libao2/afmt.c divx4_vbr.c libvo/aclib.c libvo/osd.c libvo/sub.c libvo/font_load.c libvo/font_load_ft.c xvid_vbr.c
-@@ -201,49 +201,11 @@
- ifeq ($(VIDIX),yes)
- $(DO_MAKE)
- endif
-- if test ! -d $(BINDIR) ; then mkdir -p $(BINDIR) ; fi
- $(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG) $(BINDIR)/$(PRG)
--ifeq ($(GUI),yes)
-- -ln -sf $(PRG) $(BINDIR)/gmplayer
--endif
-- if test ! -d $(MANDIR)/man1 ; then mkdir -p $(MANDIR)/man1; fi
-- $(INSTALL) -c -m 644 DOCS/mplayer.1 $(MANDIR)/man1/mplayer.1
-+ @${BSD_INSTALL_MAN} DOCS/mplayer.1 $(MANDIR)/man1/mplayer.1
- ifeq ($(MENCODER),yes)
- $(INSTALL) -m 755 $(INSTALLSTRIP) $(PRG_MENCODER) $(BINDIR)/$(PRG_MENCODER)
- -ln -sf mplayer.1 $(MANDIR)/man1/mencoder.1
--endif
-- @if test ! -d $(DATADIR) ; then mkdir -p $(DATADIR) ; fi
-- @if test ! -d $(DATADIR)/font ; then mkdir -p $(DATADIR)/font ; fi
-- @if test ! -f $(DATADIR)/font/font.desc ; then \
-- echo "*** Download font at http://www.mplayerhq.hu/homepage/dload.html" ; \
-- echo "*** for OSD/Subtitles support and extract to $(DATADIR)/font/" ; \
-- fi
--ifeq ($(GUI),yes)
-- @if test ! -d $(DATADIR)/Skin ; then mkdir -p $(DATADIR)/Skin ; fi
-- @echo "*** Download skin(s) at http://www.mplayerhq.hu/homepage/dload.html"
-- @echo "*** for GUI, and extract to $(DATADIR)/Skin/"
--endif
-- @if test ! -d $(CONFDIR) ; then mkdir -p $(CONFDIR) ; fi
-- @if test -f $(CONFDIR)/codecs.conf.old ; then mv -f $(CONFDIR)/codecs.conf.old $(CONFDIR)/codecs.conf.older ; fi
-- @if test -f $(CONFDIR)/codecs.conf ; then mv -f $(CONFDIR)/codecs.conf $(CONFDIR)/codecs.conf.old ; fi
-- $(INSTALL) -c -m 644 etc/codecs.conf $(CONFDIR)/codecs.conf
--ifeq ($(DVDKIT_SHARED),yes)
--ifeq ($(DVDKIT2),yes)
-- if test ! -d $(LIBDIR) ; then mkdir -p $(LIBDIR) ; fi
-- $(INSTALL) -m 755 $(INSTALLSTRIP) libmpdvdkit2/libmpdvdkit.so $(LIBDIR)/libmpdvdkit.so
--else
--ifeq ($(DVDKIT),yes)
-- if test ! -d $(LIBDIR) ; then mkdir -p $(LIBDIR) ; fi
-- $(INSTALL) -m 755 $(INSTALLSTRIP) libmpdvdkit/libmpdvdkit.so $(LIBDIR)/libmpdvdkit.so
--endif
--endif
--endif
--ifeq ($(CSS_USE),yes)
-- @echo "The following task requires root privileges. If it fails don't panic,"
-- @echo "however it means you can't use fibmap_mplayer."
-- @echo "Without this (or without running mplayer as root) you won't be"
-- @echo "able to play encrypted DVDs."
-- -$(INSTALL) -o 0 -g 0 -m 4755 $(INSTALLSTRIP) $(PRG_FIBMAP) $(BINDIR)/$(PRG_FIBMAP)
- endif
-
- uninstall:
diff --git a/multimedia/mplayerxp/files/patch-loader::Makefile b/multimedia/mplayerxp/files/patch-loader::Makefile
new file mode 100644
index 000000000000..705ba19c5870
--- /dev/null
+++ b/multimedia/mplayerxp/files/patch-loader::Makefile
@@ -0,0 +1,11 @@
+--- loader/Makefile.orig Sun Nov 24 20:00:35 2002
++++ loader/Makefile Sun Nov 24 20:00:44 2002
+@@ -54,7 +54,7 @@
+ ifeq ($(TARGET_ARCH_X86),yes)
+ $(LIBNAME): $(LIB_OBJECTS) stubs.s
+ $(CC) -c ./stubs.s -o stubs.o
+- $(LD) --shared -soname $@ -o $@ $(LIB_OBJECTS) stubs.o -lc -lm -lpthread
++ $(LD) --shared -soname $@ -o $@ $(LIB_OBJECTS) stubs.o -lc -lm
+ endif
+
+ dep:
diff --git a/multimedia/mplayerxp/files/patch-mplayerxp::Makefile b/multimedia/mplayerxp/files/patch-mplayerxp::Makefile
new file mode 100644
index 000000000000..66bc17676c7d
--- /dev/null
+++ b/multimedia/mplayerxp/files/patch-mplayerxp::Makefile
@@ -0,0 +1,26 @@
+--- mplayerxp/Makefile.orig Tue Jul 2 05:38:23 2002
++++ mplayerxp/Makefile Sun Nov 24 21:41:24 2002
+@@ -120,23 +120,11 @@
+ $(CC) $(CFLAGS) -g codec-cfg.c -o $(PRG_CFG) -DCODECS2HTML
+
+ install: $(ALL_PRG)
+-ifeq ($(INSTALL),)
+- @echo "*** 'install' utility was not found and you can't run automatic"
+- @echo "*** installation. Please download 'fileutils' from ftp://ftp.gnu.org and"
+- @echo "*** install them to have possibility perform autiomatic installation"
+- @echo "*** of this project"
+- @exit 1
+-endif
+ ifeq ($(VIDIX),yes)
+ $(DO_MAKE)
+ endif
+ $(INSTALL) -D -m 755 $(PRG) $(BINDIR)/$(PRG)
+ @if test ! -d $(DATADIR) ; then mkdir -p $(DATADIR) ; fi
+- @if test ! -d $(DATADIR)/font ; then mkdir -p $(DATADIR)/font ; fi
+- @if test ! -f $(DATADIR)/font/font.desc ; then \
+- echo "*** Download font at http://www.mplayerhq.hu/homepage/dload.html" ; \
+- echo "*** for OSD/Subtitles support and extract to $(DATADIR)/font/" ; \
+- fi
+
+ ifeq ($(CSS_USE),yes)
+ @echo "Following task requires root privs. If it fails don't panic"
diff --git a/multimedia/mplayerxp/files/patch-mplayerxp::libdha::mmi.c b/multimedia/mplayerxp/files/patch-mplayerxp::libdha::mmi.c
new file mode 100644
index 000000000000..54ac4d4e4630
--- /dev/null
+++ b/multimedia/mplayerxp/files/patch-mplayerxp::libdha::mmi.c
@@ -0,0 +1,10 @@
+--- mplayerxp/libdha/mmi.c.orig Sun Nov 24 11:02:13 2002
++++ mplayerxp/libdha/mmi.c Sun Nov 24 11:02:31 2002
+@@ -1,6 +1,7 @@
+ /* Memory manager interface */
+ #include <stdio.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
+ #include <sys/mman.h> /* mlock */
+ #include <errno.h>
+ #include <unistd.h>
diff --git a/multimedia/mplayerxp/files/patch-mplayerxp::vidix::drivers::radeon_vid.c b/multimedia/mplayerxp/files/patch-mplayerxp::vidix::drivers::radeon_vid.c
new file mode 100644
index 000000000000..cf5152013321
--- /dev/null
+++ b/multimedia/mplayerxp/files/patch-mplayerxp::vidix::drivers::radeon_vid.c
@@ -0,0 +1,10 @@
+--- mplayerxp/vidix/drivers/radeon_vid.c.orig Sun Nov 24 15:13:43 2002
++++ mplayerxp/vidix/drivers/radeon_vid.c Sun Nov 24 15:13:53 2002
+@@ -11,6 +11,7 @@
+ #include <string.h>
+ #include <math.h>
+ #include <inttypes.h>
++#include <sys/types.h>
+ #include <sys/mman.h>
+ #include "../../libdha/pci_ids.h"
+ #include "../../libdha/pci_names.h"
diff --git a/multimedia/mplayerxp/pkg-comment b/multimedia/mplayerxp/pkg-comment
index c804b4065b34..746328de9ed7 100644
--- a/multimedia/mplayerxp/pkg-comment
+++ b/multimedia/mplayerxp/pkg-comment
@@ -1 +1 @@
-High performance media player that supports many formats
+Multi-threaded branch of the well known mplayer media mplayer
diff --git a/multimedia/mplayerxp/pkg-descr b/multimedia/mplayerxp/pkg-descr
index ea53eb32e136..9f464e103ebf 100644
--- a/multimedia/mplayerxp/pkg-descr
+++ b/multimedia/mplayerxp/pkg-descr
@@ -1,10 +1,7 @@
-This is the port of mplayer, a project which has the effort
-to become a very stable and useful movie player.
+MplayerXP is a branch of the well known mplayer (http://mplayerhq.hu)
+which is based on the new (thread based) core. The new core provides
+better CPU utilization and excellently improves performance of video
+decoding. Main goal of this project is to get monotonous CPU loading
+during movie playback.
-It is based on the windows codec compilation and
-provides the ability to play many formats
-in a very good quality without much CPU comsumption.
-
-Support for ffmpeg and DVD are also included.
-
-WWW: http://www.mplayerhq.hu/
+WWW: http://mplayerxp.sourceforge.net/
diff --git a/multimedia/mplayerxp/pkg-message b/multimedia/mplayerxp/pkg-message
deleted file mode 100644
index cec7bbd056f3..000000000000
--- a/multimedia/mplayerxp/pkg-message
+++ /dev/null
@@ -1,18 +0,0 @@
-This port provides a simple and easy to use
-possibility for any user to make mplayer ready
-to run with a working codecs.conf and the
-right font by logging in with the username,
-then cd to the mplayer port directory and
-enter:
-
-make install-user
-
-Please take a look at docs in
-/usr/local/share/doc/mplayer
-
-You can download skins from the mplayer homepage:
-http://www.mplayerhq.hu/
-
-In order to use DVD please make sure that your
-kernel and base system is newer than 2001-09-25,
-otherwise DVD play will not work!
diff --git a/multimedia/mplayerxp/pkg-plist b/multimedia/mplayerxp/pkg-plist
index 9e56a14f12c5..d4c22cc64a14 100644
--- a/multimedia/mplayerxp/pkg-plist
+++ b/multimedia/mplayerxp/pkg-plist
@@ -1,19 +1,40 @@
-bin/mplayer
-bin/mencoder
-%%GMPLAYER%%bin/gmplayer
-%%PORTDOCS%%share/doc/mplayer/bugreports.html
-%%PORTDOCS%%share/doc/mplayer/cd-dvd.html
-%%PORTDOCS%%share/doc/mplayer/codecs-in.html
-%%PORTDOCS%%share/doc/mplayer/codecs.html
-%%PORTDOCS%%share/doc/mplayer/documentation.html
-%%PORTDOCS%%share/doc/mplayer/encoding.html
-%%PORTDOCS%%share/doc/mplayer/faq.html
-%%PORTDOCS%%share/doc/mplayer/formats.html
-%%PORTDOCS%%share/doc/mplayer/skin-en.html
-%%PORTDOCS%%share/doc/mplayer/sound.html
-%%PORTDOCS%%share/doc/mplayer/video.html
-%%PORTDOCS%%share/doc/mplayer/users_against_developers.html
-share/mplayer/codecs.conf
-share/mplayer/example.conf
-share/mplayer/input.conf
-%%PORTDOCS%%@dirrm share/doc/mplayer
+bin/fibmap_mplayerxp
+bin/mplayerxp
+etc/mplayerxp/codecs.conf
+include/vidix/fourcc.h
+include/vidix/vidix.h
+include/vidix/vidixlib.h
+lib/libdha-0.2.so
+lib/libdha.so
+lib/libvidix.so
+lib/mplayerxp/codecs/libMP3.so
+lib/mplayerxp/codecs/liba52.so
+lib/mplayerxp/codecs/libac3-iec958.so
+lib/mplayerxp/codecs/libadpcm.so
+lib/mplayerxp/codecs/libcinepak.so
+lib/mplayerxp/codecs/libcyuv.so
+lib/mplayerxp/codecs/libfli.so
+lib/mplayerxp/codecs/libmpeg2.so
+lib/mplayerxp/codecs/libmsvidc.so
+lib/mplayerxp/codecs/libnuppelvideo.so
+lib/mplayerxp/codecs/libqtrle.so
+lib/mplayerxp/codecs/libqtrpza.so
+lib/mplayerxp/codecs/libqtsmc.so
+lib/mplayerxp/codecs/libroqav.so
+lib/mplayerxp/wine/DS_Filter.so
+lib/mplayerxp/wine/libloader.so
+lib/vidix/genfb_vid.so
+lib/vidix/mach64_vid.so
+lib/vidix/mga_crtc2_vid.so
+lib/vidix/mga_vid.so
+lib/vidix/nvidia_vid.so
+lib/vidix/pm2_vid.so
+lib/vidix/pm3_vid.so
+lib/vidix/radeon_vid.so
+lib/vidix/rage128_vid.so
+@dirrm lib/vidix
+@dirrm lib/mplayerxp/wine
+@dirrm lib/mplayerxp/codecs
+@dirrm lib/mplayerxp
+@dirrm include/vidix
+@dirrm etc/mplayerxp