| @@ -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 | |
3 | DISTNAME= libvpx-1.7.0 | | 3 | DISTNAME= libvpx-1.7.0 |
4 | CATEGORIES= multimedia | | 4 | CATEGORIES= multimedia |
5 | MASTER_SITES= ${MASTER_SITE_GITHUB:=webmproject/} | | 5 | MASTER_SITES= ${MASTER_SITE_GITHUB:=webmproject/} |
6 | GITHUB_PROJECT= libvpx | | 6 | GITHUB_PROJECT= libvpx |
7 | GITHUB_TAG= v${PKGVERSION_NOREV} | | 7 | GITHUB_TAG= v${PKGVERSION_NOREV} |
8 | | | 8 | |
9 | MAINTAINER= ryoon@NetBSD.org | | 9 | MAINTAINER= ryoon@NetBSD.org |
10 | HOMEPAGE= https://chromium.googlesource.com/webm/libvpx | | 10 | HOMEPAGE= https://chromium.googlesource.com/webm/libvpx |
11 | COMMENT= On2 VP8 library from Google | | 11 | COMMENT= On2 VP8 library from Google |
12 | LICENSE= modified-bsd | | 12 | LICENSE= modified-bsd |
13 | | | 13 | |
14 | USE_LANGUAGES= c c++11 | | 14 | USE_LANGUAGES= c c++11 |
15 | USE_LIBTOOL= yes | | 15 | USE_LIBTOOL= yes |
16 | USE_TOOLS+= gmake bash:build perl:build | | 16 | USE_TOOLS+= gmake bash:build perl:build |
17 | HAS_CONFIGURE= yes | | 17 | HAS_CONFIGURE= yes |
18 | CONFIG_SHELL= ${BASH} | | 18 | CONFIG_SHELL= ${BASH} |
19 | CONFIGURE_ARGS+= --disable-postproc | | 19 | CONFIGURE_ARGS+= --disable-postproc |
20 | CONFIGURE_ARGS+= --enable-pic | | 20 | CONFIGURE_ARGS+= --enable-pic |
21 | CONFIGURE_ARGS+= --enable-runtime-cpu-detect | | 21 | CONFIGURE_ARGS+= --enable-runtime-cpu-detect |
22 | CONFIGURE_ARGS+= --prefix=${PREFIX} | | 22 | CONFIGURE_ARGS+= --prefix=${PREFIX} |
23 | CONFIGURE_ARGS+= --disable-unit-tests | | 23 | CONFIGURE_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. |
30 | GCC_REQD+= 4.4 | | 30 | GCC_REQD+= 4.4 |
31 | . endif | | 31 | . endif |
32 | | | 32 | |
33 | BUILD_DEPENDS+= yasm-[0-9]*:../../devel/yasm | | 33 | BUILD_DEPENDS+= yasm-[0-9]*:../../devel/yasm |
34 | .endif | | 34 | .endif |
35 | | | 35 | |
36 | REPLACE_BASH= configure | | 36 | REPLACE_BASH= configure |
37 | REPLACE_BASH+= build/make/configure.sh | | 37 | REPLACE_BASH+= build/make/configure.sh |
38 | REPLACE_BASH+= build/make/version.sh | | 38 | REPLACE_BASH+= build/make/version.sh |
39 | REPLACE_BASH+= build/make/gen_asm_deps.sh | | 39 | REPLACE_BASH+= build/make/gen_asm_deps.sh |
40 | | | 40 | |
41 | REPLACE_PERL= build/make/ads2gas.pl | | 41 | REPLACE_PERL= build/make/ads2gas.pl |
42 | | | 42 | |
43 | .if ${OPSYS} == "Darwin" | | 43 | .if ${OPSYS} == "Darwin" |
44 | BUILDLINK_TRANSFORM+= rm:-Wl,-Bsymbolic | | 44 | BUILDLINK_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].*) |
47 | CONFIGURE_ARGS+= --target=x86-darwin13-gcc | | 47 | CONFIGURE_ARGS+= --target=x86-darwin13-gcc |
48 | . elif !empty(OS_VERSION:M12.*) | | 48 | . elif !empty(OS_VERSION:M12.*) |
49 | CONFIGURE_ARGS+= --target=x86-darwin12-gcc | | 49 | CONFIGURE_ARGS+= --target=x86-darwin12-gcc |
50 | . elif !empty(OS_VERSION:M11.*) | | 50 | . elif !empty(OS_VERSION:M11.*) |
51 | CONFIGURE_ARGS+= --target=x86-darwin11-gcc | | 51 | CONFIGURE_ARGS+= --target=x86-darwin11-gcc |
52 | . elif !empty(OS_VERSION:M10.*) | | 52 | . elif !empty(OS_VERSION:M10.*) |
53 | CONFIGURE_ARGS+= --target=x86-darwin10-gcc | | 53 | CONFIGURE_ARGS+= --target=x86-darwin10-gcc |
54 | . elif !empty(OS_VERSION:M9.*) | | 54 | . elif !empty(OS_VERSION:M9.*) |
55 | CONFIGURE_ARGS+= --target=x86-darwin9-gcc | | 55 | CONFIGURE_ARGS+= --target=x86-darwin9-gcc |
56 | . else | | 56 | . else |
57 | CONFIGURE_ARGS+= --target=x86-darwin8-gcc | | 57 | CONFIGURE_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].*) |
61 | CONFIGURE_ARGS+= --target=x86_64-darwin13-gcc | | 61 | CONFIGURE_ARGS+= --target=x86_64-darwin13-gcc |
62 | . elif !empty(OS_VERSION:M12.*) | | 62 | . elif !empty(OS_VERSION:M12.*) |
63 | CONFIGURE_ARGS+= --target=x86_64-darwin12-gcc | | 63 | CONFIGURE_ARGS+= --target=x86_64-darwin12-gcc |
64 | . elif !empty(OS_VERSION:M11.*) | | 64 | . elif !empty(OS_VERSION:M11.*) |
65 | CONFIGURE_ARGS+= --target=x86_64-darwin11-gcc | | 65 | CONFIGURE_ARGS+= --target=x86_64-darwin11-gcc |
66 | . elif !empty(OS_VERSION:M10.*) | | 66 | . elif !empty(OS_VERSION:M10.*) |
67 | CONFIGURE_ARGS+= --target=x86_64-darwin10-gcc | | 67 | CONFIGURE_ARGS+= --target=x86_64-darwin10-gcc |
68 | . else | | 68 | . else |
69 | CONFIGURE_ARGS+= --target=x86_64-darwin9-gcc | | 69 | CONFIGURE_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.*) |
73 | CONFIGURE_ARGS+= --target=ppc32-darwin9-gcc | | 73 | CONFIGURE_ARGS+= --target=ppc32-darwin9-gcc |
74 | . else | | 74 | . else |
75 | CONFIGURE_ARGS+= --target=ppc32-darwin8-gcc | | 75 | CONFIGURE_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" |
80 | CONFIGURE_ARGS+= --target=x86_64-solaris-gcc | | 80 | CONFIGURE_ARGS+= --target=x86_64-solaris-gcc |
81 | . elif ${MACHINE_ARCH} == "i386" | | 81 | . elif ${MACHINE_ARCH} == "i386" |
82 | CONFIGURE_ARGS+= --target=x86-solaris-gcc | | 82 | CONFIGURE_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. |
84 | CFLAGS+= -U__SSE2__ | | 84 | CFLAGS+= -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 |
91 | SUBST_CLASSES+= clang | | 91 | SUBST_CLASSES+= clang |
92 | SUBST_STAGE.clang= pre-configure | | 92 | SUBST_STAGE.clang= pre-configure |
93 | SUBST_FILES.clang= build/make/Makefile | | 93 | SUBST_FILES.clang= build/make/Makefile |
94 | SUBST_MESSAGE.clang= Disabling clang integrated assembler | | 94 | SUBST_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 |
96 | CLANG_INTEGRATED_AS!= if ${CCPATH:Utrue} --version -fno-integrated-as > /dev/null 2>&1; then ${ECHO} "-fno-integrated-as"; else ${ECHO} "-no-integrated-as"; fi | | 96 | CLANG_INTEGRATED_AS!= if ${CCPATH:Utrue} --version -fno-integrated-as > /dev/null 2>&1; then ${ECHO} "-fno-integrated-as"; else ${ECHO} "-no-integrated-as"; fi |
97 | SUBST_SED.clang= -e 's/-DINLINE_ASM/-DINLINE_ASM ${CLANG_INTEGRATED_AS}/' | | 97 | SUBST_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" |
102 | CONFIGURE_ARGS+= --target=mips32-linux-gcc | | 102 | CONFIGURE_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*) |
106 | CONFIGURE_ARGS+= --disable-runtime-cpu-detect | | 106 | CONFIGURE_ARGS+= --disable-runtime-cpu-detect |
107 | .endif | | 107 | .endif |
108 | | | 108 | |
109 | BUILDLINK_TRANSFORM.MirBSD+= rm:-lrt | | 109 | BUILDLINK_TRANSFORM.MirBSD+= rm:-lrt |
110 | # Compiler is too old for these newfangled features | | 110 | # Compiler is too old for these newfangled features |
111 | CONFIGURE_ENV.MirBSD+= sse2=no sse3=no ssse3=no sse4_1=no | | 111 | CONFIGURE_ENV.MirBSD+= sse2=no sse3=no ssse3=no sse4_1=no |
112 | # runtime_cpu_detect=no | | 112 | # runtime_cpu_detect=no |
113 | CONFIGURE_ENV.MirBSD+= RTCD_OPTIONS='--disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4_1' | | 113 | CONFIGURE_ENV.MirBSD+= RTCD_OPTIONS='--disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4_1' |
114 | CONFIGURE_ARGS.MirBSD+= --disable-runtime-cpu-detect | | 114 | CONFIGURE_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*) |
118 | BUILD_DEPENDS= coreutils-[0-9]*:../../sysutils/coreutils | | 118 | BUILD_DEPENDS= coreutils-[0-9]*:../../sysutils/coreutils |
119 | TOOLS_PLATFORM.tr= ${LOCALBASE}/bin/gtr | | 119 | TOOLS_PLATFORM.tr= ${LOCALBASE}/bin/gtr |
120 | .endif | | 120 | .endif |
121 | | | 121 | |
122 | BUILD_TARGET= # none | | 122 | BUILD_TARGET= # none |
123 | | | 123 | |
124 | post-extract: | | 124 | post-extract: |
125 | ${CP} ${FILESDIR}/strip_fPIC.sh ${WRKSRC} | | 125 | ${CP} ${FILESDIR}/strip_fPIC.sh ${WRKSRC} |
126 | | | 126 | |
127 | PKGCONFIG_OVERRIDE+= vpx.pc | | 127 | PKGCONFIG_OVERRIDE+= vpx.pc |
128 | PKGCONFIG_OVERRIDE_STAGE= post-build | | 128 | PKGCONFIG_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" |