pkgsrc/multimedia/x264-devel/Makefile
adam eb56c8e56a Changes 20170615:
* x86: Avoid self-relative expressions on macho64
* configure: Don't try to detect clang by $CC
* checkasm: Use the right variable in a loop condition
* x86: Fix linking with 8-bit depth shared libx264
* x86: Only enable AVX-512 in 8-bit mode
* x86: AVX-512 cabac_block_residual
* x86: AVX-512 pixel_sad_x3 and pixel_sad_x4
* x86: AVX-512 pixel_sad
* x86: AVX-512 decimate_score
* x86: AVX-512 pixel_var2_8x8 and 8x16
* Rework pixel_var2
* x86: AVX-512 pixel_var_8x8, 8x16, and 16x16
* x86: AVX-512 pixel_sa8d_8x8
* x86: AVX-512 pixel_satd
* x86: AVX-512 deblock_strength
* x86: AVX-512 plane_copy_deinterleave_v210
* x86: AVX-512 memzero_aligned
* x86: AVX and AVX-512 memcpy_aligned
* x86: AVX-512 dequant_8x8_flat16
* x86: AVX-512 dequant_8x8
* x86: AVX-512 dequant_4x4
* x86: AVX-512 mbtree_propagate_cost
* x86: AVX-512 coeff_last
* x86: AVX-512 zigzag_interleave_8x8_cavlc
* x86: AVX-512 zigzag_scan_8x8_field
* x86: AVX-512 zigzag_scan_4x4_field
* x86: AVX-512 zigzag_scan_8x8_frame
* x86: AVX-512 zigzag_scan_4x4_frame
* checkasm: x86: More accurate ymm/zmm measurements
* x86: AVX-512 support
* x86: Change assembler from yasm to nasm
* x86: Add some additional cpuflag relations
* x86: Faster SSE2 pixel_sad_16x16 and 16x8
* msvs/icl: Improve target host detection
* ppc: Optimize add8x8_idct_dc
2017-06-16 05:39:23 +00:00

95 lines
2.7 KiB
Makefile

# $NetBSD: Makefile,v 1.62 2017/06/16 05:39:23 adam Exp $
SNAPSHOT_DATE= 20170615
DISTNAME= x264-snapshot-${SNAPSHOT_DATE}-2245
PKGNAME= x264-devel-${SNAPSHOT_DATE}
CATEGORIES= multimedia
MASTER_SITES= ftp://ftp.videolan.org/pub/videolan/x264/snapshots/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= joerg@NetBSD.org
HOMEPAGE= http://www.videolan.org/developers/x264.html
COMMENT= GPL licensed H.264 encoder
LICENSE= gnu-gpl-v2
.include "../../mk/bsd.prefs.mk"
.if exists(/usr/include/stdlib.h) && ${OPSYS} != "Linux" # XXX should be fine
CFLAGS+= -DHAVE_STDLIB_H
.endif
# The assembler implementations don't use position independent code
# and therefore break the builds on a lot of platforms because we use
# "libtool" to create shared libraries. We therefore need to switch
# them off even if the C versions are slower.
.if ${MACHINE_ARCH} == "i386"
. if ${OPSYS} == "SunOS" || (${OPSYS} == "NetBSD" && \
(!empty(OS_VERSION:M[1-5].*) && empty(OS_VERSION:M5.99.*))) || \
${OPSYS} == "Darwin"
CONFIGURE_ARGS+= --disable-asm
# depends on builtin functions enabled with i486 and later with GCC.
. if ${OPSYS} == "NetBSD" && !empty(MACHINE_ARCH:Mi386)
GNU_ARCH.i386= i486
CFLAGS+= -march=i486
. endif
. else
BUILD_DEPENDS+= nasm>=2.13.0:../../devel/nasm
. endif
.elif ${MACHINE_ARCH} == "x86_64"
. if ${OPSYS} == "SunOS" || (${OPSYS} == "NetBSD" && \
(!empty(OS_VERSION:M[1-5].*) && empty(OS_VERSION:M5.99.*)))
CONFIGURE_ARGS+= --disable-asm
. else
BUILD_DEPENDS+= nasm>=2.13.0:../../devel/nasm
. endif
.endif
USE_TOOLS+= bash gmake
USE_LIBTOOL= yes
HAS_CONFIGURE= yes
CONFIG_SHELL= ${BASH}
CONFIGURE_ARGS+= --enable-pic # uses libtool's -prefer-pic
CONFIGURE_ARGS+= --prefix=${PREFIX}
.if ${OPSYS} == "Darwin"
USE_TOOLS+= perl
.else
CONFIGURE_ARGS+= --disable-opencl
.endif
MAKE_ENV+= SH=${SH:Q}
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
# XXX Consider passing this whether cross-compiling or not.
CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM}
.endif
BUILD_TARGET= default
INSTALL_TARGET= install-lib-static install-cli
INSTALLATION_DIRS= bin
REPLACE_SH= strip_fopt.sh version.sh
.include "../../mk/dlopen.buildlink3.mk"
CHECK_BUILTIN.pthread:= yes
.include "../../mk/pthread.builtin.mk"
CHECK_BUILTIN.pthread:= no
.if !empty(USE_BUILTIN.pthread:M[Yy][Ee][Ss])
X264_BUILD_THREADS_SUPPORT= yes
.else
X264_BUILD_THREADS_SUPPORT= ${DLOPEN_REQUIRE_PTHREADS}
.endif
SUBST_CLASSES+= netbsd
SUBST_STAGE.netbsd= pre-configure
SUBST_MESSAGE.netbsd= Adding support for NetBSD.
SUBST_FILES.netbsd= common/cpu.c
SUBST_SED.netbsd= -e 's,SYS_OPENBSD,SYS_OPENBSD || SYS_NETBSD,'
.include "options.mk"
post-extract:
${CP} ${FILESDIR}/strip_fopt.sh ${WRKSRC}/ && \
${CHMOD} +x ${WRKSRC}/strip_fopt.sh
.include "../../mk/bsd.pkg.mk"