pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/multimedia/x264-devel now that that we rely on the fac...
details: https://anonhg.NetBSD.org/pkgsrc/rev/4da455956d8c
branches: trunk
changeset: 539645:4da455956d8c
user: drochner <drochner%pkgsrc.org@localhost>
date: Mon Mar 10 11:59:26 2008 +0000
description:
now that that we rely on the fact that we get correct PIC from yasm
we can as well use libtool, to get a proper .so which can be
dynamically loaded, tested by Mihai Chelaru,
bump PKGREVISION
diffstat:
multimedia/x264-devel/Makefile | 6 +-
multimedia/x264-devel/PLIST | 4 +-
multimedia/x264-devel/buildlink3.mk | 3 +-
multimedia/x264-devel/distinfo | 4 +-
multimedia/x264-devel/patches/patch-ab | 99 ++++++++++++++++++++++++++++++++++
multimedia/x264-devel/patches/patch-ac | 22 +++++++
6 files changed, 131 insertions(+), 7 deletions(-)
diffs (194 lines):
diff -r 1b491e52fe07 -r 4da455956d8c multimedia/x264-devel/Makefile
--- a/multimedia/x264-devel/Makefile Mon Mar 10 11:35:31 2008 +0000
+++ b/multimedia/x264-devel/Makefile Mon Mar 10 11:59:26 2008 +0000
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile,v 1.7 2008/03/07 21:50:41 kefren Exp $
+# $NetBSD: Makefile,v 1.8 2008/03/10 11:59:26 drochner Exp $
#
SNAPSHOT_DATE= 20071218
DISTNAME= x264-snapshot-${SNAPSHOT_DATE}-2245
PKGNAME= x264-devel-${SNAPSHOT_DATE}
+PKGREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= ftp://ftp.videolan.org/pub/videolan/x264/snapshots/
EXTRACT_SUFX= .tar.bz2
@@ -22,11 +23,12 @@
.endif
USE_TOOLS+= gmake
+USE_LIBTOOL= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS+= --prefix=${PREFIX:Q}
-CONFIGURE_ARGS+= --enable-pic
BUILD_TARGET= default
+.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 1b491e52fe07 -r 4da455956d8c multimedia/x264-devel/PLIST
--- a/multimedia/x264-devel/PLIST Mon Mar 10 11:35:31 2008 +0000
+++ b/multimedia/x264-devel/PLIST Mon Mar 10 11:59:26 2008 +0000
@@ -1,5 +1,5 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2006/02/12 14:11:22 joerg Exp $
+@comment $NetBSD: PLIST,v 1.2 2008/03/10 11:59:26 drochner Exp $
bin/x264
include/x264.h
-lib/libx264.a
+lib/libx264.la
lib/pkgconfig/x264.pc
diff -r 1b491e52fe07 -r 4da455956d8c multimedia/x264-devel/buildlink3.mk
--- a/multimedia/x264-devel/buildlink3.mk Mon Mar 10 11:35:31 2008 +0000
+++ b/multimedia/x264-devel/buildlink3.mk Mon Mar 10 11:59:26 2008 +0000
@@ -1,6 +1,5 @@
-# $NetBSD: buildlink3.mk,v 1.5 2006/07/08 23:11:02 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.6 2008/03/10 11:59:26 drochner Exp $
-BUILDLINK_DEPMETHOD.x264-devel?= build
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
X264_DEVEL_BUILDLINK3_MK:= ${X264_DEVEL_BUILDLINK3_MK}+
diff -r 1b491e52fe07 -r 4da455956d8c multimedia/x264-devel/distinfo
--- a/multimedia/x264-devel/distinfo Mon Mar 10 11:35:31 2008 +0000
+++ b/multimedia/x264-devel/distinfo Mon Mar 10 11:59:26 2008 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.5 2008/01/07 13:33:28 joerg Exp $
+$NetBSD: distinfo,v 1.6 2008/03/10 11:59:26 drochner Exp $
SHA1 (x264-snapshot-20071218-2245.tar.bz2) = b5bc182070e17a8470618bae776488514b67a96a
RMD160 (x264-snapshot-20071218-2245.tar.bz2) = 753ab79398bf5bb92b41656ef48ab57dcc63f347
Size (x264-snapshot-20071218-2245.tar.bz2) = 537622 bytes
SHA1 (patch-aa) = cce1ef8b7a332e9f9a4c18a8a4246b9382dc4bca
+SHA1 (patch-ab) = 52324079d8ef0cee899e29fc0edaecb0384b8999
+SHA1 (patch-ac) = 18a21816bddc28b9cd9139c3fdb179ebcbf03a4a
diff -r 1b491e52fe07 -r 4da455956d8c multimedia/x264-devel/patches/patch-ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/x264-devel/patches/patch-ab Mon Mar 10 11:59:26 2008 +0000
@@ -0,0 +1,99 @@
+$NetBSD: patch-ab,v 1.3 2008/03/10 11:59:26 drochner Exp $
+
+--- Makefile.orig 2007-12-18 22:45:04.000000000 +0100
++++ Makefile
+@@ -26,7 +26,7 @@ ASMSRC = common/i386/dct-a.asm common/i
+ common/i386/mc-a2.asm common/i386/predict-a.asm \
+ common/i386/pixel-sse2.asm common/i386/quant-a.asm \
+ common/i386/deblock-a.asm
+-OBJASM = $(ASMSRC:%.asm=%.o)
++OBJASM = $(ASMSRC:%.asm=%.lo)
+ ASFLAGS += -Icommon/i386/
+ endif
+ endif
+@@ -40,7 +40,7 @@ ASMSRC = common/amd64/dct-a.asm common/
+ common/amd64/mc-a2.asm common/amd64/predict-a.asm \
+ common/amd64/pixel-sse2.asm common/amd64/quant-a.asm \
+ common/amd64/deblock-a.asm
+-OBJASM = $(ASMSRC:%.asm=%.o)
++OBJASM = $(ASMSRC:%.asm=%.lo)
+ ASFLAGS += -Icommon/amd64
+ endif
+ endif
+@@ -51,20 +51,20 @@ ALTIVECSRC += common/ppc/mc.c common/ppc
+ common/ppc/quant.c common/ppc/deblock.c \
+ common/ppc/predict.c
+ SRCS += $(ALTIVECSRC)
+-$(ALTIVECSRC:%.c=%.o): CFLAGS += $(ALTIVECFLAGS)
++$(ALTIVECSRC:%.c=%.lo): CFLAGS += $(ALTIVECFLAGS)
+ endif
+
+ # VIS optims
+ ifeq ($(ARCH),UltraSparc)
+ ASMSRC += common/sparc/pixel.asm
+-OBJASM = $(ASMSRC:%.asm=%.o)
++OBJASM = $(ASMSRC:%.asm=%.lo)
+ endif
+
+ ifneq ($(HAVE_GETOPT_LONG),1)
+ SRCS += extras/getopt.c
+ endif
+
+-OBJS = $(SRCS:%.c=%.o)
++OBJS = $(SRCS:%.c=%.lo)
+ OBJCLI = $(SRCCLI:%.c=%.o)
+ DEP = depend
+
+@@ -73,15 +73,17 @@ all: default
+
+ default: $(DEP) x264$(EXE)
+
+-libx264.a: .depend $(OBJS) $(OBJASM)
+- ar rc libx264.a $(OBJS) $(OBJASM)
+- ranlib libx264.a
++%.lo: %.c
++ ${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} -o $@ $<
++
++libx264.la: .depend $(OBJS) $(OBJASM)
++ ${LIBTOOL} --mode=link ${CC} -o libx264.la $(OBJS) $(OBJASM) ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} -rpath ${PREFIX}/lib -version-info 0
+
+ $(SONAME): .depend $(OBJS) $(OBJASM)
+ $(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
+
+-x264$(EXE): $(OBJCLI) libx264.a
+- $(CC) -o $@ $+ $(LDFLAGS)
++x264$(EXE): $(OBJCLI) libx264.la
++ ${LIBTOOL} --mode=link $(CC) -o $@ $+ $(LDFLAGS)
+
+ libx264gtk.a: muxers.o libx264.a
+ $(MAKE) -C gtk
+@@ -89,10 +91,10 @@ libx264gtk.a: muxers.o libx264.a
+ checkasm: tools/checkasm.o libx264.a
+ $(CC) -o $@ $+ $(LDFLAGS)
+
+-common/amd64/*.o: common/amd64/amd64inc.asm
+-common/i386/*.o: common/i386/i386inc.asm
+-%.o: %.asm
+- $(AS) $(ASFLAGS) -o $@ $<
++common/amd64/*.lo: common/amd64/amd64inc.asm
++common/i386/*.lo: common/i386/i386inc.asm
++%.lo: %.asm
++ ${LIBTOOL} --mode=compile --tag=ASM sh strip_fPIC.sh $(AS) $(ASFLAGS) -o $@ $<
+ # delete local/anonymous symbols, so they don't show up in oprofile
+ -@ strip -x $@
+
+@@ -153,12 +155,9 @@ install: x264 $(SONAME)
+ install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
+ install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
+ install -m 644 x264.h $(DESTDIR)$(includedir)
+- install -m 644 libx264.a $(DESTDIR)$(libdir)
++ ${LIBTOOL} --mode=install install -m 644 libx264.la $(DESTDIR)$(libdir)
+ install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
+- install x264 $(DESTDIR)$(bindir)
+- ranlib $(DESTDIR)$(libdir)/libx264.a
+- $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
+- $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
++ ${LIBTOOL} --mode=install install x264 $(DESTDIR)$(bindir)
+
+ install-gtk: libx264gtk.a
+ $(MAKE) -C gtk install
diff -r 1b491e52fe07 -r 4da455956d8c multimedia/x264-devel/patches/patch-ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/multimedia/x264-devel/patches/patch-ac Mon Mar 10 11:59:26 2008 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.1 2008/03/10 11:59:26 drochner Exp $
+
+--- strip_fPIC.sh.orig 2008-01-11 20:38:05.000000000 +0100
++++ strip_fPIC.sh
+@@ -0,0 +1,17 @@
++#!/bin/sh
++#
++# libtool assumes that the compiler can handle the -fPIC flag
++# This isn't always true (for example, nasm can't handle it)
++command=""
++while [ $1 ]; do
++ if [ "$1" != "-fPIC" ]; then
++ if [ "$1" = "-DPIC" ]; then
++ command="$command -D__PIC__"
++ else
++ command="$command $1"
++ fi
++ fi
++ shift
++done
++echo $command
++exec $command
Home |
Main Index |
Thread Index |
Old Index