Hi. This diff makes multimedia/x264:
- really use nasm for building under i386 - use yasm support for building under amd64 - don't automatically add -fPIC to $CFLAGS (we take care of this in the Makefile so that libx264.a can be built from non pic objects). Comments/OK? -- Antoine
Index: Makefile =================================================================== RCS file: /cvs/ports/multimedia/x264/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- Makefile 23 Apr 2007 10:20:48 -0000 1.2 +++ Makefile 20 Jul 2007 11:06:02 -0000 @@ -1,10 +1,10 @@ # $OpenBSD: Makefile,v 1.2 2007/04/23 10:20:48 ajacoutot Exp $ -COMMENT= "free h264/avc encoder" +COMMENT= free h264/avc encoder V= 20070325 DISTNAME= x264-snapshot-${V}-2245 -PKGNAME= x264-${V}p0 +PKGNAME= x264-${V}p1 SHARED_LIBS= x264 0.0 # 5.0 CATEGORIES= multimedia @@ -30,10 +30,15 @@ CONFIGURE_STYLE=simple CONFIGURE_ENV= API=${LIBx264_VERSION} CONFIGURE_ARGS+=${CONFIGURE_SHARED} \ - --enable-pthread + --enable-pthread \ + --enable-pic .if ${MACHINE_ARCH} == "i386" BUILD_DEPENDS+= ::devel/nasm +.endif + +.if ${MACHINE_ARCH} == "amd64" +BUILD_DEPENDS+= ::devel/yasm .endif pre-configure: Index: patches/patch-Makefile =================================================================== RCS file: /cvs/ports/multimedia/x264/patches/patch-Makefile,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 patch-Makefile --- patches/patch-Makefile 8 Apr 2007 17:31:01 -0000 1.1.1.1 +++ patches/patch-Makefile 20 Jul 2007 11:06:02 -0000 @@ -1,6 +1,24 @@ $OpenBSD: patch-Makefile,v 1.1.1.1 2007/04/08 17:31:01 ajacoutot Exp $ --- Makefile.orig Sun Mar 25 22:45:02 2007 -+++ Makefile Sat Apr 7 13:58:39 2007 ++++ Makefile Fri Jul 20 12:53:31 2007 +@@ -18,7 +18,7 @@ SRCS += common/visualize.c common/display-x11.c + endif + + # MMX/SSE optims +-ifeq ($(ARCH),X86) ++ifeq ($(ARCH),X86) || ifeq ($(ARCH),i386) + SRCS += common/i386/mc-c.c common/i386/predict-c.c + ASMSRC = common/i386/dct-a.asm common/i386/cpu-a.asm \ + common/i386/pixel-a.asm common/i386/mc-a.asm \ +@@ -30,7 +30,7 @@ ASFLAGS += -Icommon/i386/ + endif + + # MMX/SSE optims +-ifeq ($(ARCH),X86_64) ++ifeq ($(ARCH),X86_64) || ifeq ($(ARCH),amd64) + SRCS += common/i386/mc-c.c common/i386/predict-c.c + ASMSRC = common/amd64/dct-a.asm common/amd64/cpu-a.asm \ + common/amd64/pixel-a.asm common/amd64/mc-a.asm \ @@ -47,6 +47,9 @@ ALTIVECSRC += common/ppc/mc.c common/ppc/pixel.c commo common/ppc/quant.c SRCS += $(ALTIVECSRC) Index: patches/patch-configure =================================================================== RCS file: /cvs/ports/multimedia/x264/patches/patch-configure,v retrieving revision 1.2 diff -u -r1.2 patch-configure --- patches/patch-configure 23 Apr 2007 10:20:48 -0000 1.2 +++ patches/patch-configure 20 Jul 2007 11:06:02 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-configure,v 1.2 2007/04/23 10:20:48 ajacoutot Exp $ ---- configure.orig Sun Mar 25 13:45:02 2007 -+++ configure Fri Apr 20 13:54:14 2007 +--- configure.orig Sun Mar 25 22:45:02 2007 ++++ configure Fri Jul 20 13:02:53 2007 @@ -46,7 +46,7 @@ as_check() { rm -f config.h config.mak x264.pc @@ -10,6 +10,15 @@ exec_prefix='${prefix}' bindir='${exec_prefix}/bin' libdir='${exec_prefix}/lib' +@@ -160,7 +160,7 @@ case "${MACHINE%%-*}" in + ASFLAGS="$ASFLAGS -f elf" + fi + ;; +- x86_64) ++ x86_64 | amd64) + ARCH="X86_64" + CFLAGS="$CFLAGS -DHAVE_MMX" + AS="yasm" @@ -334,6 +334,9 @@ if test "$pthread" = "auto" ; then CFLAGS="$CFLAGS -DPTW32_STATIC_LIB" fi @@ -20,7 +29,13 @@ *) cc_check pthread.h -lpthread && pthread="yes" && libpthread="-lpthread" ;; -@@ -375,14 +378,14 @@ if [ "$pic" = "yes" ] ; then +@@ -370,19 +373,19 @@ if [ "$avis_input" = "yes" ] ; then + fi + + if [ "$pic" = "yes" ] ; then +- CFLAGS="$CFLAGS -fPIC" ++ CFLAGS="$CFLAGS" + ASFLAGS="$ASFLAGS -D__PIC__" fi if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then