Thu Nov 9 16:48:04 2023 UTC ()
libvpx: Fix building on funny old architectures with funny old compilers


(nia)
diff -r1.101 -r1.102 pkgsrc/multimedia/libvpx/Makefile

cvs diff -r1.101 -r1.102 pkgsrc/multimedia/libvpx/Makefile (expand / switch to unified diff)

--- pkgsrc/multimedia/libvpx/Makefile 2023/10/01 08:20:19 1.101
+++ pkgsrc/multimedia/libvpx/Makefile 2023/11/09 16:48:03 1.102
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.101 2023/10/01 08:20:19 wiz Exp $ 1# $NetBSD: Makefile,v 1.102 2023/11/09 16:48:03 nia Exp $
2 2
3DISTNAME= libvpx-1.13.1 3DISTNAME= libvpx-1.13.1
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_CXX_FEATURES+= c++11 14USE_CXX_FEATURES+= c++11
@@ -83,26 +83,41 @@ SUBST_SED.clang= -e 's/-DINLINE_ASM/-DIN @@ -83,26 +83,41 @@ SUBST_SED.clang= -e 's/-DINLINE_ASM/-DIN
83 83
84.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "mipsel" 84.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "mipsel"
85CONFIGURE_ARGS+= --target=mips32-linux-gcc 85CONFIGURE_ARGS+= --target=mips32-linux-gcc
86.endif 86.endif
87 87
88.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "powerpc" 88.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "powerpc"
89CONFIGURE_ARGS+= --target=generic-gnu 89CONFIGURE_ARGS+= --target=generic-gnu
90.endif 90.endif
91 91
92.if ${MACHINE_PLATFORM:MNetBSD-*-*arm*} || ${MACHINE_PLATFORM:MNetBSD-*-*aarch64*} 92.if ${MACHINE_PLATFORM:MNetBSD-*-*arm*} || ${MACHINE_PLATFORM:MNetBSD-*-*aarch64*}
93CONFIGURE_ARGS+= --disable-runtime-cpu-detect 93CONFIGURE_ARGS+= --disable-runtime-cpu-detect
94.endif 94.endif
95 95
 96.include "../../mk/compiler.mk"
 97
 98# Requires special atomic support.
 99# This is a mirror of the checks the software does in vpx_util/vpx_atomics.h
 100#
 101# There is inline assembler for i386, x86_64, arm, and mips.
 102.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64" && \
 103 !${MACHINE_ARCH:M*mips*} && !${MACHINE_ARCH:M*arm*}
 104# All other platforms need the GCC atomic builtins.
 105. if !empty(GCC_VERSION:Mgcc-[2-3].*) || !empty(GCC_VERSION:Mgcc-4.[0-6].*) || \
 106 (empty(PKGSRC_COMPILER:M*gcc*) && empty(PKGSRC_COMPILER:M*clang*))
 107CONFIGURE_ARGS+= --disable-multithread
 108. endif
 109.endif
 110
96BUILDLINK_TRANSFORM.MirBSD+= rm:-lrt 111BUILDLINK_TRANSFORM.MirBSD+= rm:-lrt
97# Compiler is too old for these newfangled features 112# Compiler is too old for these newfangled features
98CONFIGURE_ENV.MirBSD+= sse2=no sse3=no ssse3=no sse4_1=no 113CONFIGURE_ENV.MirBSD+= sse2=no sse3=no ssse3=no sse4_1=no
99# runtime_cpu_detect=no 114# runtime_cpu_detect=no
100CONFIGURE_ENV.MirBSD+= RTCD_OPTIONS='--disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4_1' 115CONFIGURE_ENV.MirBSD+= RTCD_OPTIONS='--disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4_1'
101CONFIGURE_ARGS.MirBSD+= --disable-runtime-cpu-detect 116CONFIGURE_ARGS.MirBSD+= --disable-runtime-cpu-detect
102 117
103# Under Solaris 10 its /usr/xpg4/bin/tr is not sufficient. PR pkg/48508 118# Under Solaris 10 its /usr/xpg4/bin/tr is not sufficient. PR pkg/48508
104.if ${MACHINE_PLATFORM:MSunOS-5.10-*} 119.if ${MACHINE_PLATFORM:MSunOS-5.10-*}
105TOOL_DEPENDS= coreutils-[0-9]*:../../sysutils/coreutils 120TOOL_DEPENDS= coreutils-[0-9]*:../../sysutils/coreutils
106TOOLS_PLATFORM.tr= ${PREFIX}/bin/gtr 121TOOLS_PLATFORM.tr= ${PREFIX}/bin/gtr
107.endif 122.endif
108 123