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}
8 MASTER_SITES
= ftp
://ftp.videolan.org
/pub
/videolan
/x264
/snapshots
/
11 MAINTAINER
= joerg@NetBSD.org
12 HOMEPAGE
= http
://www.videolan.org
/developers
/x264.html
13 COMMENT
= GPL licensed H
.264 encoder
16 .
include "../../mk/bsd.prefs.mk"
18 .if exists
(/usr
/include/stdlib.h
) && ${OPSYS} != "Linux" # XXX should be fine
19 CFLAGS
+= -DHAVE_STDLIB_H
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.
*))) || \
30 CONFIGURE_ARGS
+= --disable-asm
32 BUILD_DEPENDS
+= yasm
>=0.4.0:..
/..
/devel
/yasm
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
39 BUILD_DEPENDS
+= yasm
>=0.4.0:..
/..
/devel
/yasm
41 .elif
${MACHINE_ARCH} == "arm" && ${OPSYS} == "NetBSD"
42 # pre-ARMv6 is default on NetBSD/arm
43 CONFIGURE_ARGS
+= --disable-asm
46 USE_TOOLS
+= gmake bash
51 CONFIGURE_ARGS
+= --enable-pic
# uses libtool's -prefer-pic
52 CONFIGURE_ARGS
+= --prefix=${PREFIX}
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
}
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
75 X264_BUILD_THREADS_SUPPORT
= ${DLOPEN_REQUIRE_PTHREADS}
81 ${CP} ${FILESDIR}/strip_fopt.sh
${WRKSRC}/ && \
82 ${CHMOD} +x
${WRKSRC}/strip_fopt.sh
84 .
include "../../mk/bsd.pkg.mk"