summaryrefslogtreecommitdiff
path: root/multimedia/libaom/Makefile
blob: 91e997cb298e624d57f486aac58f03facd849110 (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
# $NetBSD: Makefile,v 1.23 2022/06/28 11:34:56 wiz Exp $

DISTNAME=	libaom-3.3.0
PKGREVISION=	1
CATEGORIES=	multimedia
MASTER_SITES=	https://storage.googleapis.com/aom-releases/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://aomedia.googlesource.com/aom/
COMMENT=	Library for using AV1, video coding format
LICENSE=	2-clause-bsd

MAKE_JOBS_SAFE=	no

USE_CMAKE=	yes
USE_LANGUAGES=	c c++
USE_TOOLS+=	perl

SUBST_CLASSES+=		version
SUBST_FILES.version=	build/cmake/version.cmake
SUBST_STAGE.version=	pre-configure
SUBST_VARS.version=	PKGVERSION_NOREV

CONFIGURE_DIRS=	build
CMAKE_ARG_PATH=	../
CMAKE_ARGS+=	-DBUILD_SHARED_LIBS:BOOL=ON
CMAKE_ARGS+=	-DCMAKE_COLOR_MAKEFILE:BOOL=ON
CMAKE_ARGS+=	-DENABLE_DECODE_PERF_TESTS:BOOL=OFF
CMAKE_ARGS+=	-DENABLE_EXAMPLES:BOOL=ON
CMAKE_ARGS+=	-DENABLE_DOCS:BOOL=OFF
CMAKE_ARGS+=	-DENABLE_GOMA:BOOL=OFF
CMAKE_ARGS+=	-DENABLE_TESTS:BOOL=OFF
CMAKE_ARGS+=	-DENABLE_TOOLS:BOOL=OFF
CMAKE_ARGS+=	-DENABLE_WERROR:BOOL=OFF

.include "../../mk/bsd.prefs.mk"

.if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*) \
  || !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64*) \
  || !empty(MACHINE_PLATFORM:MDarwin-*-aarch64)
CMAKE_ARGS+=	-DCONFIG_RUNTIME_CPU_DETECT=0
.endif

.if !empty(MACHINE_ARCH:Mmips64*)
CMAKE_ARGS+=	-DAOM_TARGET_CPU="mips64"
.elif !empty(MACHINE_ARCH:Mmips*)
CMAKE_ARGS+=	-DAOM_TARGET_CPU="mips"
.elif !empty(MACHINE_ARCH:Mpowerpc*)
CMAKE_ARGS+=	-DAOM_TARGET_CPU="ppc"
.elif ${MACHINE_ARCH} == "earmv7hf"
CFLAGS+=	-mfpu=neon
CMAKE_ARGS+=	-DAOM_TARGET_CPU="armv7"
.elif ${MACHINE_ARCH} == "aarch64"
CMAKE_ARGS+=	-DAOM_TARGET_CPU="arm64"
.elif ${MACHINE_ARCH} == "x86_64"
CMAKE_ARGS+=	-DAOM_TARGET_CPU="x86_64"
.elif ${MACHINE_ARCH} == "i386"
CMAKE_ARGS+=	-DAOM_TARGET_CPU="x86"
.else
CMAKE_ARGS+=	-DAOM_TARGET_CPU="generic"
.endif

.if ${MACHINE_ARCH} == x86_64 || ${MACHINE_ARCH} == i386
CMAKE_ARGS+=	-DENABLE_NASM:BOOL=ON
TOOL_DEPENDS+=	nasm>=2.13:../../devel/nasm
.endif

PKGCONFIG_OVERRIDE_STAGE=	pre-install
PKGCONFIG_OVERRIDE+=		build/aom.pc

.include "../../mk/bsd.pkg.mk"