ports/146822: Update port: multimedia/x264-devel. Used last snapshot.

Andrey Cherkashin andoriyu at gmail.com
Sat May 22 10:20:01 UTC 2010


>Number:         146822
>Category:       ports
>Synopsis:       Update port: multimedia/x264-devel. Used last snapshot.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 22 10:20:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Andrey Cherkashin
>Release:        FreeBSD 8.0
>Organization:
>Environment:
FreeBSD freebsd0.eu.local 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan  5 16:02:27 UTC 2010     root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Update port: multimedia/x264-devel. Used last snapshot.

x264 is a free library for encoding H.264/AVC (aka MPEG-4 Part 10)
video streams.

Encoder features
 * CAVLC/CABAC
 * Multi-references
 * Intra: all modes (4x4 and 16x16 with all predictions)
 * Inter P: all partitions (from 16x16 down to 4x4)
 * Inter B: partitions from 16x16 down to 8x8 (including SKIP/DIRECT)
 * Ratecontrol: constant quantizer, constant bitrate, or multipass ABR
 * Scene cut detection

WWW:	http://www.videolan.org/x264.html

>How-To-Repeat:

>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	/usr/ports/multimedia/x264-devel
#	/usr/ports/multimedia/x264-devel/Makefile
#	/usr/ports/multimedia/x264-devel/distinfo
#	/usr/ports/multimedia/x264-devel/pkg-descr
#	/usr/ports/multimedia/x264-devel/pkg-plist
#	/usr/ports/multimedia/x264-devel/files
#	/usr/ports/multimedia/x264-devel/files/patch-Makefile
#	/usr/ports/multimedia/x264-devel/files/patch-common_cpu.c
#
echo c - /usr/ports/multimedia/x264-devel
mkdir -p /usr/ports/multimedia/x264-devel > /dev/null 2>&1
echo x - /usr/ports/multimedia/x264-devel/Makefile
sed 's/^X//' >/usr/ports/multimedia/x264-devel/Makefile << 'bb136195010e19a52cfd40887f11c100'
X# New ports collection makefile for:	x264
X# Date created:		2005-01-11
X# Whom:			Michael Johnson <ahze at FreeBSD.org>
X#
X# $FreeBSD: ports/multimedia/x264-devel/Makefile,v 1.74 2010/04/21 12:14:23 mm Exp $
X#      $Id: Makefile 30 2006-10-30 22:15:26Z buhnux $
X
XPORTNAME=	x264
XPORTVERSION=	0.0.20100521
XCATEGORIES=	multimedia
XMASTER_SITES=	http://downloads.videolan.org/pub/videolan/x264/snapshots/ \
X		http://samples.mplayerhq.hu/yuv4mpeg2/:pgo
XDISTNAME=	${PORTNAME}-snapshot-${PORTVERSION:S/0.0.//}-2245
XDISTFILES=	${PORTNAME}-snapshot-${PORTVERSION:S/0.0.//}-2245${EXTRACT_SUFX}
XDIST_SUBDIR=	x264
XEXTRACT_ONLY=	${PORTNAME}-snapshot-${PORTVERSION:S/0.0.//}-2245${EXTRACT_SUFX}
X
XMAINTAINER=	mm at FreeBSD.org
XCOMMENT?=	Library and tool for encoding H.264/AVC video streams
X
XCONFLICTS=	x264-0.0.2009* x264-0.0.20100[1-2]*
X
XBUILD_DEPENDS=	yasm>=0.6.0:${PORTSDIR}/devel/yasm \
X		as:${PORTSDIR}/devel/binutils
X
XUSE_BZIP2=	yes
XEXTRACT_AFTER_ARGS?=	| ${TAR} -xf - --exclude .svn
XWRKSRC=		${WRKDIR}/${DISTNAME}
XUSE_GMAKE=	yes
XUSE_LDCONFIG=	yes
XHAS_CONFIGURE=	yes
XMAKE_JOBS_SAFE=	yes
X
XOPTIONS=	DEBUG "Enable Debugging" Off \
X		PGO "Enable Profile-Guided Optimization" Off \
X		GCC44 "Use gcc 4.4+" Off \
X		GPAC "Enable MPEG-4 Output" On \
X		X11_OUTPUT "Enable X11 Output" Off
X
XCONFIGURE_ARGS+=	--extra-cflags="${CPPFLAGS} ${CFLAGS} -fPIC -I${LOCALBASE}/include -I${LOCALBASE}/include" \
X			--extra-ldflags="${LDFLAGS} -L${LOCALBASE}/lib -L${LOCALBASE}/lib" \
X			--enable-shared
X
XCONFIGURE_ENV+=		COMPILER_PATH=${LOCALBASE}/bin
XMAKE_ENV+=		COMPILER_PATH=${LOCALBASE}/bin
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_GCC44)
XUSE_GCC?=	4.4+
X.endif
X
X# Around the time GCC stack protection (aka Propolice) for userland
X# was enabled on src/share/mk/bsd.sys.mk
X# SVN rev 180012 on 2008-06-25 21:33:28Z by ru
X.if ${OSVERSION} >= 800040
XLDFLAGS+=	-fstack-protector
X.endif
X
X.if ${ARCH}=="i386"
XMAKE_ENV+=	ARCH_X86="1"
X.elif ${ARCH} == "powerpc"
XMAKE_ENV+=	ARCH_PPC="1"
X.endif
X
XMAKE_ENV+=	ARCH=${ARCH}
X
X.if defined(WITH_DEBUG)
XCONFIGURE_ARGS+=	--enable-debug
X.endif
X
X.if defined(WITH_PGO) && ${SLAVE_PORT:L}!="yes"
X# y4m sample video
XY4M_VIDEO=example.y4m
XY4M_VIDEO_DISTFILE=example.y4m.bz2
X
XDISTFILES+=	${Y4M_VIDEO_DISTFILE}:pgo
XALL_TARGET=	fprofiled
XMAKE_ENV+=	VIDS="${WRKDIR}/${Y4M_VIDEO}"
X
XRESTRICTED=	${Y4M_VIDEO_DISTFILE} file may not be mirrored
XRESTRICTED_FILES=	${Y4M_VIDEO_DISTFILE}
X.endif
X
X.if !defined(WITHOUT_GPAC)
XBUILD_DEPENDS+=		gpac-libgpac>=0.4.5,1:${PORTSDIR}/multimedia/gpac-libgpac
XLIB_DEPENDS+=		gpac.1:${PORTSDIR}/multimedia/gpac-libgpac
XCONFIGURE_ARGS+=	--enable-mp4-output
X.else
XCONFIGURE_ARGS+=	--disable-mp4-output
X.endif
X
X.if defined(WITH_X11_OUTPUT)
XCONFIGURE_ARGS+=	--enable-visualize
XUSE_XORG=	x11
X.endif
X
Xpost-extract:
X.if defined(WITH_PGO) && ${SLAVE_PORT:L}!="yes"
X	@( cd ${WRKDIR} && ${BZIP2_CMD} -dc ${DISTDIR}/${DIST_SUBDIR}/${Y4M_VIDEO_DISTFILE} > ${Y4M_VIDEO} )
X.endif
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|; \
X		s|-lpthread|${PTHREAD_LIBS}|g; \
X		s|bash|sh|; \
X		s|gpac_static|gpac|g' \
X		${WRKSRC}/configure
X	@${REINPLACE_CMD} -e 's|bash|sh|' ${WRKSRC}/version.sh
X	@${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|; \
X		s|$${libdir}/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
X		${WRKSRC}/Makefile
X.if !defined(WITH_GCC44)
X	@${REINPLACE_CMD} -e 's|$$(CC) -shared -o|COMPILER_PATH= $$(CC) -shared -o|g' \
X		-e 's|$$(CC) -o|COMPILER_PATH= $$(CC) -o|g' \
X		${WRKSRC}/Makefile
X.endif
X
X.if ${SLAVE_PORT:L}=="no"
X.if 0 # BROKEN
Xpost-build:
X	cd ${WRKSRC}/tools && ${MAKE} avc2avi
X
Xpre-install:
X	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' \
X		${WRKSRC}/x264.pc
X
Xpost-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/tools/avc2avi ${PREFIX}/bin
X.endif # BROKEN
X.endif
X
X.include <bsd.port.post.mk>
bb136195010e19a52cfd40887f11c100
echo x - /usr/ports/multimedia/x264-devel/distinfo
sed 's/^X//' >/usr/ports/multimedia/x264-devel/distinfo << 'e5971b39e6d941031e76e084391defef'
XMD5 (x264/x264-snapshot-20100521-2245.tar.bz2) = 9d906eb80a7173144e210b7551bb7886
XSHA256 (x264/x264-snapshot-20100521-2245.tar.bz2) = d73bddba935495d38e19dd4fd0a0f79108551ac6d131d2f8f67d080f5d73e9b9
XSIZE (x264/x264-snapshot-20100521-2245.tar.bz2) = 420486
XMD5 (x264/example.y4m.bz2) = e0948016cd4a52e75d6a74d998bd6ae6
XSHA256 (x264/example.y4m.bz2) = a5bec9d37362bd9d7773fbd0644643f9ec096d654d20823004e88d5df32bbff7
XSIZE (x264/example.y4m.bz2) = 4910029
e5971b39e6d941031e76e084391defef
echo x - /usr/ports/multimedia/x264-devel/pkg-descr
sed 's/^X//' >/usr/ports/multimedia/x264-devel/pkg-descr << '054b5fe4251e9835056e58fba93e750c'
Xx264 is a free library for encoding H.264/AVC (aka MPEG-4 Part 10)
Xvideo streams.
X
XEncoder features
X * CAVLC/CABAC
X * Multi-references
X * Intra: all modes (4x4 and 16x16 with all predictions)
X * Inter P: all partitions (from 16x16 down to 4x4)
X * Inter B: partitions from 16x16 down to 8x8 (including SKIP/DIRECT)
X * Ratecontrol: constant quantizer, constant bitrate, or multipass ABR
X * Scene cut detection
X
XWWW:	http://www.videolan.org/x264.html
054b5fe4251e9835056e58fba93e750c
echo x - /usr/ports/multimedia/x264-devel/pkg-plist
sed 's/^X//' >/usr/ports/multimedia/x264-devel/pkg-plist << '07f52481ec226831f1c7e532429e87d9'
Xbin/x264
Xinclude/x264.h
Xlib/libx264.a
Xlib/libx264.so
Xlib/libx264.so.96
Xlibdata/pkgconfig/x264.pc
07f52481ec226831f1c7e532429e87d9
echo c - /usr/ports/multimedia/x264-devel/files
mkdir -p /usr/ports/multimedia/x264-devel/files > /dev/null 2>&1
echo x - /usr/ports/multimedia/x264-devel/files/patch-Makefile
sed 's/^X//' >/usr/ports/multimedia/x264-devel/files/patch-Makefile << '00b7d4c8f758e02347fa6aa222cd6225'
X--- Makefile.orig	2010-04-20 22:45:09.000000000 +0200
X+++ Makefile	2010-04-21 14:07:39.258797099 +0200
X@@ -54,12 +54,12 @@
X           cpu-a.asm dct-32.asm
X X86SRC = $(X86SRC0:%=common/x86/%)
X 
X-ifeq ($(ARCH),X86)
X+ifeq ($(ARCH),i386)
X ARCH_X86 = yes
X ASMSRC   = $(X86SRC) common/x86/pixel-32.asm
X endif
X 
X-ifeq ($(ARCH),X86_64)
X+ifeq ($(ARCH),amd64)
X ARCH_X86 = yes
X ASMSRC   = $(X86SRC:-32.asm=-64.asm)
X ASFLAGS += -DARCH_X86_64
X@@ -75,7 +75,7 @@
X endif
X 
X # AltiVec optims
X-ifeq ($(ARCH),PPC)
X+ifeq ($(ARCH),powerpc)
X ifneq ($(AS),)
X SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
X         common/ppc/quant.c common/ppc/deblock.c \
00b7d4c8f758e02347fa6aa222cd6225
echo x - /usr/ports/multimedia/x264-devel/files/patch-common_cpu.c
sed 's/^X//' >/usr/ports/multimedia/x264-devel/files/patch-common_cpu.c << '4da8abf93f3da2a03598fb2473edf39b'
X--- common/cpu.c.orig	2010-02-28 10:49:54.000000000 -0800
X+++ common/cpu.c	2010-02-28 10:56:06.000000000 -0800
X@@ -211,6 +211,27 @@
X     return cpu;
X }
X 
X+#elif defined(SYS_FREEBSD)
X+#include <sys/sysctl.h>
X+uint32_t x264_cpu_detect( void )
X+{
X+    uint32_t cpu;
X+    int has_altivec, error;
X+    size_t length;
X+
X+    cpu = 0;
X+    has_altivec = 0;
X+    length = sizeof( has_altivec );
X+    error = sysctlbyname("hw.altivec", &has_altivec, &length, NULL, 0 );
X+
X+    if( error == 0 && has_altivec != 0 )
X+    {
X+        cpu |= X264_CPU_ALTIVEC;
X+    }
X+
X+    return cpu;
X+}
X+
X #elif defined( SYS_LINUX )
X #include <signal.h>
X #include <setjmp.h>
4da8abf93f3da2a03598fb2473edf39b
exit


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	/usr/ports/multimedia/x264-devel
#	/usr/ports/multimedia/x264-devel/Makefile
#	/usr/ports/multimedia/x264-devel/distinfo
#	/usr/ports/multimedia/x264-devel/pkg-descr
#	/usr/ports/multimedia/x264-devel/pkg-plist
#	/usr/ports/multimedia/x264-devel/files
#	/usr/ports/multimedia/x264-devel/files/patch-Makefile
#	/usr/ports/multimedia/x264-devel/files/patch-common_cpu.c
#
echo c - /usr/ports/multimedia/x264-devel
mkdir -p /usr/ports/multimedia/x264-devel > /dev/null 2>&1
echo x - /usr/ports/multimedia/x264-devel/Makefile
sed 's/^X//' >/usr/ports/multimedia/x264-devel/Makefile << 'bb136195010e19a52cfd40887f11c100'
X# New ports collection makefile for:	x264
X# Date created:		2005-01-11
X# Whom:			Michael Johnson <ahze at FreeBSD.org>
X#
X# $FreeBSD: ports/multimedia/x264-devel/Makefile,v 1.74 2010/04/21 12:14:23 mm Exp $
X#      $Id: Makefile 30 2006-10-30 22:15:26Z buhnux $
X
XPORTNAME=	x264
XPORTVERSION=	0.0.20100521
XCATEGORIES=	multimedia
XMASTER_SITES=	http://downloads.videolan.org/pub/videolan/x264/snapshots/ \
X		http://samples.mplayerhq.hu/yuv4mpeg2/:pgo
XDISTNAME=	${PORTNAME}-snapshot-${PORTVERSION:S/0.0.//}-2245
XDISTFILES=	${PORTNAME}-snapshot-${PORTVERSION:S/0.0.//}-2245${EXTRACT_SUFX}
XDIST_SUBDIR=	x264
XEXTRACT_ONLY=	${PORTNAME}-snapshot-${PORTVERSION:S/0.0.//}-2245${EXTRACT_SUFX}
X
XMAINTAINER=	mm at FreeBSD.org
XCOMMENT?=	Library and tool for encoding H.264/AVC video streams
X
XCONFLICTS=	x264-0.0.2009* x264-0.0.20100[1-2]*
X
XBUILD_DEPENDS=	yasm>=0.6.0:${PORTSDIR}/devel/yasm \
X		as:${PORTSDIR}/devel/binutils
X
XUSE_BZIP2=	yes
XEXTRACT_AFTER_ARGS?=	| ${TAR} -xf - --exclude .svn
XWRKSRC=		${WRKDIR}/${DISTNAME}
XUSE_GMAKE=	yes
XUSE_LDCONFIG=	yes
XHAS_CONFIGURE=	yes
XMAKE_JOBS_SAFE=	yes
X
XOPTIONS=	DEBUG "Enable Debugging" Off \
X		PGO "Enable Profile-Guided Optimization" Off \
X		GCC44 "Use gcc 4.4+" Off \
X		GPAC "Enable MPEG-4 Output" On \
X		X11_OUTPUT "Enable X11 Output" Off
X
XCONFIGURE_ARGS+=	--extra-cflags="${CPPFLAGS} ${CFLAGS} -fPIC -I${LOCALBASE}/include -I${LOCALBASE}/include" \
X			--extra-ldflags="${LDFLAGS} -L${LOCALBASE}/lib -L${LOCALBASE}/lib" \
X			--enable-shared
X
XCONFIGURE_ENV+=		COMPILER_PATH=${LOCALBASE}/bin
XMAKE_ENV+=		COMPILER_PATH=${LOCALBASE}/bin
X
X.include <bsd.port.pre.mk>
X
X.if defined(WITH_GCC44)
XUSE_GCC?=	4.4+
X.endif
X
X# Around the time GCC stack protection (aka Propolice) for userland
X# was enabled on src/share/mk/bsd.sys.mk
X# SVN rev 180012 on 2008-06-25 21:33:28Z by ru
X.if ${OSVERSION} >= 800040
XLDFLAGS+=	-fstack-protector
X.endif
X
X.if ${ARCH}=="i386"
XMAKE_ENV+=	ARCH_X86="1"
X.elif ${ARCH} == "powerpc"
XMAKE_ENV+=	ARCH_PPC="1"
X.endif
X
XMAKE_ENV+=	ARCH=${ARCH}
X
X.if defined(WITH_DEBUG)
XCONFIGURE_ARGS+=	--enable-debug
X.endif
X
X.if defined(WITH_PGO) && ${SLAVE_PORT:L}!="yes"
X# y4m sample video
XY4M_VIDEO=example.y4m
XY4M_VIDEO_DISTFILE=example.y4m.bz2
X
XDISTFILES+=	${Y4M_VIDEO_DISTFILE}:pgo
XALL_TARGET=	fprofiled
XMAKE_ENV+=	VIDS="${WRKDIR}/${Y4M_VIDEO}"
X
XRESTRICTED=	${Y4M_VIDEO_DISTFILE} file may not be mirrored
XRESTRICTED_FILES=	${Y4M_VIDEO_DISTFILE}
X.endif
X
X.if !defined(WITHOUT_GPAC)
XBUILD_DEPENDS+=		gpac-libgpac>=0.4.5,1:${PORTSDIR}/multimedia/gpac-libgpac
XLIB_DEPENDS+=		gpac.1:${PORTSDIR}/multimedia/gpac-libgpac
XCONFIGURE_ARGS+=	--enable-mp4-output
X.else
XCONFIGURE_ARGS+=	--disable-mp4-output
X.endif
X
X.if defined(WITH_X11_OUTPUT)
XCONFIGURE_ARGS+=	--enable-visualize
XUSE_XORG=	x11
X.endif
X
Xpost-extract:
X.if defined(WITH_PGO) && ${SLAVE_PORT:L}!="yes"
X	@( cd ${WRKDIR} && ${BZIP2_CMD} -dc ${DISTDIR}/${DIST_SUBDIR}/${Y4M_VIDEO_DISTFILE} > ${Y4M_VIDEO} )
X.endif
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|; \
X		s|-lpthread|${PTHREAD_LIBS}|g; \
X		s|bash|sh|; \
X		s|gpac_static|gpac|g' \
X		${WRKSRC}/configure
X	@${REINPLACE_CMD} -e 's|bash|sh|' ${WRKSRC}/version.sh
X	@${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|; \
X		s|$${libdir}/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
X		${WRKSRC}/Makefile
X.if !defined(WITH_GCC44)
X	@${REINPLACE_CMD} -e 's|$$(CC) -shared -o|COMPILER_PATH= $$(CC) -shared -o|g' \
X		-e 's|$$(CC) -o|COMPILER_PATH= $$(CC) -o|g' \
X		${WRKSRC}/Makefile
X.endif
X
X.if ${SLAVE_PORT:L}=="no"
X.if 0 # BROKEN
Xpost-build:
X	cd ${WRKSRC}/tools && ${MAKE} avc2avi
X
Xpre-install:
X	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' \
X		${WRKSRC}/x264.pc
X
Xpost-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/tools/avc2avi ${PREFIX}/bin
X.endif # BROKEN
X.endif
X
X.include <bsd.port.post.mk>
bb136195010e19a52cfd40887f11c100
echo x - /usr/ports/multimedia/x264-devel/distinfo
sed 's/^X//' >/usr/ports/multimedia/x264-devel/distinfo << 'e5971b39e6d941031e76e084391defef'
XMD5 (x264/x264-snapshot-20100521-2245.tar.bz2) = 9d906eb80a7173144e210b7551bb7886
XSHA256 (x264/x264-snapshot-20100521-2245.tar.bz2) = d73bddba935495d38e19dd4fd0a0f79108551ac6d131d2f8f67d080f5d73e9b9
XSIZE (x264/x264-snapshot-20100521-2245.tar.bz2) = 420486
XMD5 (x264/example.y4m.bz2) = e0948016cd4a52e75d6a74d998bd6ae6
XSHA256 (x264/example.y4m.bz2) = a5bec9d37362bd9d7773fbd0644643f9ec096d654d20823004e88d5df32bbff7
XSIZE (x264/example.y4m.bz2) = 4910029
e5971b39e6d941031e76e084391defef
echo x - /usr/ports/multimedia/x264-devel/pkg-descr
sed 's/^X//' >/usr/ports/multimedia/x264-devel/pkg-descr << '054b5fe4251e9835056e58fba93e750c'
Xx264 is a free library for encoding H.264/AVC (aka MPEG-4 Part 10)
Xvideo streams.
X
XEncoder features
X * CAVLC/CABAC
X * Multi-references
X * Intra: all modes (4x4 and 16x16 with all predictions)
X * Inter P: all partitions (from 16x16 down to 4x4)
X * Inter B: partitions from 16x16 down to 8x8 (including SKIP/DIRECT)
X * Ratecontrol: constant quantizer, constant bitrate, or multipass ABR
X * Scene cut detection
X
XWWW:	http://www.videolan.org/x264.html
054b5fe4251e9835056e58fba93e750c
echo x - /usr/ports/multimedia/x264-devel/pkg-plist
sed 's/^X//' >/usr/ports/multimedia/x264-devel/pkg-plist << '07f52481ec226831f1c7e532429e87d9'
Xbin/x264
Xinclude/x264.h
Xlib/libx264.a
Xlib/libx264.so
Xlib/libx264.so.96
Xlibdata/pkgconfig/x264.pc
07f52481ec226831f1c7e532429e87d9
echo c - /usr/ports/multimedia/x264-devel/files
mkdir -p /usr/ports/multimedia/x264-devel/files > /dev/null 2>&1
echo x - /usr/ports/multimedia/x264-devel/files/patch-Makefile
sed 's/^X//' >/usr/ports/multimedia/x264-devel/files/patch-Makefile << '00b7d4c8f758e02347fa6aa222cd6225'
X--- Makefile.orig	2010-04-20 22:45:09.000000000 +0200
X+++ Makefile	2010-04-21 14:07:39.258797099 +0200
X@@ -54,12 +54,12 @@
X           cpu-a.asm dct-32.asm
X X86SRC = $(X86SRC0:%=common/x86/%)
X 
X-ifeq ($(ARCH),X86)
X+ifeq ($(ARCH),i386)
X ARCH_X86 = yes
X ASMSRC   = $(X86SRC) common/x86/pixel-32.asm
X endif
X 
X-ifeq ($(ARCH),X86_64)
X+ifeq ($(ARCH),amd64)
X ARCH_X86 = yes
X ASMSRC   = $(X86SRC:-32.asm=-64.asm)
X ASFLAGS += -DARCH_X86_64
X@@ -75,7 +75,7 @@
X endif
X 
X # AltiVec optims
X-ifeq ($(ARCH),PPC)
X+ifeq ($(ARCH),powerpc)
X ifneq ($(AS),)
X SRCS += common/ppc/mc.c common/ppc/pixel.c common/ppc/dct.c \
X         common/ppc/quant.c common/ppc/deblock.c \
00b7d4c8f758e02347fa6aa222cd6225
echo x - /usr/ports/multimedia/x264-devel/files/patch-common_cpu.c
sed 's/^X//' >/usr/ports/multimedia/x264-devel/files/patch-common_cpu.c << '4da8abf93f3da2a03598fb2473edf39b'
X--- common/cpu.c.orig	2010-02-28 10:49:54.000000000 -0800
X+++ common/cpu.c	2010-02-28 10:56:06.000000000 -0800
X@@ -211,6 +211,27 @@
X     return cpu;
X }
X 
X+#elif defined(SYS_FREEBSD)
X+#include <sys/sysctl.h>
X+uint32_t x264_cpu_detect( void )
X+{
X+    uint32_t cpu;
X+    int has_altivec, error;
X+    size_t length;
X+
X+    cpu = 0;
X+    has_altivec = 0;
X+    length = sizeof( has_altivec );
X+    error = sysctlbyname("hw.altivec", &has_altivec, &length, NULL, 0 );
X+
X+    if( error == 0 && has_altivec != 0 )
X+    {
X+        cpu |= X264_CPU_ALTIVEC;
X+    }
X+
X+    return cpu;
X+}
X+
X #elif defined( SYS_LINUX )
X #include <signal.h>
X #include <setjmp.h>
4da8abf93f3da2a03598fb2473edf39b
exit


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list