Tue Dec 7 12:24:22 2021 UTC ()
libvpx: Fix platform matches.

Fixes build on Darwin 18/19, simplifies other matches, and reduces pkglint
warnings.


(jperkin)
diff -r1.91 -r1.92 pkgsrc/multimedia/libvpx/Makefile

cvs diff -r1.91 -r1.92 pkgsrc/multimedia/libvpx/Makefile (switch to unified diff)

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