Ticket #2901: ffmpeg.diff

File ffmpeg.diff, 14.6 KB (added by danchr@…, 19 years ago)

patch against dports/ffmpeg

  • Portfile

    diff -Naur --exclude=CVS /usr/src/darwinports/dports/multimedia/ffmpeg/Portfile ./Portfile
    old new  
    22
    33PortSystem 1.0
    44name            ffmpeg
    5 version         0.4.8
     5version         0.4.9-devel
    66categories      multimedia
    7 maintainers     ocheron@noos.fr
     7maintainers     danchr@opendarwin.org ocheron@noos.fr
    88description     Digital VCR and streaming server
    99long_description        FFmpeg is a complete solution to record, convert and \
    1010                        stream audio and video. It includes libavcodec, the \
     
    3131                        libavformat is a library containing parsers and \
    3232                        generators for all common audio/video formats.
    3333homepage        http://ffmpeg.sourceforge.net/
    34 master_sites    sourceforge:ffmpeg
    35 checksums       ${distname}${extract.suffix} md5 e00d47614ba1afd99ad2ea387e782dd9
     34master_sites    http://mplayerhq.hu/MPlayer/cvs/
     35distname        FFMpeg-20050414
     36checksums       sha1 d68745415f8891ecf017c1c97880b499a81642bf
     37use_bzip2       yes
    3638platforms       darwin
    37 configure.env   CFLAGS="-I${prefix}/include"
    38 configure.args  --prefix=${destroot}${prefix} --disable-vhook \
    39                 --mandir=${destroot}${prefix}/share/man \
    40                 --extra-ldflags="-d -L${prefix}/lib"
    41 patchfiles      patch-configure.diff
     39configure.args  --prefix=${prefix} --mandir=${prefix}/share/man \
     40                --extra-ldflags="-L${prefix}/lib" \
     41                --extra-cflags="-I${prefix}/include" \
     42                --enable-shared --enable-gpl --enable-pthreads --disable-vhook \
     43                --enable-mp3lame --enable-a52 --enable-dts --enable-faac \
     44                --enable-faad --enable-shared-pp --enable-pp --enable-x264 \
     45                --enable-xvid --enable-libogg --enable-vorbis \
     46                --disable-strip --disable-debug
     47
     48patchfiles      patch-libavformat-Makefile patch-libavcodec-Makefile \
     49                patch-libavcodec-libpostproc-Makefile patch-configure \
     50                patch-Makefile
     51
     52depends_build   lib:libx264:x264
     53depends_lib     lib:libmp3lame:lame lib:liba52:a52dec lib:libfaac:faac \
     54                lib:libfaad:faad2 lib:libxvidcore:xvid lib:libogg:libogg \
     55                lib:libvorbis:libvorbis lib:libz:zlib lib:libdts:libdts
    4256
    4357post-destroot {
    4458        file mkdir ${destroot}/${prefix}/share/doc/${name}
     
    4660        foreach f [glob ${worksrcpath}/doc/*.txt ${worksrcpath}/doc/*.html] {
    4761                file copy $f ${destroot}/${prefix}/share/doc/${name}
    4862        }
    49 }
    50 
    51 # Adds MP3 support
    52 variant mp3 {
    53         depends_lib-append lib:XXX:lame
    54         configure.args-append --enable-mp3lame
    55 }
    56 
    57 # Adds Ogg Vorbis support
    58 variant ogg-vorbis {
    59         depends_lib-append lib:XXX:libvorbis
    60         configure.args-append --enable-vorbis
    61 }
    62 
    63 # Adds AAC support
    64 variant aac {
    65         depends_lib-append lib:XXX:faad2
    66         configure.args-append --enable-faad
    6763}
  • files/patch-Makefile

    diff -Naur --exclude=CVS /usr/src/darwinports/dports/multimedia/ffmpeg/files/patch-Makefile ./files/patch-Makefile
    old new  
     1--- Makefile.orig       Fri Apr 15 23:14:34 2005
     2+++ Makefile    Fri Apr 15 23:14:44 2005
     3@@ -36,6 +36,10 @@
     4 
     5 ifeq ($(BUILD_SHARED),yes)
     6 DEP_LIBS=libavcodec/$(SLIBPREF)avcodec$(SLIBSUF) libavformat/$(SLIBPREF)avformat$(SLIBSUF)
     7+ifeq ($(CONFIG_DARWIN),yes)
     8+LDFLAGS+=$(foreach l,$(DEP_LIBS) libavcodec/libpostproc/libpostproc$(SLIBSUF), \
     9+       -dylib_file $(libdir)/$(notdir $l):$l)
     10+endif
     11 else
     12 DEP_LIBS=libavcodec/$(LIBPREF)avcodec$(LIBSUF) libavformat/$(LIBPREF)avformat$(LIBSUF)
     13 ifeq ($(CONFIG_MP3LAME),yes)
     14@@ -91,7 +95,7 @@
     15 
     16 OBJS = ffmpeg.o ffserver.o cmdutils.o $(FFPLAY_O)
     17 SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
     18-FFLIBS = -L./libavformat -lavformat -L./libavcodec -lavcodec
     19+FFLIBS = -L./libavformat -lavformat -L./libavcodec -L./libavcodec/libpostproc -lavcodec
     20 
     21 all: lib $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC)
     22 
     23@@ -142,8 +146,8 @@
     24 install: all install-man $(INSTALLVHOOK)
     25        $(MAKE) -C libavcodec install
     26        $(MAKE) -C libavformat install
     27-       install -d "$(bindir)"
     28-       install -c $(INSTALLSTRIP) -m 755 $(PROG) "$(bindir)"
     29+       install -d "$(DESTDIR)$(bindir)"
     30+       install -c $(INSTALLSTRIP) -m 755 $(PROG) "$(DESTDIR)$(bindir)"
     31 
     32 # create the window installer
     33 wininstaller: all install
     34@@ -153,8 +157,8 @@
     35 install-man:
     36 ifneq ($(CONFIG_WIN32),yes)
     37        if [ -f doc/ffmpeg.1 ] ; then \
     38-           install -d "$(mandir)/man1" ; \
     39-           install -m 644 $(MANPAGE) "$(mandir)/man1" ; \
     40+           install -d "$(DESTDIR)$(mandir)/man1" ; \
     41+           install -m 644 $(MANPAGE) "$(DESTDIR)$(mandir)/man1" ; \
     42        fi
     43 endif
     44 
  • files/patch-configure

    diff -Naur --exclude=CVS /usr/src/darwinports/dports/multimedia/ffmpeg/files/patch-configure ./files/patch-configure
    old new  
     1Index: configure
     2===================================================================
     3RCS file: /cvsroot/ffmpeg/ffmpeg/configure,v
     4retrieving revision 1.167
     5diff -a -u -u -r1.167 configure
     6--- configure   9 Apr 2005 15:32:58 -0000       1.167
     7+++ configure   15 Apr 2005 18:20:30 -0000
     8@@ -279,12 +279,13 @@
     9 audio_oss="no"
     10 dv1394="no"
     11 ffserver="no"
     12-SHFLAGS="-dynamiclib"
     13-extralibs=""
     14+SHFLAGS="-dynamiclib -single_module"
     15+SLIBSUF=.dylib
     16+extralibs="-lmx"
     17 darwin="yes"
     18 strip="strip -x"
     19-LDFLAGS="-Wl,-d,-search_paths_first"
     20-FFSLDFLAGS=-Wl,-bind_at_load
     21+LDFLAGS="-Wl,-search_paths_first"
     22+FFSLDFLAGS=
     23 ;;
     24 MINGW32*)
     25 # Note: the rest of the mingw32 config is done afterwards as mingw32
  • files/patch-configure.diff

    diff -Naur --exclude=CVS /usr/src/darwinports/dports/multimedia/ffmpeg/files/patch-configure.diff ./files/patch-configure.diff
    old new  
    1 --- configure   Sun Sep 28 17:26:39 2003
    2 +++ configure.diff      Wed Jan 14 10:59:52 2004
    3 @@ -163,6 +163,7 @@
    4  make="gmake"
    5  ;;
    6  Darwin)
    7 +SLIBSUF=".dylib"
    8  cc="cc"
    9  v4l="no"
    10  audio_oss="no"
    11 @@ -177,13 +178,13 @@
    12  gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
    13  case "$gcc_version" in
    14  *2.95*)
    15 -CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
    16 +CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
    17  ;;
    18  *3.3*)
    19 -CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL"
    20 +CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL"
    21  ;;
    22  *)
    23 -CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic"
    24 +CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic"
    25  ;;
    26  esac
    27  ;;
  • files/patch-libavcodec-Makefile

    diff -Naur --exclude=CVS /usr/src/darwinports/dports/multimedia/ffmpeg/files/patch-libavcodec-Makefile ./files/patch-libavcodec-Makefile
    old new  
     1Index: libavcodec/Makefile
     2===================================================================
     3RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/Makefile,v
     4retrieving revision 1.182
     5diff -a -u -u -r1.182 Makefile
     6--- libavcodec/Makefile 3 Apr 2005 05:02:08 -0000       1.182
     7+++ libavcodec/Makefile 15 Apr 2005 18:49:35 -0000
     8@@ -223,6 +223,10 @@
     9        $(AR) rc $@ $(OBJS) $(AMREXTRALIBS)
     10        $(RANLIB) $@
     11 
     12+ifeq ($(CONFIG_DARWIN), yes)
     13+SHFLAGS+=-install_name $(libdir)/$(SLIB)
     14+endif
     15+
     16 $(SLIB): $(OBJS)
     17 ifeq ($(CONFIG_PP),yes)
     18        $(MAKE) -C libpostproc
     19@@ -251,7 +255,7 @@
     20 dep:   depend
     21 
     22 clean: $(CLEANAMR)
     23-       rm -f *.o *.d *~ .depend $(LIB) $(SLIB) *.so i386/*.o i386/*~ \
     24+       rm -f *.o *.d *~ .depend $(LIB) $(SLIB) *$(SLIBSUF) i386/*.o i386/*~ \
     25           armv4l/*.o armv4l/*~ \
     26           mlib/*.o mlib/*~ \
     27           alpha/*.o alpha/*~ \
     28@@ -300,13 +304,17 @@
     29 ifeq ($(BUILD_SHARED),yes)
     30 install: all install-headers
     31 ifeq ($(CONFIG_WIN32),yes)
     32-       install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
     33+       install $(INSTALLSTRIP) -m 755 $(SLIB) "$(DESTDIR)$(prefix)"
     34 else
     35-       install -d $(libdir)
     36-       install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavcodec-$(VERSION).so
     37-       ln -sf libavcodec-$(VERSION).so $(libdir)/libavcodec.so
     38+       install -d $(DESTDIR)$(libdir)
     39+ifeq ($(CONFIG_DARWIN),yes)
     40+       install $(INSTALLSTRIP) -m 755 $(SLIB) $(DESTDIR)$(libdir)/$(SLIB)
     41+else
     42+       install $(INSTALLSTRIP) -m 755 $(SLIB) $(DESTDIR)$(libdir)/libavcodec-$(VERSION).so
     43+       ln -sf libavcodec-$(VERSION).so $(DESTDIR)$(libdir)/libavcodec.so
     44        ldconfig || true
     45 endif
     46+endif
     47 ifeq ($(CONFIG_PP),yes)
     48        $(MAKE) -C libpostproc $@
     49 endif
     50@@ -315,14 +323,14 @@
     51 endif
     52 
     53 installlib: all install-headers
     54-       install -m 644 $(LIB) "$(libdir)"
     55+       install -m 644 $(LIB) "$(DESTDIR)$(libdir)"
     56 
     57 install-headers:
     58-       mkdir -p "$(prefix)/include/ffmpeg"
     59+       mkdir -p "$(DESTDIR)$(prefix)/include/ffmpeg"
     60        install -m 644 $(SRC_PATH)/libavcodec/avcodec.h \
     61                       $(SRC_PATH)/libavcodec/common.h \
     62                       $(SRC_PATH)/libavcodec/rational.h \
     63-                "$(prefix)/include/ffmpeg"
     64+                "$(DESTDIR)$(prefix)/include/ffmpeg"
     65 
     66 #
     67 # include dependency files if they exist
  • files/patch-libavcodec-libpostproc-Makefile

    diff -Naur --exclude=CVS /usr/src/darwinports/dports/multimedia/ffmpeg/files/patch-libavcodec-libpostproc-Makefile ./files/patch-libavcodec-libpostproc-Makefile
    old new  
     1Index: libavcodec/libpostproc/Makefile
     2===================================================================
     3RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/libpostproc/Makefile,v
     4retrieving revision 1.21
     5diff -a -u -u -r1.21 Makefile
     6--- libavcodec/libpostproc/Makefile     23 Mar 2005 14:10:22 -0000      1.21
     7+++ libavcodec/libpostproc/Makefile     15 Apr 2005 18:49:36 -0000
     8@@ -15,6 +15,12 @@
     9 CFLAGS  = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
     10 # -I/usr/X11R6/include/
     11 
     12+ifeq ($(CONFIG_DARWIN), yes)
     13+SHFLAGS+=-install_name $(libdir)/$(SPPLIB) -compatibility_version $(SPPVERSION) -current_version $(SPPVERSION)
     14+else
     15+SHFLAGS+=-Wl,-soname,$(SPPLIB).0
     16+endif
     17+
     18 .SUFFIXES: .c .o
     19 
     20 # .PHONY: all clean
     21@@ -25,10 +31,10 @@
     22 all:    $(SWSLIB) $(PPLIB) $(SPPLIB)
     23 
     24 clean:
     25-       rm -f *.o *.a *~ *.so $(PPLIB) $(SPPLIB)
     26+       rm -f *.o *.a *~ *$(SLIBSUF) $(PPLIB) $(SPPLIB)
     27 
     28 distclean:
     29-       rm -f Makefile.bak *.o *.a *~ *.so .depend
     30+       rm -f Makefile.bak *.o *.a *~ *$(SLIBSUF) .depend
     31 
     32 dep:    depend
     33 
     34@@ -37,11 +43,10 @@
     35 
     36 ifeq ($(SHARED_PP),yes)
     37 postprocess_pic.o: postprocess.c
     38-       $(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
     39+       $(CC) -c $(SHCFLAGS) -fomit-frame-pointer $(PIC) -I.. -I../.. -o $@ $<
     40 
     41 $(SPPLIB): $(SPPOBJS)
     42-       $(CC) -shared -Wl,-soname,$(SPPLIB).0 \
     43-       -o $(SPPLIB) $(SPPOBJS)
     44+       $(CC) $(SHFLAGS) -o $(SPPLIB) $(SPPOBJS)
     45 endif
     46 
     47 $(PPLIB): $(PPOBJS)
     48@@ -52,16 +57,21 @@
     49 install: all
     50 ifeq ($(SHARED_PP),yes)
     51 ifeq ($(CONFIG_WIN32),yes)
     52-       install $(INSTALLSTRIP) -m 755 $(SPPLIB) "$(prefix)"
     53+       install $(INSTALLSTRIP) -m 755 $(SPPLIB) "$(DESTDIR)$(prefix)"
     54 else
     55-       install -d $(libdir)
     56-       install $(INSTALLSTRIP) -m 755 $(SPPLIB) $(libdir)/$(SPPLIB).$(SPPVERSION)
     57-       ln -sf $(SPPLIB).$(SPPVERSION) $(libdir)/$(SPPLIB)
     58+       install -d $(DESTDIR)$(libdir)
     59+ifeq ($(CONFIG_DARWIN),yes)
     60+       install $(INSTALLSTRIP) -m 755 $(SPPLIB) $(DESTDIR)$(libdir)/$(SPPLIB:$(SLIBSUF)=.$(SPPVERSION)$(SLIBSUF))
     61+       ln -sf $(SPPLIB:$(SLIBSUF)=.$(SPPVERSION)$(SLIBSUF)) $(DESTDIR)$(libdir)/$(SPPLIB)
     62+else
     63+       install $(INSTALLSTRIP) -m 755 $(SPPLIB) $(DESTDIR)$(libdir)/$(SPPLIB).$(SPPVERSION)
     64+       ln -sf $(SPPLIB).$(SPPVERSION) $(DESTDIR)$(libdir)/$(SPPLIB)
     65        ldconfig || true
     66 endif
     67 endif
     68-       mkdir -p $(prefix)/include/postproc
     69-       install -m 644 postprocess.h $(prefix)/include/postproc/postprocess.h
     70+endif
     71+       mkdir -p $(DESTDIR)$(prefix)/include/postproc
     72+       install -m 644 postprocess.h $(DESTDIR)$(prefix)/include/postproc/postprocess.h
     73 
     74 
     75 #
  • files/patch-libavformat-Makefile

    diff -Naur --exclude=CVS /usr/src/darwinports/dports/multimedia/ffmpeg/files/patch-libavformat-Makefile ./files/patch-libavformat-Makefile
    old new  
     1Index: libavformat/Makefile
     2===================================================================
     3RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/Makefile,v
     4retrieving revision 1.86
     5diff -a -u -u -r1.86 Makefile
     6--- libavformat/Makefile        9 Apr 2005 15:32:58 -0000       1.86
     7+++ libavformat/Makefile        15 Apr 2005 18:49:37 -0000
     8@@ -67,6 +67,7 @@
     9 
     10 ifeq ($(CONFIG_LIBOGG),yes)
     11 OBJS+= ogg.o
     12+EXTRALIBS += -logg
     13 endif
     14 
     15 ifeq ($(TARGET_ARCH_SPARC64),yes)
     16@@ -77,7 +78,7 @@
     17 ifeq ($(BUILD_SHARED),yes)
     18 SLIB= $(SLIBPREF)avformat$(SLIBSUF)
     19 
     20-AVCLIBS+=-lavcodec -L../libavcodec
     21+AVCLIBS+=-lavcodec -L../libavcodec/libpostproc -L../libavcodec
     22 ifeq ($(CONFIG_MP3LAME),yes)
     23 AVCLIBS+=-lmp3lame
     24 endif
     25@@ -92,12 +93,16 @@
     26        $(AR) rc $@ $(OBJS) $(PPOBJS)
     27        $(RANLIB) $@
     28 
     29+ifeq ($(CONFIG_DARWIN), yes)
     30+SHFLAGS+=-install_name $(libdir)/$(SLIB)
     31+endif
     32+
     33 $(SLIB): $(OBJS)
     34 ifeq ($(CONFIG_WIN32),yes)
     35        $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
     36        -lib /machine:i386 /def:$(@:.dll=.def)
     37 else
     38-       $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
     39+       $(CC) $(SHFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS) $(LDFLAGS)
     40 endif
     41 
     42 depend: $(SRCS)
     43@@ -106,26 +111,30 @@
     44 ifeq ($(BUILD_SHARED),yes)
     45 install: all install-headers
     46 ifeq ($(CONFIG_WIN32),yes)
     47-       install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
     48+       install $(INSTALLSTRIP) -m 755 $(SLIB) "$(DESTDIR)$(prefix)"
     49 else
     50-       install -d $(libdir)
     51-       install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavformat-$(VERSION).so
     52-       ln -sf libavformat-$(VERSION).so $(libdir)/libavformat.so
     53+       install -d $(DESTDIR)$(libdir)
     54+ifeq ($(CONFIG_DARWIN),yes)
     55+       install $(INSTALLSTRIP) -m 755 $(SLIB) $(DESTDIR)$(libdir)/
     56+else
     57+       install $(INSTALLSTRIP) -m 755 $(SLIB) $(DESTDIR)$(libdir)/libavformat-$.(VERSION).so
     58+       ln -sf libavformat-$(VERSION).so $(DESTDIR)$(libdir)/libavformat.so
     59        ldconfig || true
     60 endif
     61+endif
     62 else
     63 install:
     64 endif
     65 
     66 installlib: all install-headers
     67-       install -m 644 $(LIB) "$(libdir)"
     68+       install -m 644 $(LIB) "$(DESTDIR)$(libdir)"
     69 
     70 install-headers:
     71-       mkdir -p "$(prefix)/include/ffmpeg"
     72+       mkdir -p "$(DESTDIR)$(prefix)/include/ffmpeg"
     73        install -m 644 $(SRC_PATH)/libavformat/avformat.h $(SRC_PATH)/libavformat/avio.h \
     74                 $(SRC_PATH)/libavformat/rtp.h $(SRC_PATH)/libavformat/rtsp.h \
     75                 $(SRC_PATH)/libavformat/rtspcodes.h \
     76-                "$(prefix)/include/ffmpeg"
     77+                "$(DESTDIR)$(prefix)/include/ffmpeg"
     78 
     79 %.o: %.c
     80        $(CC) $(CFLAGS) -c -o $@ $<