From f2622a993799a3645072523e45500812025c2f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Catri=C3=A1n=20C?= Date: Thu, 28 Dec 2006 15:27:54 +0000 Subject: [PATCH] Libtool related changes based on existing patches to multimedia/ffmpeg. --- ffmpeg-snapshot/patches/patch-aa | 106 +++++++++++++++++++++++++------ ffmpeg-snapshot/patches/patch-ab | 62 ++++++++++++++++++ ffmpeg-snapshot/patches/patch-ac | 12 ++++ ffmpeg-snapshot/patches/patch-ad | 11 ++++ ffmpeg-snapshot/patches/patch-ae | 11 ++++ 5 files changed, 181 insertions(+), 21 deletions(-) create mode 100644 ffmpeg-snapshot/patches/patch-ab create mode 100644 ffmpeg-snapshot/patches/patch-ac create mode 100644 ffmpeg-snapshot/patches/patch-ad create mode 100644 ffmpeg-snapshot/patches/patch-ae diff --git a/ffmpeg-snapshot/patches/patch-aa b/ffmpeg-snapshot/patches/patch-aa index a0ece0d134..566ac14a5c 100644 --- a/ffmpeg-snapshot/patches/patch-aa +++ b/ffmpeg-snapshot/patches/patch-aa @@ -1,21 +1,85 @@ -$NetBSD: patch-aa,v 1.1 2006/12/23 13:59:22 cetrox Exp $ - ---- configure.orig 2006-12-18 13:43:53.000000000 +0000 -+++ configure -@@ -732,6 +732,16 @@ audio_oss="yes" - dv1394="no" - add_cflags "-pthread" - ;; -+DragonFly) -+v4l="no" -+bktr="yes" -+audio_oss="yes" -+dv1394="no" -+make="gmake" -+CFLAGS="-pthread" -+LDFLAGS="$LDFLAGS -export-dynamic -pthread" -+LIBSUF=".a" -+;; - BSD/OS) - video4linux="no" - video4linux2="no" +--- Makefile.orig 2006-12-07 16:25:04.000000000 -0300 ++++ Makefile 2006-12-28 12:05:30.000000000 -0300 +@@ -52,14 +52,14 @@ + OBJS = ffmpeg.o ffserver.o cmdutils.o ffplay.o + SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) + LDFLAGS := -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil $(LDFLAGS) +-EXTRALIBS := -lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS) ++EXTRALIBS := libavformat/libavformat.la libavcodec/libavcodec.la libavutil/libavutil.la $(EXTRALIBS) + + ifeq ($(CONFIG_SWSCALER),yes) + LDFLAGS+=-L./libswscale +-EXTRALIBS+=-lswscale$(BUILDSUF) ++EXTRALIBS+=libswscale/libswscale.la + endif + +-all: lib $(PROGS_G) $(PROGS) $(VHOOK) $(DOC) ++all: lib $(PROGS) $(VHOOK) $(DOC) + + lib: + $(MAKE) -C libavutil all +@@ -72,14 +72,17 @@ + $(MAKE) -C libswscale all + endif + +-ffmpeg_g$(EXESUF): ffmpeg.o cmdutils.o .libs +- $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o $(EXTRALIBS) +- +-ffserver$(EXESUF): ffserver.o .libs +- $(CC) $(LDFLAGS) $(FFSERVERLDFLAGS) -o $@ ffserver.o $(EXTRALIBS) +- +-ffplay_g$(EXESUF): ffplay.o cmdutils.o .libs +- $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o $(EXTRALIBS) $(SDL_LIBS) ++ffmpeg$(EXESUF): ffmpeg.o cmdutils.o .ffmpeglibs ++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ ffmpeg.o cmdutils.o \ ++ $(EXTRALIBS) ++ ++ffserver$(EXESUF): ffserver.o .ffmpeglibs ++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(FFSERVERLDFLAGS) -o $@ \ ++ ffserver.o $(EXTRALIBS) ++ ++ffplay$(EXESUF): ffplay.o cmdutils.o .ffmpeglibs ++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ ffplay.o cmdutils.o \ ++ $(EXTRALIBS) $(SDL_LIBS) + + %$(EXESUF): %_g$(EXESUF) + cp -p $< $@ +@@ -88,8 +91,9 @@ + version.h: + $(SRC_PATH)/version.sh $(SRC_PATH) + +-output_example$(EXESUF): output_example.o .libs +- $(CC) $(LDFLAGS) -o $@ output_example.o $(EXTRALIBS) ++output_example$(EXESUF): output_example.o .ffmpeglibs ++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ output_example.o \ ++ $(EXTRALIBS) + + qt-faststart$(EXESUF): qt-faststart.c + $(CC) $(CFLAGS) $< -o $@ +@@ -105,7 +109,7 @@ + %.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + +-videohook: .libs ++videohook: .ffmpeglibs + $(MAKE) -C vhook all + + documentation: +@@ -119,7 +123,7 @@ + install-progs: $(PROGS) + endif + install -d "$(bindir)" +- install -c $(INSTALLSTRIP) -m 755 $(PROGS) "$(bindir)" ++ $(LIBTOOL) --mode=install $(BSD_INSTALL_PROGRAM) $(PROGS) "$(bindir)" + + # create the window installer + wininstaller: all install +@@ -200,7 +204,7 @@ + + $(DEP_LIBS): lib + +-.libs: $(DEP_LIBS) ++.ffmpeglibs: lib + touch $@ + + clean: diff --git a/ffmpeg-snapshot/patches/patch-ab b/ffmpeg-snapshot/patches/patch-ab new file mode 100644 index 0000000000..b627161879 --- /dev/null +++ b/ffmpeg-snapshot/patches/patch-ab @@ -0,0 +1,62 @@ +--- common.mak.orig 2006-12-22 02:29:14.000000000 -0300 ++++ common.mak 2006-12-28 12:06:59.000000000 -0300 +@@ -17,8 +17,9 @@ + + $(LIB): $(STATIC_OBJS) + rm -f $@ +- $(AR) rc $@ $^ $(EXTRAOBJS) +- $(RANLIB) $@ ++ $(LIBTOOL) --mode=link $(CC) $(SHFLAGS) $(LDFLAGS) -o $(LIB:.a=.la) \ ++ $(^:.o=.lo) -avoid-version -rpath $(prefix)/lib \ ++ $(EXTRALIBS) + + $(SLIBNAME): $(SLIBNAME_WITH_MAJOR) + ln -sf $^ $@ +@@ -28,20 +29,17 @@ + $(SLIB_EXTRA_CMD) + + %.o: %.c +- $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< ++ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< + + %.o: %.S +- $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< ++ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< + + # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings + %.o: %.cpp +- g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< ++ $(LIBTOOL) --mode=compile $(CXX) $(subst -Wall,,$(CFLAGS)) -c -o $@ $< + + %: %.o $(LIB) +- $(CC) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) +- +-depend dep: $(SRCS) +- $(CC) -MM $(CFLAGS) $^ 1>.depend ++ $(LIBTOOL) --mode=compile $(CC) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) + + clean:: + rm -f *.o *.d *~ *.a *.lib *.so *.so.* *.dylib *.dll \ +@@ -51,16 +49,20 @@ + rm -f .depend + + ifeq ($(BUILD_SHARED),yes) +-INSTLIBTARGETS += install-lib-shared ++INSTLIBTARGETS += install-libt-shared + endif + ifeq ($(BUILD_STATIC),yes) +-INSTLIBTARGETS += install-lib-static ++INSTLIBTARGETS += install-libt-static + endif + + install: install-libs install-headers + + install-libs: $(INSTLIBTARGETS) + ++install-libt-static: $(LIB) ++ $(LIBTOOL) --mode=install $(BSD_INSTALL_DATA) $(LIB:.a=.la) \ ++ $(prefix)/lib ++ + install-lib-shared: $(SLIBNAME) + install -d "$(shlibdir)" + install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ diff --git a/ffmpeg-snapshot/patches/patch-ac b/ffmpeg-snapshot/patches/patch-ac new file mode 100644 index 0000000000..6fcdcd23d9 --- /dev/null +++ b/ffmpeg-snapshot/patches/patch-ac @@ -0,0 +1,12 @@ +--- libavformat/Makefile.orig 2006-12-28 09:35:20.000000000 -0300 ++++ libavformat/Makefile 2006-12-28 09:39:06.000000000 -0300 +@@ -158,8 +158,7 @@ + OBJS-$(CONFIG_AUDIO_MUXER) += audio.o + endif + +-EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) \ +- -lavcodec$(BUILDSUF) -L$(BUILD_ROOT)/libavcodec $(EXTRALIBS) ++EXTRALIBS := ../libavutil/libavutil.la ../libavcodec/libavcodec.la $(EXTRALIBS) + + ifeq ($(CONFIG_AUDIO_BEOS),yes) + CPPOBJS+= beosaudio.o diff --git a/ffmpeg-snapshot/patches/patch-ad b/ffmpeg-snapshot/patches/patch-ad new file mode 100644 index 0000000000..eb80797567 --- /dev/null +++ b/ffmpeg-snapshot/patches/patch-ad @@ -0,0 +1,11 @@ +--- libavcodec/Makefile.orig 2006-12-28 09:45:48.000000000 -0300 ++++ libavcodec/Makefile 2006-12-28 09:46:13.000000000 -0300 +@@ -406,7 +406,7 @@ + OBJS += $(OBJS-yes) + ASM_OBJS += $(ASM_OBJS-yes) + +-EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS) ++EXTRALIBS := ../libavutil/libavutil.la $(EXTRALIBS) + + NAME=avcodec + ifeq ($(BUILD_SHARED),yes) diff --git a/ffmpeg-snapshot/patches/patch-ae b/ffmpeg-snapshot/patches/patch-ae new file mode 100644 index 0000000000..ebcb8719fd --- /dev/null +++ b/ffmpeg-snapshot/patches/patch-ae @@ -0,0 +1,11 @@ +--- libswscale/Makefile.orig 2006-12-28 09:47:56.000000000 -0300 ++++ libswscale/Makefile 2006-12-28 09:48:17.000000000 -0300 +@@ -7,7 +7,7 @@ + LIBMAJOR=$(SWSMAJOR) + endif + +-EXTRALIBS := -L$(BUILD_ROOT)/libavutil -lavutil$(BUILDSUF) $(EXTRALIBS) ++EXTRALIBS := ../libavutil/libavutil.la $(EXTRALIBS) + + OBJS= swscale.o rgb2rgb.o + ifeq ($(TARGET_ALTIVEC),yes)