aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--multimedia/x264-devel/Makefile10
-rw-r--r--multimedia/x264-devel/files/patch-Makefile31
-rw-r--r--multimedia/x264/Makefile10
-rw-r--r--multimedia/x264/files/patch-Makefile31
4 files changed, 72 insertions, 10 deletions
diff --git a/multimedia/x264-devel/Makefile b/multimedia/x264-devel/Makefile
index 54fbef20ff70..2dd979be71d6 100644
--- a/multimedia/x264-devel/Makefile
+++ b/multimedia/x264-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= x264
PORTVERSION= 0.0.20041029
+PORTREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= http://download.videolan.org/pub/videolan/contrib/ \
http://ftp.snt.utwente.nl/pub/software/videolan/contrib/
@@ -23,11 +24,15 @@ WRKSRC= ${WRKDIR}/${DISTNAME}
USE_REINPLACE= yes
USE_GMAKE= yes
ALL_TARGET= default
+SHLIB_VER= 0
CFLAGS+= -DSYS_FREEBSD
+INSTALLS_SHLIB= yes
PLIST_FILES= bin/x264 \
include/x264.h \
- lib/libx264.a
+ lib/libx264.a \
+ lib/libx264.so \
+ lib/libx264.so.${SHLIB_VER}
OPTIONS= DEBUG "Enable Debugging" Off \
OPTIMIZED_CFLAGS "Enable Optimized CFLAGS" Off
@@ -56,11 +61,14 @@ CFLAGS+= -O2 -funroll-loops
post-patch:
@${REINPLACE_CMD} -e 's|%%CFLAGS%%|${CFLAGS} ${CPPFLAGS}|; \
+ s|%%SHLIB_VER%%|${SHLIB_VER}|; \
s|-lm|${LDFLAGS} -lm|' ${WRKSRC}/${MAKEFILE}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/x264 ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/x264.h ${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/libx264.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/libx264.so.${SHLIB_VER} ${PREFIX}/lib
+ ${LN} -sf libx264.so.${SHLIB_VER} ${PREFIX}/lib/libx264.so
.include <bsd.port.post.mk>
diff --git a/multimedia/x264-devel/files/patch-Makefile b/multimedia/x264-devel/files/patch-Makefile
index 5fd25a3f222d..4fbd383809c4 100644
--- a/multimedia/x264-devel/files/patch-Makefile
+++ b/multimedia/x264-devel/files/patch-Makefile
@@ -1,12 +1,35 @@
---- Makefile.orig Tue Jan 11 23:32:24 2005
-+++ Makefile Tue Jan 11 23:33:05 2005
-@@ -22,8 +22,7 @@
+--- Makefile.orig Fri Oct 29 06:05:39 2004
++++ Makefile Thu Jan 20 01:42:05 2005
+@@ -20,10 +20,11 @@
+ SRCS= $(SRCS_COMMON) core/i386/mc-c.c core/i386/dct-c.c core/i386/predict.c
+ ASMSRC= core/i386/dct.asm core/i386/cpu.asm core/i386/pixel.asm core/i386/mc.asm
OBJASM= $(ASMSRC:%.asm=%.o)
++SHARED_LIB= libx264.so
++SHARED_LIB_VER= $(SHARED_LIB).%%SHLIB_VER%%
endif
-CC=gcc
-CFLAGS=-g -Wall -I. -DDEBUG -O4 -funroll-loops -D__X264__ $(PFLAGS)
-+CFLAGS=-I. -D__X264__ %%CFLAGS%%
++CFLAGS=-I. -D__X264__ %%CFLAGS%% -fPIC
AS= nasm
# for linux
+@@ -34,7 +35,7 @@
+ OBJS = $(SRCS:%.c=%.o)
+ DEP = depend
+
+-default: $(DEP) x264
++default: $(DEP) x264 $(SHARED_LIB_VER)
+
+ libx264.a: $(OBJS) $(OBJASM)
+ ar rc libx264.a $(OBJS) $(OBJASM)
+@@ -42,6 +43,9 @@
+
+ x264: libx264.a x264.o
+ $(CC) $(CFLAGS) -o x264 x264.o libx264.a -lm
++
++$(SHARED_LIB_VER): $(OBJS) x264
++ $(CC) $(CFLAGS) -shared -Wl,-soname,$(SHARED_LIB_VER) -o $(SHARED_LIB_VER) $(OBJS)
+
+ checkasm: testing/checkasm.c libx264.a
+ $(CC) $(CFLAGS) -o checkasm $< libx264.a -lm
diff --git a/multimedia/x264/Makefile b/multimedia/x264/Makefile
index 54fbef20ff70..2dd979be71d6 100644
--- a/multimedia/x264/Makefile
+++ b/multimedia/x264/Makefile
@@ -7,6 +7,7 @@
PORTNAME= x264
PORTVERSION= 0.0.20041029
+PORTREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= http://download.videolan.org/pub/videolan/contrib/ \
http://ftp.snt.utwente.nl/pub/software/videolan/contrib/
@@ -23,11 +24,15 @@ WRKSRC= ${WRKDIR}/${DISTNAME}
USE_REINPLACE= yes
USE_GMAKE= yes
ALL_TARGET= default
+SHLIB_VER= 0
CFLAGS+= -DSYS_FREEBSD
+INSTALLS_SHLIB= yes
PLIST_FILES= bin/x264 \
include/x264.h \
- lib/libx264.a
+ lib/libx264.a \
+ lib/libx264.so \
+ lib/libx264.so.${SHLIB_VER}
OPTIONS= DEBUG "Enable Debugging" Off \
OPTIMIZED_CFLAGS "Enable Optimized CFLAGS" Off
@@ -56,11 +61,14 @@ CFLAGS+= -O2 -funroll-loops
post-patch:
@${REINPLACE_CMD} -e 's|%%CFLAGS%%|${CFLAGS} ${CPPFLAGS}|; \
+ s|%%SHLIB_VER%%|${SHLIB_VER}|; \
s|-lm|${LDFLAGS} -lm|' ${WRKSRC}/${MAKEFILE}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/x264 ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/x264.h ${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/libx264.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/libx264.so.${SHLIB_VER} ${PREFIX}/lib
+ ${LN} -sf libx264.so.${SHLIB_VER} ${PREFIX}/lib/libx264.so
.include <bsd.port.post.mk>
diff --git a/multimedia/x264/files/patch-Makefile b/multimedia/x264/files/patch-Makefile
index 5fd25a3f222d..4fbd383809c4 100644
--- a/multimedia/x264/files/patch-Makefile
+++ b/multimedia/x264/files/patch-Makefile
@@ -1,12 +1,35 @@
---- Makefile.orig Tue Jan 11 23:32:24 2005
-+++ Makefile Tue Jan 11 23:33:05 2005
-@@ -22,8 +22,7 @@
+--- Makefile.orig Fri Oct 29 06:05:39 2004
++++ Makefile Thu Jan 20 01:42:05 2005
+@@ -20,10 +20,11 @@
+ SRCS= $(SRCS_COMMON) core/i386/mc-c.c core/i386/dct-c.c core/i386/predict.c
+ ASMSRC= core/i386/dct.asm core/i386/cpu.asm core/i386/pixel.asm core/i386/mc.asm
OBJASM= $(ASMSRC:%.asm=%.o)
++SHARED_LIB= libx264.so
++SHARED_LIB_VER= $(SHARED_LIB).%%SHLIB_VER%%
endif
-CC=gcc
-CFLAGS=-g -Wall -I. -DDEBUG -O4 -funroll-loops -D__X264__ $(PFLAGS)
-+CFLAGS=-I. -D__X264__ %%CFLAGS%%
++CFLAGS=-I. -D__X264__ %%CFLAGS%% -fPIC
AS= nasm
# for linux
+@@ -34,7 +35,7 @@
+ OBJS = $(SRCS:%.c=%.o)
+ DEP = depend
+
+-default: $(DEP) x264
++default: $(DEP) x264 $(SHARED_LIB_VER)
+
+ libx264.a: $(OBJS) $(OBJASM)
+ ar rc libx264.a $(OBJS) $(OBJASM)
+@@ -42,6 +43,9 @@
+
+ x264: libx264.a x264.o
+ $(CC) $(CFLAGS) -o x264 x264.o libx264.a -lm
++
++$(SHARED_LIB_VER): $(OBJS) x264
++ $(CC) $(CFLAGS) -shared -Wl,-soname,$(SHARED_LIB_VER) -o $(SHARED_LIB_VER) $(OBJS)
+
+ checkasm: testing/checkasm.c libx264.a
+ $(CC) $(CFLAGS) -o checkasm $< libx264.a -lm