aboutsummaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg-devel
diff options
context:
space:
mode:
authorMark Linimon <linimon@FreeBSD.org>2003-12-08 03:26:41 +0000
committerMark Linimon <linimon@FreeBSD.org>2003-12-08 03:26:41 +0000
commitf6f8cd37998aaf71bd3bf0c29c56d6f1f1f5edb9 (patch)
tree9f4b86511da75c0c7178529efb1a570f6993ff15 /multimedia/ffmpeg-devel
parent43f1d6477113bb38cffadb03101ef7a3a9c14d51 (diff)
downloadports-f6f8cd37998aaf71bd3bf0c29c56d6f1f1f5edb9.tar.gz
ports-f6f8cd37998aaf71bd3bf0c29c56d6f1f1f5edb9.zip
Fix installation of shared libs, man page installation, and plist.
Bump portrevision, although the original patch didn't do that (this seems necessary enough to me). Compiles ok on 4.x, 5.x. PR: ports/56721 Submitted by: Simon Barner <barner@in.tum.de> Committed on behalf of lioux@, who is having machine troubles.
Notes
Notes: svn path=/head/; revision=95314
Diffstat (limited to 'multimedia/ffmpeg-devel')
-rw-r--r--multimedia/ffmpeg-devel/Makefile25
-rw-r--r--multimedia/ffmpeg-devel/files/patch-Makefile15
-rw-r--r--multimedia/ffmpeg-devel/files/patch-configure55
-rw-r--r--multimedia/ffmpeg-devel/files/patch-libavcodec::Makefile26
-rw-r--r--multimedia/ffmpeg-devel/files/patch-libavformat::Makefile13
-rw-r--r--multimedia/ffmpeg-devel/files/patch-vhook::Makefile19
6 files changed, 136 insertions, 17 deletions
diff --git a/multimedia/ffmpeg-devel/Makefile b/multimedia/ffmpeg-devel/Makefile
index 5de1b3a5bcf9..567ef9a8b9f7 100644
--- a/multimedia/ffmpeg-devel/Makefile
+++ b/multimedia/ffmpeg-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ffmpeg
PORTVERSION= 0.4.8
+PORTREVISION= 1
CATEGORIES= multimedia audio net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ffmpeg
@@ -18,9 +19,13 @@ USE_GETOPT_LONG= yes
HAS_CONFIGURE= yes
USE_GMAKE= yes
USE_REINPLACE= yes
-CONFIGURE_ARGS= --cc="${CC}" --prefix="${PREFIX}" \
+CONFIGURE_ARGS= --cc="${CC}" --prefix="${PREFIX}" \
--make="${GMAKE}" --enable-shared \
- --extra-libs="-lm -L${LOCALBASE}/lib"
+ --extra-ldflags="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
+ --extra-libs"-lm" \
+ --disable-debug
+MAKE_ENV+= LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib"
+
PLIST_SUB= SHLIB_VERSION=${SHLIB_VERSION}
INSTALLS_SHLIB= yes
@@ -35,6 +40,7 @@ DOC_DOCFILES= TODO \
HEADER_FILES= libavcodec/avcodec.h libavcodec/common.h \
libavcodec/dsputil.h
LIB_FILES= libavcodec/libavcodec.a libavformat/libavformat.a
+MAN1= ffmpeg.1 ffplay.1 ffserver.1
.include <bsd.port.pre.mk>
@@ -53,7 +59,7 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-bktr-patch-libavformat::Makefile
##
## SDL
.if exists(${LOCALBASE}/lib/libSDL-1.1.so)
-#WITH_SDL=yes
+WITH_SDL=yes
.endif
## freetype2
.if exists(${LOCALBASE}/lib/libfreetype.so)
@@ -120,11 +126,15 @@ CONFIGURE_ARGS+= --enable-mp3lame
.endif
## optimization
.ifdef(WITH_OPTIMIZED_CFLAGS)
-CONFIGURE_ARGS+= --extra-cflags="${CFLAGS} -I${LOCALBASE}/include \
- -O3 -ffast-math -fomit-frame-pointer"
+CONFIGURE_ARGS+= --extra-cflags="-I${LOCALBASE}/include \
+ -I${X11BASE}/include \
+ -ffast-math -fomit-frame-pointer"
.else
-CONFIGURE_ARGS+= --extra-cflags="${CFLAGS} -I${LOCALBASE}/include"
+CONFIGURE_ARGS+= --extra-cflags="-I${LOCALBASE}/include \
+ -I${X11BASE}/include" \
+ --disable-opts
.endif
+
## vhook
.ifndef(WITHOUT_VHOOK)
PLIST_SUB+= VHOOK=""
@@ -254,8 +264,9 @@ post-install:
.for file in ${LIB_FILES}
@${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/lib/${file:T}
.endfor
+
# add shared lib link
@${LN} -sf libavcodec.so \
- ${PREFIX}/lib/libavcodec.so.${SHLIB_VERSION}
+ ${PREFIX}/lib/libavcodec.so.${SHLIB_VERSION}
.include <bsd.port.post.mk>
diff --git a/multimedia/ffmpeg-devel/files/patch-Makefile b/multimedia/ffmpeg-devel/files/patch-Makefile
index b3c67ee98c4c..be3ba07a2aa1 100644
--- a/multimedia/ffmpeg-devel/files/patch-Makefile
+++ b/multimedia/ffmpeg-devel/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Wed Jan 1 20:51:57 2003
-+++ Makefile Wed Jan 1 20:52:27 2003
+--- Makefile.orig Sun Sep 28 17:26:39 2003
++++ Makefile Sat Dec 6 02:29:28 2003
@@ -6,8 +6,7 @@
VPATH=$(SRC_PATH)
@@ -10,3 +10,14 @@
ifeq ($(TARGET_GPROF),yes)
CFLAGS+=-p
+@@ -69,8 +68,8 @@
+ all: lib $(PROG) $(PROGTEST) $(VHOOK)
+
+ lib:
+- $(MAKE) -C libavcodec all
+- $(MAKE) -C libavformat all
++ $(MAKE) LDFLAGS="$(LDFLAGS)" -C libavcodec all
++ $(MAKE) LDFLAGS="$(LDFLAGS)" -C libavformat all
+
+ ffmpeg_g$(EXESUF): ffmpeg.o cmdutils.o .libs
+ $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(FFLIBS) $(EXTRALIBS)
diff --git a/multimedia/ffmpeg-devel/files/patch-configure b/multimedia/ffmpeg-devel/files/patch-configure
new file mode 100644
index 000000000000..08c90a8527c6
--- /dev/null
+++ b/multimedia/ffmpeg-devel/files/patch-configure
@@ -0,0 +1,55 @@
+--- configure.orig Sun Sep 28 17:26:39 2003
++++ configure Sat Dec 6 03:41:29 2003
+@@ -22,7 +22,7 @@
+ mandir=""
+ bindir=""
+ cross_prefix=""
+-cc="gcc"
++cc="$CC"
+ ar="ar"
+ ranlib="ranlib"
+ make="make"
+@@ -111,7 +111,7 @@
+ BeOS)
+ prefix="/boot/home/config"
+ # helps building libavcodec
+-CFLAGS="-DPIC -fomit-frame-pointer"
++CFLAGS="$CFLAGS -DPIC -fomit-frame-pointer"
+ # 3 gcc releases known for BeOS, each with ugly bugs
+ gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
+ case "$gcc_version" in
+@@ -177,13 +177,13 @@
+ gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
+ case "$gcc_version" in
+ *2.95*)
+-CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
++CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
+ ;;
+ *3.3*)
+-CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL"
++CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL"
+ ;;
+ *)
+-CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic"
++CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic"
+ ;;
+ esac
+ ;;
+@@ -276,7 +276,7 @@
+ ;;
+ --make=*) make=`echo $opt | cut -d '=' -f 2`
+ ;;
+- --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
++ --extra-cflags=*) CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
+ ;;
+ --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
+ ;;
+@@ -682,7 +682,7 @@
+ EOF
+
+ imlib2=no
+-if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
++if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
+ imlib2=yes
+ fi
+
diff --git a/multimedia/ffmpeg-devel/files/patch-libavcodec::Makefile b/multimedia/ffmpeg-devel/files/patch-libavcodec::Makefile
index 9c2edd0f9d68..04fe848c9d33 100644
--- a/multimedia/ffmpeg-devel/files/patch-libavcodec::Makefile
+++ b/multimedia/ffmpeg-devel/files/patch-libavcodec::Makefile
@@ -1,12 +1,22 @@
---- libavcodec/Makefile.orig Sun Oct 6 12:26:38 2002
-+++ libavcodec/Makefile Wed Oct 9 14:24:34 2002
-@@ -228,8 +228,7 @@
- install: all
- ifeq ($(BUILD_SHARED),yes)
+--- libavcodec/Makefile.orig Sat Dec 6 02:32:47 2003
++++ libavcodec/Makefile Sat Dec 6 03:00:14 2003
+@@ -162,7 +162,7 @@
+ $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
+ -lib /machine:i386 /def:$(@:.dll=.def)
+ else
+- $(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
++ $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
+ endif
+
+ dsputil.o: dsputil.c dsputil.h
+@@ -230,8 +230,8 @@
+ install -s -m 755 $(SLIB) "$(prefix)"
+ else
install -d $(prefix)/lib
- install -s -m 755 $(SLIB) $(prefix)/lib/libavcodec-$(VERSION).so
- ln -sf libavcodec-$(VERSION).so $(prefix)/lib/libavcodec.so
-+ install -s -m 755 $(SLIB) $(prefix)/lib/libavcodec.so
++ install -s -m 755 $(SLIB) $(prefix)/lib/libavcodec.so.0
++ cd $(prefix)/lib && ln -s libavcodec.so.0 libavcodec.so
ldconfig || true
- mkdir -p $(prefix)/include/ffmpeg
- install -m 644 $(VPATH)/avcodec.h $(prefix)/include/ffmpeg/avcodec.h
+ endif
+ else
diff --git a/multimedia/ffmpeg-devel/files/patch-libavformat::Makefile b/multimedia/ffmpeg-devel/files/patch-libavformat::Makefile
new file mode 100644
index 000000000000..49134edfe3b8
--- /dev/null
+++ b/multimedia/ffmpeg-devel/files/patch-libavformat::Makefile
@@ -0,0 +1,13 @@
+--- libavformat/Makefile.orig Thu Sep 11 22:55:10 2003
++++ libavformat/Makefile Thu Sep 11 23:12:50 2003
+@@ -88,8 +88,8 @@
+ install: all
+ ifeq ($(BUILD_SHARED),yes)
+ install -d $(prefix)/lib
+- install -s -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so
+- ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so
++ install -s -m 755 $(SLIB) $(prefix)/lib/libavformat.so.0
++ ln -sf libavformat.so.0 $(prefix)/lib/libavformat.so
+ ldconfig || true
+ mkdir -p $(prefix)/include/ffmpeg
+ install -m 644 $(VPATH)/avformat.h $(prefix)/include/ffmpeg/avformat.h
diff --git a/multimedia/ffmpeg-devel/files/patch-vhook::Makefile b/multimedia/ffmpeg-devel/files/patch-vhook::Makefile
new file mode 100644
index 000000000000..cea89f3f74e5
--- /dev/null
+++ b/multimedia/ffmpeg-devel/files/patch-vhook::Makefile
@@ -0,0 +1,19 @@
+--- vhook/Makefile.orig Fri Dec 5 20:07:04 2003
++++ vhook/Makefile Fri Dec 5 20:07:55 2003
+@@ -29,13 +29,13 @@
+ install -s -m 755 $(HOOKS) $(INSTDIR)
+
+ imlib2.so: imlib2.o
+- $(CC) -g -o $@ $(SHFLAGS) $< -lImlib2
++ $(CC) -o $@ $(LDFLAGS) $(SHFLAGS) $< -lImlib2
+
+ drawtext.so: drawtext.o
+- $(CC) -g -o $@ $(SHFLAGS) $< `freetype-config --libs`
++ $(CC) -o $@ $(LDFLAGS) $(SHFLAGS) $< `freetype-config --libs`
+
+ %.so: %.o
+- $(CC) -g -o $@ $(SHFLAGS) $<
++ $(CC) -o $@ $(LDFLAGS) $(SHFLAGS) $<
+
+ clean:
+ rm -f *.o *.d .depend *.so *~