pkgsrc/multimedia/libvpx/Makefile

137 lines
4.4 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.68 2017/05/03 08:38:43 jperkin Exp $
DISTNAME= libvpx-1.6.1
CATEGORIES= multimedia
MASTER_SITES= ${MASTER_SITE_GITHUB:=webmproject/}
GITHUB_PROJECT= libvpx
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= ryoon@NetBSD.org
HOMEPAGE= https://chromium.googlesource.com/webm/libvpx
COMMENT= On2 VP8 library from Google
LICENSE= modified-bsd
USE_LANGUAGES= c c++11
USE_LIBTOOL= yes
USE_TOOLS+= gmake bash:build perl:build
HAS_CONFIGURE= yes
Update to 1.0.0 * Bump BUILDLINK_ABI_DEPENDS to 1.0.0 Changelog: 2012-01-27 v1.0.0 "Duclair" Our fourth named release, focused on performance and features related to real-time encoding. It also fixes a decoder crash bug introduced in v0.9.7, so all users of that release are encouraged to upgrade. - Upgrading: This release is ABI incompatible with prior releases of libvpx, so the "major" version number has been bumped to 1. You must recompile your applications against the latest version of the libvpx headers. The API remains compatible, and this should not require code changes in most applications. - Enhancements: This release introduces several substantial new features to the encoder, of particular interest to real time streaming applications. Temporal scalability allows the encoder to produce a stream that can be decimated to different frame rates, with independent rate targetting for each substream. Multiframe quality enhancement postprocessing can make visual quality more consistent in the presence of frames that are substantially different quality than the surrounding frames, as in the temporal scalability case and in some forced keyframe scenarios. Multiple-resolution encoding support allows the encoding of the same content at different resolutions faster than encoding them separately. - Speed: Optimization targets for this release included the decoder and the real- time modes of the encoder. Decoder speed on x86 has improved 10.5% with this release. Encoder improvements followed a curve where speeds 1-3 improved 4.0%-1.5%, speeds 4-8 improved <1%, and speeds 9-16 improved 1.5% to 10.5%, respectively. "Best" mode speed is consistent with the Cayuga release. - Quality: Encoder quality in the single stream case is consistent with the Cayuga release. - Bug Fixes: This release fixes an OOB read decoder crash bug present in v0.9.7 related to the clamping of motion vectors in SPLITMV blocks. This behavior could be triggered by corrupt input or by starting decoding from a P-frame.
2012-01-31 12:53:51 +01:00
CONFIG_SHELL= ${BASH}
CONFIGURE_ARGS+= --disable-postproc
CONFIGURE_ARGS+= --enable-pic
CONFIGURE_ARGS+= --enable-runtime-cpu-detect
CONFIGURE_ARGS+= --prefix=${PREFIX}
CONFIGURE_ARGS+= --disable-unit-tests
.include "../../mk/bsd.prefs.mk"
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
2015-02-25 12:13:54 +01:00
. if ${PKGSRC_COMPILER} == "gcc" && (${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS")
# PR pkg/48508: GCC 4.4 or later is required to compile ssse3 code on NetBSD & Solaris.
GCC_REQD+= 4.4
2015-02-25 12:13:54 +01:00
. endif
BUILD_DEPENDS+= yasm-[0-9]*:../../devel/yasm
.endif
REPLACE_BASH= configure
REPLACE_BASH+= build/make/configure.sh
REPLACE_BASH+= build/make/version.sh
REPLACE_BASH+= build/make/gen_asm_deps.sh
REPLACE_PERL= build/make/ads2gas.pl
.if ${OPSYS} == "Darwin"
BUILDLINK_TRANSFORM+= rm:-Wl,-Bsymbolic
. if ${MACHINE_ARCH} == "i386"
2015-02-25 12:13:54 +01:00
. if !empty(OS_VERSION:M1[3-9].*)
CONFIGURE_ARGS+= --target=x86-darwin13-gcc
. elif !empty(OS_VERSION:M12.*)
2012-11-08 01:07:02 +01:00
CONFIGURE_ARGS+= --target=x86-darwin12-gcc
. elif !empty(OS_VERSION:M11.*)
CONFIGURE_ARGS+= --target=x86-darwin11-gcc
. elif !empty(OS_VERSION:M10.*)
CONFIGURE_ARGS+= --target=x86-darwin10-gcc
. elif !empty(OS_VERSION:M9.*)
2012-11-08 01:07:02 +01:00
CONFIGURE_ARGS+= --target=x86-darwin9-gcc
. else
CONFIGURE_ARGS+= --target=x86-darwin8-gcc
. endif
2012-02-09 18:12:40 +01:00
. elif ${MACHINE_ARCH} == "x86_64"
2015-02-25 12:13:54 +01:00
. if !empty(OS_VERSION:M1[3-9].*)
CONFIGURE_ARGS+= --target=x86_64-darwin13-gcc
. elif !empty(OS_VERSION:M12.*)
2012-11-08 01:07:02 +01:00
CONFIGURE_ARGS+= --target=x86_64-darwin12-gcc
. elif !empty(OS_VERSION:M11.*)
CONFIGURE_ARGS+= --target=x86_64-darwin11-gcc
2012-02-09 18:12:40 +01:00
. elif !empty(OS_VERSION:M10.*)
CONFIGURE_ARGS+= --target=x86_64-darwin10-gcc
. else
2013-10-23 20:24:02 +02:00
CONFIGURE_ARGS+= --target=x86_64-darwin9-gcc
2012-02-09 18:12:40 +01:00
. endif
2014-01-10 09:43:42 +01:00
. elif ${MACHINE_ARCH} == "powerpc"
. if !empty(OS_VERSION:M9.*)
CONFIGURE_ARGS+= --target=ppc32-darwin9-gcc
. else
CONFIGURE_ARGS+= --target=ppc32-darwin8-gcc
. endif
. endif
.elif ${OPSYS} == "SunOS" && !empty(PKGSRC_COMPILER:Mgcc*)
. if ${MACHINE_ARCH} == "x86_64"
CONFIGURE_ARGS+= --target=x86_64-solaris-gcc
. elif ${MACHINE_ARCH} == "i386"
CONFIGURE_ARGS+= --target=x86-solaris-gcc
. endif
.endif
2013-09-13 17:00:43 +02:00
.if !empty(PKGSRC_COMPILER:Mclang)
. if ${OPSYS} == "NetBSD" || ${OPSYS} == "Darwin"
# https://bugzilla.mozilla.org/show_bug.cgi?id=982693
SUBST_CLASSES+= clang
SUBST_STAGE.clang= pre-configure
SUBST_FILES.clang= build/make/Makefile
SUBST_MESSAGE.clang= Disabling clang integrated assembler
# Test for whether clang supports -fno-integrated-as instead of -no-integrated-as
CLANG_INTEGRATED_AS!= if ${CCPATH} --version -fno-integrated-as > /dev/null 2>&1; then ${ECHO} "-fno-integrated-as"; else ${ECHO} "-no-integrated-as"; fi
SUBST_SED.clang= -e 's/-DINLINE_ASM/-DINLINE_ASM ${CLANG_INTEGRATED_AS}/'
2015-02-25 12:13:54 +01:00
. endif
2013-09-13 17:00:43 +02:00
.endif
2013-11-07 15:26:38 +01:00
.if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "mipsel"
CONFIGURE_ARGS+= --target=mips32-linux-gcc
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*)
CONFIGURE_ARGS+= --disable-runtime-cpu-detect
.endif
2016-02-25 16:49:43 +01:00
BUILDLINK_TRANSFORM.MirBSD+= rm:-lrt
# Compiler is too old for these newfangled features
2016-02-25 16:49:43 +01:00
CONFIGURE_ENV.MirBSD+= sse2=no sse3=no ssse3=no sse4_1=no
# runtime_cpu_detect=no
2016-02-25 16:49:43 +01:00
CONFIGURE_ENV.MirBSD+= RTCD_OPTIONS='--disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4_1'
CONFIGURE_ARGS.MirBSD+= --disable-runtime-cpu-detect
# Under Solaris 10 its /usr/xpg4/bin/tr is not sufficient. PR pkg/48508
.if !empty(MACHINE_PLATFORM:MSunOS-5.10*)
BUILD_DEPENDS= coreutils-[0-9]*:../../sysutils/coreutils
TOOLS_PLATFORM.tr= ${LOCALBASE}/bin/gtr
.endif
BUILD_TARGET= # none
post-extract:
${CP} ${FILESDIR}/strip_fPIC.sh ${WRKSRC}
2016-01-03 21:59:17 +01:00
PKGCONFIG_OVERRIDE+= vpx.pc
PKGCONFIG_OVERRIDE_STAGE= post-build
# PR pkg/48508: newer gas from binutils is required to compile ssse3 code.
.if !empty(MACHINE_PLATFORM:MNetBSD-5.*) || \
!empty(MACHINE_PLATFORM:MSunOS-5.10*) || \
!empty(MACHINE_PLATFORM:MOpenBSD-5*)
.include "../../devel/binutils/buildlink3.mk"
.include "../../devel/binutils/override-as.mk"
.endif
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"