Index: multimedia/mplayer/Makefile =================================================================== --- multimedia/mplayer/Makefile (revision 372551) +++ multimedia/mplayer/Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= mplayer PORTVERSION= ${MPLAYER_PORT_VERSION} -PORTREVISION= 3 +PORTREVISION= 4 COMMENT= High performance media player supporting many formats @@ -43,6 +43,7 @@ CONFFILES= example.conf input.conf menu.conf dvb-menu.conf USES+= pkgconfig +USES+= iconv .include "${.CURDIR}/Makefile.optvars" .include @@ -160,6 +161,8 @@ 's|irqp = 1024|irqp = ${DEFAULT_KERN_HZ}|' \ ${WRKSRC}/mplayer.c .endif + @${REINPLACE_CMD} -e 's/FREEBSD_ICONV_LIB/${ICONV_LIB}/' ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's/-liconv/${ICONV_LIB}/' ${WRKSRC}/configure post-install: @${MKDIR} ${STAGEDIR}${DATADIR} Index: multimedia/mplayer/files/patch-configure =================================================================== --- multimedia/mplayer/files/patch-configure (revision 372551) +++ multimedia/mplayer/files/patch-configure (working copy) @@ -1,5 +1,5 @@ ---- configure.orig 2014-08-23 15:59:32.000000000 +0200 -+++ configure 2014-11-01 11:03:04.283806013 +0100 +--- configure ++++ configure @@ -644,12 +644,13 @@ _armv6t2=auto _armvfp=auto @@ -32,6 +32,15 @@ ;; esac +@@ -1649,7 +1649,7 @@ + esac + echores "$cc_version" + else +- for _cc in "$_cc" gcc cc ; do ++ for _cc in "$_cc" clang cc ; do + cc_name_tmp=$($_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1) + if test "$cc_name_tmp" = "gcc"; then + cc_name=$cc_name_tmp @@ -1727,7 +1727,7 @@ case "$1" in x86_64|amd64|i[3-9]86*|i86pc|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;; @@ -54,6 +63,155 @@ if test -z "$_target" ; then cat > $TMPC << EOF +@@ -2015,7 +2019,7 @@ + if test "$_gcc3_ext" != ""; then + # If we had to disable SSE/SSE2 because the active kernel does not + # support this instruction set extension, we also have to tell +- # gcc3 to not generate SSE/SSE2 instructions for normal C code. ++ # clang to not generate SSE/SSE2 instructions for normal C code. + cflag_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext" + fi + +@@ -2066,15 +2070,15 @@ + # AMD CPUs just from their signature. Instead, we check directly + # whether it supports SSE. + if test "$_sse" = yes; then +- # gcc treats athlon-xp, athlon-4 and athlon-mp similarly. ++ # clang treats athlon-xp, athlon-4 and athlon-mp similarly. + proc=athlon-xp + else +- # Again, gcc treats athlon and athlon-tbird similarly. ++ # Again, clang treats athlon and athlon-tbird similarly. + proc=athlon + fi + ;; + 15) iproc=686 +- # k8 CPU type only supported in gcc >= 3.4.0, but that will be ++ # k8 CPU type only supported in clang >= 3.4.0, but that will be + # caught and remedied in the optimization tests below. + proc=k8 + ;; +@@ -2160,11 +2164,11 @@ + fi # test "$_runtime_cpudetection" = no + + +- # check that gcc supports our CPU, if not, fall back to earlier ones ++ # check that clang supports our CPU, if not, fall back to earlier ones + # LGB: check -mcpu and -march swithing step by step with enabling + # to fall back till 386. + +- # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead ++ # clang >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead + + if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] || ( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then + cpuopt=-mtune +@@ -2294,7 +2298,7 @@ + def_fast_64bit='#define HAVE_FAST_64BIT 1' + iproc='x86_64' + +- # gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead ++ # clang >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead + if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then + cpuopt=-mtune + else +@@ -2350,7 +2354,7 @@ + if test "$proc" = "k8"; then + cflag_check -march=$proc $cpuopt=$proc || proc=athlon-xp + fi +- # This will fail if gcc version < 3.3, which is OK because earlier ++ # This will fail if clang version < 3.3, which is OK because earlier + # versions don't really support 64-bit on amd64. + # Is this a valid assumption? -Corey + if test "$proc" = "athlon-xp"; then +@@ -2470,7 +2474,7 @@ + fi + ;; + NetBSD) +- # only gcc 3.4 works reliably with AltiVec code under NetBSD ++ # only clang 3.4 works reliably with AltiVec code under NetBSD + case $cc_version in + 2*|3.0*|3.1*|3.2*|3.3*) + ;; +@@ -2507,7 +2511,7 @@ + POWER3) _march='-mcpu=power3' _mcpu='-mtune=power3' ;; + *) ;; + esac +- # gcc 3.1(.1) and up supports 7400 and 7450 ++ # clang 3.1(.1) and up supports 7400 and 7450 + if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" || test "$_cc_major" -ge "4"; then + case "$proc" in + 7400*|7410*) _march='-mcpu=7400' _mcpu='-mtune=7400' ;; +@@ -2515,7 +2519,7 @@ + *) ;; + esac + fi +- # gcc 3.2 and up supports 970 ++ # clang 3.2 and up supports 970 + if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" || test "$_cc_major" -ge "4"; then + case "$proc" in + 970*|PPC970*) _march='-mcpu=970' _mcpu='-mtune=970' +@@ -2523,14 +2527,14 @@ + *) ;; + esac + fi +- # gcc 3.3 and up supports POWER4 ++ # clang 3.3 and up supports POWER4 + if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" || test "$_cc_major" -ge "4"; then + case "$proc" in + POWER4) _march='-mcpu=power4' _mcpu='-mtune=power4' ;; + *) ;; + esac + fi +- # gcc 3.4 and up supports 440* ++ # clang 3.4 and up supports 440* + if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" || test "$_cc_major" -ge "4"; then + case "$proc" in + 440EP*) _march='-mcpu=440fp' _mcpu='-mtune=440fp' ;; +@@ -2538,7 +2542,7 @@ + *) ;; + esac + fi +- # gcc 4.0 and up supports POWER5 ++ # clang 4.0 and up supports POWER5 + if test "$_cc_major" -ge "4"; then + case "$proc" in + POWER5*) _march='-mcpu=power5' _mcpu='-mtune=power5' ;; +@@ -2620,7 +2624,7 @@ + R5000) _march='-mips4' _mcpu='-mtune=r5000' ;; + R8000|R10000|R12000|R14000|R16000) _march='-mips4' _mcpu='-mtune=r8000' ;; + esac +- # gcc < 3.x does not support -mtune. ++ # clang < 3.x does not support -mtune. + if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then + _mcpu='' + fi +@@ -2752,7 +2756,7 @@ + echocheck "GCC support of -mstackrealign" + # GCC 4.2 and some earlier Apple versions support this flag on x86. Since + # Mac OS X/Intel has an ABI different from Windows this is needed to avoid +-# crashes when loading Win32 DLLs. Unfortunately some gcc versions create ++# crashes when loading Win32 DLLs. Unfortunately some clang versions create + # wrong code with this flag, but this can be worked around by adding + # -fno-unit-at-a-time as described in the blog post at + # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/ +@@ -2917,7 +2921,7 @@ + + + # Check if we need to compile as PIC for this combination of architecture, toolchain, +-# gcc configuration (e.g. hardened or not) and compiler options. ++# clang configuration (e.g. hardened or not) and compiler options. + # Needs to be after the relocatable handling, since PIE changes whether we need PIC or not. + echocheck "PIC" + def_pic='#define CONFIG_PIC 0' +@@ -2966,7 +2970,7 @@ + "xor %0, %0" + :"=b"(x) + // just adding ebx to clobber list seems unreliable with some +- // compilers, e.g. Haiku's gcc 2.95 ++ // compilers, e.g. Haiku's clang 2.95 + ); + // and the above check does not work for OSX 64 bit... + __asm__ volatile("":::"%ebx"); @@ -3152,6 +3156,13 @@ fi echores "$vfpv3" @@ -103,26 +261,66 @@ # for crosscompilation, we cannot execute the program, be happy if we can link statically cc_check $THREAD_CFLAGS $ld_tmp && (tmp_run || test "$ld_static") && ld_pthread="$ld_tmp" && _pthreads=yes && break done -@@ -4044,7 +4056,7 @@ +@@ -4044,10 +4056,11 @@ # NOTE: -L/usr/lib is a hack to avoid issues due to a # broken libiconv that e.g. macports installs into /opt/local/lib # which might get addded to the search path later by e.g. SDL - for ld_tmp in "" "-L/usr/lib -liconv" "-liconv" "-liconv $ld_dl" ; do -+ for ld_tmp in "" "-L$_prefix/lib -liconv" "-L%%LOCALBASE%%/lib -liconv" "-liconv" "-liconv $ld_dl" ; do - cc_check $ld_tmp && extra_ldflags="$extra_ldflags $ld_tmp" && - ld_iconv="$ld_tmp" && _iconv=yes && break +- cc_check $ld_tmp && extra_ldflags="$extra_ldflags $ld_tmp" && +- ld_iconv="$ld_tmp" && _iconv=yes && break +- done ++ #for ld_tmp in "" "-L/usr/lib -liconv" "-liconv" "-liconv $ld_dl" ; do ++ # cc_check $ld_tmp && extra_ldflags="$extra_ldflags $ld_tmp" && ++ # ld_iconv="$ld_tmp" && _iconv=yes && break ++ #done ++ extra_ldflags="$extra_ldflags FREEBSD_ICONV_LIB" ld_iconv="$ld_tmp" && _iconv=yes + fi + if test "$_iconv" = yes ; then + def_iconv='#define CONFIG_ICONV 1' +@@ -4079,7 +4092,7 @@ + echocheck "termcap" + if test "$_termcap" = auto ; then + _termcap=no +- for ld_tmp in "-lncurses" "-ltinfo" "-ltermcap"; do ++ for ld_tmp in "/usr/lib/libncurses.so" "-ltinfo" "-ltermcap"; do + statement_check term.h 'tgetent(0, 0)' $ld_tmp && + extra_ldflags="$extra_ldflags $ld_tmp" && + ld_termcap="$ld_tmp" && _termcap=yes && break +@@ -4515,7 +4528,7 @@ + fi done -@@ -5996,7 +6008,7 @@ + if test $_cross_compile = no; then +- for I in /usr/X11/include /usr/X11R7/include /usr/local/include /usr/X11R6/include \ ++ for I in /usr/X11/include /usr/X11R7/include /usr/local/include /usr/local/include \ + /usr/include/X11R6 /usr/openwin/include ; do + if test -f "$I/X11/Xlib.h" ; then + extra_cflags="$extra_cflags -I$I" +@@ -4530,8 +4543,8 @@ + + echocheck "X11" + if test "$_x11" = auto && test "$_x11_headers" = yes ; then +- for I in "" -L/usr/X11R7/lib -L/usr/local/lib -L/usr/X11R6/lib -L/usr/lib/X11R6 \ +- -L/usr/X11/lib -L/usr/lib32 -L/usr/openwin/lib -L/usr/local/lib64 -L/usr/X11R6/lib64 \ ++ for I in "" -L/usr/X11R7/lib -L/usr/local/lib -L/usr/local/lib -L/usr/lib/X11R6 \ ++ -L/usr/X11/lib -L/usr/lib32 -L/usr/openwin/lib -L/usr/local/lib64 -L/usr/local/lib64 \ + -L/usr/lib ; do + if netbsd; then + ld_tmp="$I -lXext -lX11 $ld_pthread -Wl,-R$(echo $I | sed s/^-L//)" +@@ -5996,7 +6009,7 @@ elif dragonfly ; then default_cdrom_device="/dev/cd0" elif freebsd ; then - default_cdrom_device="/dev/acd0" -+ default_cdrom_device="/dev/cdrom" ++ default_cdrom_device="/dev/cd0" elif openbsd ; then default_cdrom_device="/dev/rcd0c" elif sunos ; then -@@ -6009,7 +6021,7 @@ - default_cdrom_device="/dev/cdrom" +@@ -6006,15 +6019,15 @@ + elif amigaos ; then + default_cdrom_device="a1ide.device:2" + else +- default_cdrom_device="/dev/cdrom" ++ default_cdrom_device="/dev/cd0" fi -if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos ; then @@ -130,7 +328,26 @@ default_dvd_device=$default_cdrom_device elif darwin ; then default_dvd_device="/dev/rdiskN" -@@ -6609,7 +6621,7 @@ + else +- default_dvd_device="/dev/dvd" ++ default_dvd_device="/dev/cd0" + fi + + +@@ -6455,10 +6468,10 @@ + echocheck "bzlib" + bzlib=no + def_bzlib='#define CONFIG_BZLIB 0' +-statement_check bzlib.h 'BZ2_bzlibVersion()' -lbz2 && bzlib=yes ++statement_check bzlib.h 'BZ2_bzlibVersion()' /usr/lib/libbz2.so && bzlib=yes + if test "$bzlib" = yes ; then + def_bzlib='#define CONFIG_BZLIB 1' +- extra_ldflags="$extra_ldflags -lbz2" ++ extra_ldflags="$extra_ldflags /usr/lib/libbz2.so" + fi + echores "$bzlib" + +@@ -6609,7 +6622,7 @@ echocheck "libgsm" if test "$_libgsm" = auto ; then _libgsm=no @@ -139,7 +356,7 @@ fi if test "$_libgsm" = yes ; then def_libgsm='#define CONFIG_LIBGSM 1' -@@ -7094,6 +7106,16 @@ +@@ -7094,6 +7107,16 @@ nolibrtmp=no def_librtmp='#define CONFIG_LIBRTMP 1' inputmodules="librtmp $inputmodules" @@ -156,7 +373,7 @@ else nolibrtmp=yes _librtmp=no -@@ -7493,7 +7515,7 @@ +@@ -7493,7 +7516,7 @@ echocheck "mencoder" if test "$_mencoder" = no ; then # mpeg1video for vf_lavc, snow for vf_uspp / vf_mcdeint, @@ -165,7 +382,16 @@ fi echores "$_mencoder" -@@ -8422,7 +8444,7 @@ +@@ -8118,7 +8141,7 @@ + + ############################################################################# + +-CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE" ++CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64" + + CXXFLAGS=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" + +@@ -8422,7 +8445,7 @@ EXESUF = $_exesuf EXESUFS_ALL = .exe @@ -174,3 +400,12 @@ $(mak_enable "$arch_all" "$arch" ARCH) $(mak_enable "$subarch_all" "$subarch" ARCH) $(mak_enable "$cpuexts_all" "$cpuexts" HAVE) +@@ -8628,7 +8651,7 @@ + AS_C = -c + CC_C = -c + CXX_C = -c +-LD = gcc ++LD = clang + RANLIB = $_ranlib + YASM = $_yasm + DEPYASM = $_yasm