summaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg2/patches/patch-configure
blob: 4a3d922b000715afcba1402eee3bdff4b3cd76fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
$NetBSD: patch-configure,v 1.11 2019/01/03 11:56:09 bsiegert Exp $

--- configure.orig	2018-02-19 00:50:31.000000000 +0000
+++ configure
@@ -3868,7 +3868,7 @@ case "$arch" in
     sh4|sh)
         arch="sh4"
     ;;
-    sun4u|sparc*)
+    sun4*|sparc*)
         arch="sparc"
     ;;
     tilegx|tile-gx)
@@ -4301,6 +4301,11 @@ case $target_os in
         ;;
     netbsd)
         disable symver
+        # NetBSD/macppc *really* needs PIC enabled.  ffmpeg has repeatedly
+        # broken time and time again because PIC support has been removed
+        # from architectures that need it.  So, if you touch this, please
+        # be careful and make sure that your changes work.
+        test "${subarch}" != "x86_32" && enable pic
         oss_indev_extralibs="-lossaudio"
         oss_outdev_extralibs="-lossaudio"
         enabled gcc || check_ldflags -Wl,-zmuldefs
@@ -4719,10 +4724,13 @@ check_cc <<EOF && enable attribute_may_a
 union { int x; } __attribute__((may_alias)) x;
 EOF
 
-check_cc <<EOF || die "endian test failed"
-unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
+check_exec <<EOF || enable bigendian
+int main()
+{
+ long one = 1;
+ return !(*((char *)(&one)));
+}
 EOF
-od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
 
 if ! enabled ppc64 || enabled bigendian; then
     disable vsx
@@ -5353,7 +5361,8 @@ enabled opengl            && { check_lib
                                check_lib2 ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
                                die "ERROR: opengl not found."
                              }
-enabled openssl           && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
+enabled openssl           && { check_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl ||
+                               check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
                                check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
                                check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
                                die "ERROR: openssl not found"; }
@@ -5591,6 +5600,7 @@ enabled xmm_clobber_test &&
                   -Wl,--wrap,sws_scale ||
     disable xmm_clobber_test
 
+if false; then
 echo "X{};" > $TMPV
 if test_ldflags -Wl,--version-script,$TMPV; then
     append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver'
@@ -5603,6 +5613,7 @@ __asm__(".symver ff_foo,av_foo@VERSION")
 void ff_foo(void) {}
 EOF
 fi
+fi
 
 if [ -z "$optflags" ]; then
     if enabled small; then
@@ -6236,7 +6247,7 @@ Version: $version
 Requires: $(enabled shared || echo $requires)
 Requires.private: $(enabled shared && echo $requires)
 Conflicts:
-Libs: -L\${libdir} $(enabled rpath && echo "-Wl,-rpath,\${libdir}") -l${shortname} $(enabled shared || echo $libs)
+Libs: -L\${libdir} -Wl,-R\${libdir} $(enabled rpath && echo "-Wl,-rpath,\${libdir}") -l${shortname} $(enabled shared || echo $libs)
 Libs.private: $(enabled shared && echo $libs)
 Cflags: -I\${includedir}
 EOF