Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / multimedia / x264-devel / Makefile
blob8a656bd6fd2bd37c9134248957683ec62cb8d20b
1 # $NetBSD: Makefile,v 1.40 2013/01/16 20:55:30 adam Exp $
3 SNAPSHOT_DATE= 20130115
5 DISTNAME= x264-snapshot-${SNAPSHOT_DATE}-2245
6 PKGNAME= x264-devel-${SNAPSHOT_DATE}
7 CATEGORIES= multimedia
8 MASTER_SITES= ftp://ftp.videolan.org/pub/videolan/x264/snapshots/
9 EXTRACT_SUFX= .tar.bz2
11 MAINTAINER= joerg@NetBSD.org
12 HOMEPAGE= http://www.videolan.org/developers/x264.html
13 COMMENT= GPL licensed H.264 encoder
14 LICENSE= gnu-gpl-v2
16 .include "../../mk/bsd.prefs.mk"
18 .if exists(/usr/include/stdlib.h) && ${OPSYS} != "Linux" # XXX should be fine
19 CFLAGS+= -DHAVE_STDLIB_H
20 .endif
22 # The assembler implementations don't use position independent code
23 # and therefore break the builds on a lot of platforms because we use
24 # "libtool" to create shared libraries. We therefore need to switch
25 # them off even if the C versions are slower.
26 .if ${MACHINE_ARCH} == "i386"
27 . if ${OPSYS} == "SunOS" || (${OPSYS} == "NetBSD" && \
28 (!empty(OS_VERSION:M[1-5].*) && empty(OS_VERSION:M5.99.*))) || \
29 ${OPSYS} == "Darwin"
30 CONFIGURE_ARGS+= --disable-asm
31 . else
32 BUILD_DEPENDS+= yasm>=0.4.0:../../devel/yasm
33 . endif
34 .elif ${MACHINE_ARCH} == "x86_64"
35 . if ${OPSYS} == "SunOS" || (${OPSYS} == "NetBSD" && \
36 (!empty(OS_VERSION:M[1-5].*) && empty(OS_VERSION:M5.99.*)))
37 CONFIGURE_ARGS+= --disable-asm
38 . else
39 BUILD_DEPENDS+= yasm>=0.4.0:../../devel/yasm
40 . endif
41 .elif ${MACHINE_ARCH} == "arm" && ${OPSYS} == "NetBSD"
42 # pre-ARMv6 is default on NetBSD/arm
43 CONFIGURE_ARGS+= --disable-asm
44 .endif
46 USE_TOOLS+= gmake bash
47 USE_LIBTOOL= yes
49 HAS_CONFIGURE= yes
50 CONFIG_SHELL= ${BASH}
51 CONFIGURE_ARGS+= --enable-pic # uses libtool's -prefer-pic
52 CONFIGURE_ARGS+= --prefix=${PREFIX}
53 MAKE_ENV+= SH=${SH:Q}
55 .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
56 # XXX Consider passing this whether cross-compiling or not.
57 CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM:Q}
58 .endif
60 BUILD_TARGET= default
61 INSTALL_TARGET= install-lib-static install-cli
62 INSTALLATION_DIRS= bin
63 BUILDLINK_TRANSFORM+= rm:-O4 # XXX does this mean anything to any compiler?
64 REPLACE_SH= strip_fopt.sh version.sh
66 .include "../../mk/dlopen.buildlink3.mk"
68 CHECK_BUILTIN.pthread:= yes
69 .include "../../mk/pthread.builtin.mk"
70 CHECK_BUILTIN.pthread:= no
72 .if !empty(USE_BUILTIN.pthread:M[Yy][Ee][Ss])
73 X264_BUILD_THREADS_SUPPORT= yes
74 .else
75 X264_BUILD_THREADS_SUPPORT= ${DLOPEN_REQUIRE_PTHREADS}
76 .endif
78 .include "options.mk"
80 post-extract:
81 ${CP} ${FILESDIR}/strip_fopt.sh ${WRKSRC}/ && \
82 ${CHMOD} +x ${WRKSRC}/strip_fopt.sh
84 .include "../../mk/bsd.pkg.mk"