Thu May 10 21:10:38 2018 UTC ()
Disable runtime CPU detection on NetBSD/aarch64


(jmcneill)
diff -r1.72 -r1.73 pkgsrc/multimedia/libvpx/Makefile

cvs diff -r1.72 -r1.73 pkgsrc/multimedia/libvpx/Makefile (switch to unified diff)

--- pkgsrc/multimedia/libvpx/Makefile 2018/01/28 16:04:11 1.72
+++ pkgsrc/multimedia/libvpx/Makefile 2018/05/10 21:10:38 1.73
@@ -1,138 +1,138 @@ @@ -1,138 +1,138 @@
1# $NetBSD: Makefile,v 1.72 2018/01/28 16:04:11 wiz Exp $ 1# $NetBSD: Makefile,v 1.73 2018/05/10 21:10:38 jmcneill Exp $
2 2
3DISTNAME= libvpx-1.7.0 3DISTNAME= libvpx-1.7.0
4CATEGORIES= multimedia 4CATEGORIES= multimedia
5MASTER_SITES= ${MASTER_SITE_GITHUB:=webmproject/} 5MASTER_SITES= ${MASTER_SITE_GITHUB:=webmproject/}
6GITHUB_PROJECT= libvpx 6GITHUB_PROJECT= libvpx
7GITHUB_TAG= v${PKGVERSION_NOREV} 7GITHUB_TAG= v${PKGVERSION_NOREV}
8 8
9MAINTAINER= ryoon@NetBSD.org 9MAINTAINER= ryoon@NetBSD.org
10HOMEPAGE= https://chromium.googlesource.com/webm/libvpx 10HOMEPAGE= https://chromium.googlesource.com/webm/libvpx
11COMMENT= On2 VP8 library from Google 11COMMENT= On2 VP8 library from Google
12LICENSE= modified-bsd 12LICENSE= modified-bsd
13 13
14USE_LANGUAGES= c c++11 14USE_LANGUAGES= c c++11
15USE_LIBTOOL= yes 15USE_LIBTOOL= yes
16USE_TOOLS+= gmake bash:build perl:build 16USE_TOOLS+= gmake bash:build perl:build
17HAS_CONFIGURE= yes 17HAS_CONFIGURE= yes
18CONFIG_SHELL= ${BASH} 18CONFIG_SHELL= ${BASH}
19CONFIGURE_ARGS+= --disable-postproc 19CONFIGURE_ARGS+= --disable-postproc
20CONFIGURE_ARGS+= --enable-pic 20CONFIGURE_ARGS+= --enable-pic
21CONFIGURE_ARGS+= --enable-runtime-cpu-detect 21CONFIGURE_ARGS+= --enable-runtime-cpu-detect
22CONFIGURE_ARGS+= --prefix=${PREFIX} 22CONFIGURE_ARGS+= --prefix=${PREFIX}
23CONFIGURE_ARGS+= --disable-unit-tests 23CONFIGURE_ARGS+= --disable-unit-tests
24 24
25.include "../../mk/bsd.prefs.mk" 25.include "../../mk/bsd.prefs.mk"
26 26
27.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" 27.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
28. if ${PKGSRC_COMPILER} == "gcc" && (${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS") 28. if ${PKGSRC_COMPILER} == "gcc" && (${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS")
29# PR pkg/48508: GCC 4.4 or later is required to compile ssse3 code on NetBSD & Solaris. 29# PR pkg/48508: GCC 4.4 or later is required to compile ssse3 code on NetBSD & Solaris.
30GCC_REQD+= 4.4 30GCC_REQD+= 4.4
31. endif 31. endif
32 32
33BUILD_DEPENDS+= yasm-[0-9]*:../../devel/yasm 33BUILD_DEPENDS+= yasm-[0-9]*:../../devel/yasm
34.endif 34.endif
35 35
36REPLACE_BASH= configure 36REPLACE_BASH= configure
37REPLACE_BASH+= build/make/configure.sh 37REPLACE_BASH+= build/make/configure.sh
38REPLACE_BASH+= build/make/version.sh 38REPLACE_BASH+= build/make/version.sh
39REPLACE_BASH+= build/make/gen_asm_deps.sh 39REPLACE_BASH+= build/make/gen_asm_deps.sh
40 40
41REPLACE_PERL= build/make/ads2gas.pl 41REPLACE_PERL= build/make/ads2gas.pl
42 42
43.if ${OPSYS} == "Darwin" 43.if ${OPSYS} == "Darwin"
44BUILDLINK_TRANSFORM+= rm:-Wl,-Bsymbolic 44BUILDLINK_TRANSFORM+= rm:-Wl,-Bsymbolic
45. if ${MACHINE_ARCH} == "i386" 45. if ${MACHINE_ARCH} == "i386"
46. if !empty(OS_VERSION:M1[3-9].*) 46. if !empty(OS_VERSION:M1[3-9].*)
47CONFIGURE_ARGS+= --target=x86-darwin13-gcc 47CONFIGURE_ARGS+= --target=x86-darwin13-gcc
48. elif !empty(OS_VERSION:M12.*) 48. elif !empty(OS_VERSION:M12.*)
49CONFIGURE_ARGS+= --target=x86-darwin12-gcc 49CONFIGURE_ARGS+= --target=x86-darwin12-gcc
50. elif !empty(OS_VERSION:M11.*) 50. elif !empty(OS_VERSION:M11.*)
51CONFIGURE_ARGS+= --target=x86-darwin11-gcc 51CONFIGURE_ARGS+= --target=x86-darwin11-gcc
52. elif !empty(OS_VERSION:M10.*) 52. elif !empty(OS_VERSION:M10.*)
53CONFIGURE_ARGS+= --target=x86-darwin10-gcc 53CONFIGURE_ARGS+= --target=x86-darwin10-gcc
54. elif !empty(OS_VERSION:M9.*) 54. elif !empty(OS_VERSION:M9.*)
55CONFIGURE_ARGS+= --target=x86-darwin9-gcc 55CONFIGURE_ARGS+= --target=x86-darwin9-gcc
56. else 56. else
57CONFIGURE_ARGS+= --target=x86-darwin8-gcc 57CONFIGURE_ARGS+= --target=x86-darwin8-gcc
58. endif 58. endif
59. elif ${MACHINE_ARCH} == "x86_64" 59. elif ${MACHINE_ARCH} == "x86_64"
60. if !empty(OS_VERSION:M1[3-9].*) 60. if !empty(OS_VERSION:M1[3-9].*)
61CONFIGURE_ARGS+= --target=x86_64-darwin13-gcc 61CONFIGURE_ARGS+= --target=x86_64-darwin13-gcc
62. elif !empty(OS_VERSION:M12.*) 62. elif !empty(OS_VERSION:M12.*)
63CONFIGURE_ARGS+= --target=x86_64-darwin12-gcc 63CONFIGURE_ARGS+= --target=x86_64-darwin12-gcc
64. elif !empty(OS_VERSION:M11.*) 64. elif !empty(OS_VERSION:M11.*)
65CONFIGURE_ARGS+= --target=x86_64-darwin11-gcc 65CONFIGURE_ARGS+= --target=x86_64-darwin11-gcc
66. elif !empty(OS_VERSION:M10.*) 66. elif !empty(OS_VERSION:M10.*)
67CONFIGURE_ARGS+= --target=x86_64-darwin10-gcc 67CONFIGURE_ARGS+= --target=x86_64-darwin10-gcc
68. else 68. else
69CONFIGURE_ARGS+= --target=x86_64-darwin9-gcc 69CONFIGURE_ARGS+= --target=x86_64-darwin9-gcc
70. endif 70. endif
71. elif ${MACHINE_ARCH} == "powerpc" 71. elif ${MACHINE_ARCH} == "powerpc"
72. if !empty(OS_VERSION:M9.*) 72. if !empty(OS_VERSION:M9.*)
73CONFIGURE_ARGS+= --target=ppc32-darwin9-gcc 73CONFIGURE_ARGS+= --target=ppc32-darwin9-gcc
74. else 74. else
75CONFIGURE_ARGS+= --target=ppc32-darwin8-gcc 75CONFIGURE_ARGS+= --target=ppc32-darwin8-gcc
76. endif 76. endif
77. endif 77. endif
78.elif ${OPSYS} == "SunOS" && !empty(PKGSRC_COMPILER:Mgcc*) 78.elif ${OPSYS} == "SunOS" && !empty(PKGSRC_COMPILER:Mgcc*)
79. if ${MACHINE_ARCH} == "x86_64" 79. if ${MACHINE_ARCH} == "x86_64"
80CONFIGURE_ARGS+= --target=x86_64-solaris-gcc 80CONFIGURE_ARGS+= --target=x86_64-solaris-gcc
81. elif ${MACHINE_ARCH} == "i386" 81. elif ${MACHINE_ARCH} == "i386"
82CONFIGURE_ARGS+= --target=x86-solaris-gcc 82CONFIGURE_ARGS+= --target=x86-solaris-gcc
83# Disable libyuv SSE code, it doesn't compile at present. 83# Disable libyuv SSE code, it doesn't compile at present.
84CFLAGS+= -U__SSE2__ 84CFLAGS+= -U__SSE2__
85. endif 85. endif
86.endif 86.endif
87 87
88.if !empty(PKGSRC_COMPILER:Mclang) 88.if !empty(PKGSRC_COMPILER:Mclang)
89. if ${OPSYS} == "NetBSD" || ${OPSYS} == "Darwin" 89. if ${OPSYS} == "NetBSD" || ${OPSYS} == "Darwin"
90# https://bugzilla.mozilla.org/show_bug.cgi?id=982693 90# https://bugzilla.mozilla.org/show_bug.cgi?id=982693
91SUBST_CLASSES+= clang 91SUBST_CLASSES+= clang
92SUBST_STAGE.clang= pre-configure 92SUBST_STAGE.clang= pre-configure
93SUBST_FILES.clang= build/make/Makefile 93SUBST_FILES.clang= build/make/Makefile
94SUBST_MESSAGE.clang= Disabling clang integrated assembler 94SUBST_MESSAGE.clang= Disabling clang integrated assembler
95# Test for whether clang supports -fno-integrated-as instead of -no-integrated-as 95# Test for whether clang supports -fno-integrated-as instead of -no-integrated-as
96CLANG_INTEGRATED_AS!= if ${CCPATH:Utrue} --version -fno-integrated-as > /dev/null 2>&1; then ${ECHO} "-fno-integrated-as"; else ${ECHO} "-no-integrated-as"; fi 96CLANG_INTEGRATED_AS!= if ${CCPATH:Utrue} --version -fno-integrated-as > /dev/null 2>&1; then ${ECHO} "-fno-integrated-as"; else ${ECHO} "-no-integrated-as"; fi
97SUBST_SED.clang= -e 's/-DINLINE_ASM/-DINLINE_ASM ${CLANG_INTEGRATED_AS}/' 97SUBST_SED.clang= -e 's/-DINLINE_ASM/-DINLINE_ASM ${CLANG_INTEGRATED_AS}/'
98. endif 98. endif
99.endif 99.endif
100 100
101.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "mipsel" 101.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "mipsel"
102CONFIGURE_ARGS+= --target=mips32-linux-gcc 102CONFIGURE_ARGS+= --target=mips32-linux-gcc
103.endif 103.endif
104 104
105.if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) 105.if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) || !empty(MACHINE_PLATFORM:MNetBSD-*-*aarch64*)
106CONFIGURE_ARGS+= --disable-runtime-cpu-detect 106CONFIGURE_ARGS+= --disable-runtime-cpu-detect
107.endif 107.endif
108 108
109BUILDLINK_TRANSFORM.MirBSD+= rm:-lrt 109BUILDLINK_TRANSFORM.MirBSD+= rm:-lrt
110# Compiler is too old for these newfangled features 110# Compiler is too old for these newfangled features
111CONFIGURE_ENV.MirBSD+= sse2=no sse3=no ssse3=no sse4_1=no 111CONFIGURE_ENV.MirBSD+= sse2=no sse3=no ssse3=no sse4_1=no
112# runtime_cpu_detect=no 112# runtime_cpu_detect=no
113CONFIGURE_ENV.MirBSD+= RTCD_OPTIONS='--disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4_1' 113CONFIGURE_ENV.MirBSD+= RTCD_OPTIONS='--disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4_1'
114CONFIGURE_ARGS.MirBSD+= --disable-runtime-cpu-detect 114CONFIGURE_ARGS.MirBSD+= --disable-runtime-cpu-detect
115 115
116# Under Solaris 10 its /usr/xpg4/bin/tr is not sufficient. PR pkg/48508 116# Under Solaris 10 its /usr/xpg4/bin/tr is not sufficient. PR pkg/48508
117.if !empty(MACHINE_PLATFORM:MSunOS-5.10*) 117.if !empty(MACHINE_PLATFORM:MSunOS-5.10*)
118BUILD_DEPENDS= coreutils-[0-9]*:../../sysutils/coreutils 118BUILD_DEPENDS= coreutils-[0-9]*:../../sysutils/coreutils
119TOOLS_PLATFORM.tr= ${LOCALBASE}/bin/gtr 119TOOLS_PLATFORM.tr= ${LOCALBASE}/bin/gtr
120.endif 120.endif
121 121
122BUILD_TARGET= # none 122BUILD_TARGET= # none
123 123
124post-extract: 124post-extract:
125 ${CP} ${FILESDIR}/strip_fPIC.sh ${WRKSRC} 125 ${CP} ${FILESDIR}/strip_fPIC.sh ${WRKSRC}
126 126
127PKGCONFIG_OVERRIDE+= vpx.pc 127PKGCONFIG_OVERRIDE+= vpx.pc
128PKGCONFIG_OVERRIDE_STAGE= post-build 128PKGCONFIG_OVERRIDE_STAGE= post-build
129 129
130# PR pkg/48508: newer gas from binutils is required to compile ssse3 code. 130# PR pkg/48508: newer gas from binutils is required to compile ssse3 code.
131.if !empty(MACHINE_PLATFORM:MNetBSD-5.*) || \ 131.if !empty(MACHINE_PLATFORM:MNetBSD-5.*) || \
132 !empty(MACHINE_PLATFORM:MSunOS-5.10*) || \ 132 !empty(MACHINE_PLATFORM:MSunOS-5.10*) || \
133 !empty(MACHINE_PLATFORM:MOpenBSD-5*) 133 !empty(MACHINE_PLATFORM:MOpenBSD-5*)
134.include "../../devel/binutils/buildlink3.mk" 134.include "../../devel/binutils/buildlink3.mk"
135.include "../../devel/binutils/override-as.mk" 135.include "../../devel/binutils/override-as.mk"
136.endif 136.endif
137.include "../../mk/pthread.buildlink3.mk" 137.include "../../mk/pthread.buildlink3.mk"
138.include "../../mk/bsd.pkg.mk" 138.include "../../mk/bsd.pkg.mk"