View | Details | Raw Unified | Return to bug 195065
Collapse All | Expand All

(-)multimedia/mplayer/Makefile (-1 / +4 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	mplayer
4
PORTNAME=	mplayer
5
PORTVERSION=	${MPLAYER_PORT_VERSION}
5
PORTVERSION=	${MPLAYER_PORT_VERSION}
6
PORTREVISION=	3
6
PORTREVISION=	4
7
7
8
COMMENT=	High performance media player supporting many formats
8
COMMENT=	High performance media player supporting many formats
9
9
Lines 43-48 Link Here
43
43
44
CONFFILES=	example.conf input.conf menu.conf dvb-menu.conf
44
CONFFILES=	example.conf input.conf menu.conf dvb-menu.conf
45
USES+=		pkgconfig
45
USES+=		pkgconfig
46
USES+=		iconv
46
47
47
.include "${.CURDIR}/Makefile.optvars"
48
.include "${.CURDIR}/Makefile.optvars"
48
.include <bsd.port.pre.mk>
49
.include <bsd.port.pre.mk>
Lines 160-165 Link Here
160
		's|irqp = 1024|irqp = ${DEFAULT_KERN_HZ}|' \
161
		's|irqp = 1024|irqp = ${DEFAULT_KERN_HZ}|' \
161
		${WRKSRC}/mplayer.c
162
		${WRKSRC}/mplayer.c
162
.endif
163
.endif
164
	@${REINPLACE_CMD} -e 's/FREEBSD_ICONV_LIB/${ICONV_LIB}/' ${WRKSRC}/configure
165
	@${REINPLACE_CMD} -e 's/-liconv/${ICONV_LIB}/' ${WRKSRC}/configure
163
166
164
post-install:
167
post-install:
165
	@${MKDIR} ${STAGEDIR}${DATADIR}
168
	@${MKDIR} ${STAGEDIR}${DATADIR}
(-)multimedia/mplayer/files/patch-configure (-14 / +249 lines)
Lines 1-5 Link Here
1
--- configure.orig	2014-08-23 15:59:32.000000000 +0200
1
--- configure
2
+++ configure	2014-11-01 11:03:04.283806013 +0100
2
+++ configure
3
@@ -644,12 +644,13 @@
3
@@ -644,12 +644,13 @@
4
 _armv6t2=auto
4
 _armv6t2=auto
5
 _armvfp=auto
5
 _armvfp=auto
Lines 32-37 Link Here
32
     ;;
32
     ;;
33
 
33
 
34
   esac
34
   esac
35
@@ -1649,7 +1649,7 @@
36
   esac
37
   echores "$cc_version"
38
 else
39
-  for _cc in "$_cc" gcc cc ; do
40
+  for _cc in "$_cc" clang cc ; do
41
     cc_name_tmp=$($_cc -v 2>&1 | tail -n 1 | cut -d ' ' -f 1)
42
     if test "$cc_name_tmp" = "gcc"; then
43
       cc_name=$cc_name_tmp
35
@@ -1727,7 +1727,7 @@
44
@@ -1727,7 +1727,7 @@
36
   case "$1" in
45
   case "$1" in
37
       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 ;;
46
       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 ;;
Lines 54-59 Link Here
54
 
63
 
55
 if test -z "$_target" ; then
64
 if test -z "$_target" ; then
56
   cat > $TMPC << EOF
65
   cat > $TMPC << EOF
66
@@ -2015,7 +2019,7 @@
67
   if test "$_gcc3_ext" != ""; then
68
     # If we had to disable SSE/SSE2 because the active kernel does not
69
     # support this instruction set extension, we also have to tell
70
-    # gcc3 to not generate SSE/SSE2 instructions for normal C code.
71
+    # clang to not generate SSE/SSE2 instructions for normal C code.
72
     cflag_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext"
73
   fi
74
 
75
@@ -2066,15 +2070,15 @@
76
         # AMD CPUs just from their signature. Instead, we check directly
77
         # whether it supports SSE.
78
         if test "$_sse" = yes; then
79
-            # gcc treats athlon-xp, athlon-4 and athlon-mp similarly.
80
+            # clang treats athlon-xp, athlon-4 and athlon-mp similarly.
81
             proc=athlon-xp
82
         else
83
-            # Again, gcc treats athlon and athlon-tbird similarly.
84
+            # Again, clang treats athlon and athlon-tbird similarly.
85
             proc=athlon
86
         fi
87
         ;;
88
     15) iproc=686
89
-        # k8 CPU type only supported in gcc >= 3.4.0, but that will be
90
+        # k8 CPU type only supported in clang >= 3.4.0, but that will be
91
         # caught and remedied in the optimization tests below.
92
         proc=k8
93
         ;;
94
@@ -2160,11 +2164,11 @@
95
   fi # test "$_runtime_cpudetection" = no
96
 
97
 
98
-    # check that gcc supports our CPU, if not, fall back to earlier ones
99
+    # check that clang supports our CPU, if not, fall back to earlier ones
100
     # LGB: check -mcpu and -march swithing step by step with enabling
101
     # to fall back till 386.
102
 
103
-    # gcc >= 3.4.0  doesn't support -mcpu, we have to use -mtune instead
104
+    # clang >= 3.4.0  doesn't support -mcpu, we have to use -mtune instead
105
 
106
     if [ "$cc_vendor" = "gnu" ] && ([ "$_cc_major" -gt 3 ] || ( [ "$_cc_major" = 3 ] && [ "$_cc_minor" -ge 4 ])) ; then
107
         cpuopt=-mtune
108
@@ -2294,7 +2298,7 @@
109
     def_fast_64bit='#define HAVE_FAST_64BIT 1'
110
     iproc='x86_64'
111
 
112
-    # gcc >= 3.4.0  doesn't support -mcpu, we have to use -mtune instead
113
+    # clang >= 3.4.0  doesn't support -mcpu, we have to use -mtune instead
114
     if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
115
         cpuopt=-mtune
116
     else
117
@@ -2350,7 +2354,7 @@
118
       if test "$proc" = "k8"; then
119
         cflag_check -march=$proc $cpuopt=$proc || proc=athlon-xp
120
       fi
121
-      # This will fail if gcc version < 3.3, which is OK because earlier
122
+      # This will fail if clang version < 3.3, which is OK because earlier
123
       # versions don't really support 64-bit on amd64.
124
       # Is this a valid assumption? -Corey
125
       if test "$proc" = "athlon-xp"; then
126
@@ -2470,7 +2474,7 @@
127
         fi
128
         ;;
129
       NetBSD)
130
-        # only gcc 3.4 works reliably with AltiVec code under NetBSD
131
+        # only clang 3.4 works reliably with AltiVec code under NetBSD
132
         case $cc_version in
133
             2*|3.0*|3.1*|3.2*|3.3*)
134
                 ;;
135
@@ -2507,7 +2511,7 @@
136
             POWER3) _march='-mcpu=power3' _mcpu='-mtune=power3' ;;
137
             *) ;;
138
         esac
139
-        # gcc 3.1(.1) and up supports 7400 and 7450
140
+        # clang 3.1(.1) and up supports 7400 and 7450
141
         if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "1" || test "$_cc_major" -ge "4"; then
142
             case "$proc" in
143
                 7400*|7410*) _march='-mcpu=7400' _mcpu='-mtune=7400' ;;
144
@@ -2515,7 +2519,7 @@
145
                 *) ;;
146
             esac
147
         fi
148
-        # gcc 3.2 and up supports 970
149
+        # clang 3.2 and up supports 970
150
         if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" || test "$_cc_major" -ge "4"; then
151
             case "$proc" in
152
                 970*|PPC970*) _march='-mcpu=970' _mcpu='-mtune=970'
153
@@ -2523,14 +2527,14 @@
154
                 *) ;;
155
             esac
156
         fi
157
-        # gcc 3.3 and up supports POWER4
158
+        # clang 3.3 and up supports POWER4
159
         if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "3" || test "$_cc_major" -ge "4"; then
160
             case "$proc" in
161
                 POWER4) _march='-mcpu=power4' _mcpu='-mtune=power4' ;;
162
                 *) ;;
163
             esac
164
         fi
165
-        # gcc 3.4 and up supports 440*
166
+        # clang 3.4 and up supports 440*
167
         if test "$_cc_major" -ge "3" && test "$_cc_minor" -ge "4" || test "$_cc_major" -ge "4"; then
168
             case "$proc" in
169
                 440EP*) _march='-mcpu=440fp' _mcpu='-mtune=440fp' ;;
170
@@ -2538,7 +2542,7 @@
171
                 *) ;;
172
             esac
173
         fi
174
-        # gcc 4.0 and up supports POWER5
175
+        # clang 4.0 and up supports POWER5
176
         if test "$_cc_major" -ge "4"; then
177
             case "$proc" in
178
                 POWER5*) _march='-mcpu=power5' _mcpu='-mtune=power5' ;;
179
@@ -2620,7 +2624,7 @@
180
             R5000) _march='-mips4' _mcpu='-mtune=r5000' ;;
181
             R8000|R10000|R12000|R14000|R16000) _march='-mips4' _mcpu='-mtune=r8000' ;;
182
         esac
183
-        # gcc < 3.x does not support -mtune.
184
+        # clang < 3.x does not support -mtune.
185
         if test "$cc_vendor" = "gnu" && test "$_cc_major" -lt 3 ; then
186
             _mcpu=''
187
         fi
188
@@ -2752,7 +2756,7 @@
189
 echocheck "GCC support of -mstackrealign"
190
 # GCC 4.2 and some earlier Apple versions support this flag on x86. Since
191
 # Mac OS X/Intel has an ABI different from Windows this is needed to avoid
192
-# crashes when loading Win32 DLLs. Unfortunately some gcc versions create
193
+# crashes when loading Win32 DLLs. Unfortunately some clang versions create
194
 # wrong code with this flag, but this can be worked around by adding
195
 # -fno-unit-at-a-time as described in the blog post at
196
 # http://www.dribin.org/dave/blog/archives/2006/12/05/missing_third_param/
197
@@ -2917,7 +2921,7 @@
198
 
199
 
200
 # Check if we need to compile as PIC for this combination of architecture, toolchain,
201
-# gcc configuration (e.g. hardened or not) and compiler options.
202
+# clang configuration (e.g. hardened or not) and compiler options.
203
 # Needs to be after the relocatable handling, since PIE changes whether we need PIC or not.
204
 echocheck "PIC"
205
 def_pic='#define CONFIG_PIC 0'
206
@@ -2966,7 +2970,7 @@
207
         "xor %0, %0"
208
         :"=b"(x)
209
         // just adding ebx to clobber list seems unreliable with some
210
-        // compilers, e.g. Haiku's gcc 2.95
211
+        // compilers, e.g. Haiku's clang 2.95
212
     );
213
     // and the above check does not work for OSX 64 bit...
214
     __asm__ volatile("":::"%ebx");
57
@@ -3152,6 +3156,13 @@
215
@@ -3152,6 +3156,13 @@
58
   fi
216
   fi
59
   echores "$vfpv3"
217
   echores "$vfpv3"
Lines 103-128 Link Here
103
     # for crosscompilation, we cannot execute the program, be happy if we can link statically
261
     # for crosscompilation, we cannot execute the program, be happy if we can link statically
104
     cc_check $THREAD_CFLAGS $ld_tmp && (tmp_run || test "$ld_static") && ld_pthread="$ld_tmp" && _pthreads=yes && break
262
     cc_check $THREAD_CFLAGS $ld_tmp && (tmp_run || test "$ld_static") && ld_pthread="$ld_tmp" && _pthreads=yes && break
105
   done
263
   done
106
@@ -4044,7 +4056,7 @@
264
@@ -4044,10 +4056,11 @@
107
   # NOTE: -L/usr/lib is a hack to avoid issues due to a
265
   # NOTE: -L/usr/lib is a hack to avoid issues due to a
108
   # broken libiconv that e.g. macports installs into /opt/local/lib
266
   # broken libiconv that e.g. macports installs into /opt/local/lib
109
   # which might get addded to the search path later by e.g. SDL
267
   # which might get addded to the search path later by e.g. SDL
110
-  for ld_tmp in "" "-L/usr/lib -liconv" "-liconv" "-liconv $ld_dl" ; do
268
-  for ld_tmp in "" "-L/usr/lib -liconv" "-liconv" "-liconv $ld_dl" ; do
111
+  for ld_tmp in "" "-L$_prefix/lib -liconv" "-L%%LOCALBASE%%/lib -liconv" "-liconv" "-liconv $ld_dl" ; do
269
-    cc_check $ld_tmp && extra_ldflags="$extra_ldflags $ld_tmp" &&
112
     cc_check $ld_tmp && extra_ldflags="$extra_ldflags $ld_tmp" &&
270
-      ld_iconv="$ld_tmp" && _iconv=yes && break
113
       ld_iconv="$ld_tmp" && _iconv=yes && break
271
-  done
272
+  #for ld_tmp in "" "-L/usr/lib -liconv" "-liconv" "-liconv $ld_dl" ; do
273
+  #  cc_check $ld_tmp && extra_ldflags="$extra_ldflags $ld_tmp" &&
274
+  #    ld_iconv="$ld_tmp" && _iconv=yes && break
275
+  #done
276
+  extra_ldflags="$extra_ldflags FREEBSD_ICONV_LIB" ld_iconv="$ld_tmp" && _iconv=yes
277
 fi
278
 if test "$_iconv" = yes ; then
279
   def_iconv='#define CONFIG_ICONV 1'
280
@@ -4079,7 +4092,7 @@
281
 echocheck "termcap"
282
 if test "$_termcap" = auto ; then
283
   _termcap=no
284
-  for ld_tmp in "-lncurses" "-ltinfo" "-ltermcap"; do
285
+  for ld_tmp in "/usr/lib/libncurses.so" "-ltinfo" "-ltermcap"; do
286
     statement_check term.h 'tgetent(0, 0)' $ld_tmp &&
287
       extra_ldflags="$extra_ldflags $ld_tmp" &&
288
       ld_termcap="$ld_tmp" && _termcap=yes && break
289
@@ -4515,7 +4528,7 @@
290
     fi
114
   done
291
   done
115
@@ -5996,7 +6008,7 @@
292
   if test $_cross_compile = no; then
293
-    for I in /usr/X11/include /usr/X11R7/include /usr/local/include /usr/X11R6/include \
294
+    for I in /usr/X11/include /usr/X11R7/include /usr/local/include /usr/local/include \
295
              /usr/include/X11R6 /usr/openwin/include ; do
296
       if test -f "$I/X11/Xlib.h" ; then
297
         extra_cflags="$extra_cflags -I$I"
298
@@ -4530,8 +4543,8 @@
299
 
300
 echocheck "X11"
301
 if test "$_x11" = auto && test "$_x11_headers" = yes ; then
302
-  for I in "" -L/usr/X11R7/lib -L/usr/local/lib -L/usr/X11R6/lib -L/usr/lib/X11R6 \
303
-           -L/usr/X11/lib -L/usr/lib32 -L/usr/openwin/lib -L/usr/local/lib64 -L/usr/X11R6/lib64 \
304
+  for I in "" -L/usr/X11R7/lib -L/usr/local/lib -L/usr/local/lib -L/usr/lib/X11R6 \
305
+           -L/usr/X11/lib -L/usr/lib32 -L/usr/openwin/lib -L/usr/local/lib64 -L/usr/local/lib64 \
306
            -L/usr/lib ; do
307
     if netbsd; then
308
       ld_tmp="$I -lXext -lX11 $ld_pthread -Wl,-R$(echo $I | sed s/^-L//)"
309
@@ -5996,7 +6009,7 @@
116
 elif dragonfly ; then
310
 elif dragonfly ; then
117
   default_cdrom_device="/dev/cd0"
311
   default_cdrom_device="/dev/cd0"
118
 elif freebsd ; then
312
 elif freebsd ; then
119
-  default_cdrom_device="/dev/acd0"
313
-  default_cdrom_device="/dev/acd0"
120
+  default_cdrom_device="/dev/cdrom"
314
+  default_cdrom_device="/dev/cd0"
121
 elif openbsd ; then
315
 elif openbsd ; then
122
   default_cdrom_device="/dev/rcd0c"
316
   default_cdrom_device="/dev/rcd0c"
123
 elif sunos ; then
317
 elif sunos ; then
124
@@ -6009,7 +6021,7 @@
318
@@ -6006,15 +6019,15 @@
125
   default_cdrom_device="/dev/cdrom"
319
 elif amigaos ; then
320
   default_cdrom_device="a1ide.device:2"
321
 else
322
-  default_cdrom_device="/dev/cdrom"
323
+  default_cdrom_device="/dev/cd0"
126
 fi
324
 fi
127
 
325
 
128
-if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos ; then
326
-if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos ; then
Lines 130-136 Link Here
130
   default_dvd_device=$default_cdrom_device
328
   default_dvd_device=$default_cdrom_device
131
 elif darwin ; then
329
 elif darwin ; then
132
   default_dvd_device="/dev/rdiskN"
330
   default_dvd_device="/dev/rdiskN"
133
@@ -6609,7 +6621,7 @@
331
 else
332
-  default_dvd_device="/dev/dvd"
333
+  default_dvd_device="/dev/cd0"
334
 fi
335
 
336
 
337
@@ -6455,10 +6468,10 @@
338
 echocheck "bzlib"
339
 bzlib=no
340
 def_bzlib='#define CONFIG_BZLIB 0'
341
-statement_check bzlib.h 'BZ2_bzlibVersion()' -lbz2 && bzlib=yes
342
+statement_check bzlib.h 'BZ2_bzlibVersion()' /usr/lib/libbz2.so && bzlib=yes
343
 if test "$bzlib" = yes ; then
344
   def_bzlib='#define CONFIG_BZLIB 1'
345
-  extra_ldflags="$extra_ldflags -lbz2"
346
+  extra_ldflags="$extra_ldflags /usr/lib/libbz2.so"
347
 fi
348
 echores "$bzlib"
349
 
350
@@ -6609,7 +6622,7 @@
134
 echocheck "libgsm"
351
 echocheck "libgsm"
135
 if test "$_libgsm" = auto ; then
352
 if test "$_libgsm" = auto ; then
136
   _libgsm=no
353
   _libgsm=no
Lines 139-145 Link Here
139
 fi
356
 fi
140
 if test "$_libgsm" = yes ; then
357
 if test "$_libgsm" = yes ; then
141
   def_libgsm='#define CONFIG_LIBGSM 1'
358
   def_libgsm='#define CONFIG_LIBGSM 1'
142
@@ -7094,6 +7106,16 @@
359
@@ -7094,6 +7107,16 @@
143
   nolibrtmp=no
360
   nolibrtmp=no
144
   def_librtmp='#define CONFIG_LIBRTMP 1'
361
   def_librtmp='#define CONFIG_LIBRTMP 1'
145
   inputmodules="librtmp $inputmodules"
362
   inputmodules="librtmp $inputmodules"
Lines 156-162 Link Here
156
 else
373
 else
157
   nolibrtmp=yes
374
   nolibrtmp=yes
158
   _librtmp=no
375
   _librtmp=no
159
@@ -7493,7 +7515,7 @@
376
@@ -7493,7 +7516,7 @@
160
 echocheck "mencoder"
377
 echocheck "mencoder"
161
 if test "$_mencoder" = no ; then
378
 if test "$_mencoder" = no ; then
162
   # mpeg1video for vf_lavc, snow for vf_uspp / vf_mcdeint,
379
   # mpeg1video for vf_lavc, snow for vf_uspp / vf_mcdeint,
Lines 165-171 Link Here
165
 fi
382
 fi
166
 echores "$_mencoder"
383
 echores "$_mencoder"
167
 
384
 
168
@@ -8422,7 +8444,7 @@
385
@@ -8118,7 +8141,7 @@
386
 
387
 #############################################################################
388
 
389
-CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
390
+CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64"
391
 
392
 CXXFLAGS=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
393
 
394
@@ -8422,7 +8445,7 @@
169
 EXESUF      = $_exesuf
395
 EXESUF      = $_exesuf
170
 EXESUFS_ALL = .exe
396
 EXESUFS_ALL = .exe
171
 
397
 
Lines 174-176 Link Here
174
 $(mak_enable "$arch_all"    "$arch"    ARCH)
400
 $(mak_enable "$arch_all"    "$arch"    ARCH)
175
 $(mak_enable "$subarch_all" "$subarch" ARCH)
401
 $(mak_enable "$subarch_all" "$subarch" ARCH)
176
 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
402
 $(mak_enable "$cpuexts_all" "$cpuexts" HAVE)
403
@@ -8628,7 +8651,7 @@
404
 AS_C       = -c
405
 CC_C       = -c
406
 CXX_C      = -c
407
-LD         = gcc
408
+LD         = clang
409
 RANLIB     = $_ranlib
410
 YASM       = $_yasm
411
 DEPYASM    = $_yasm

Return to bug 195065