ALT Linux repos
S: | 6.0-alt2.1 |
D: | 0.5.0-alt0.14329.1 |
5.0: | 15151-alt5.M50.1 |
4.1: | 11656-alt1.M41.1 |
4.0: | 10629-alt3.M40.0 |
3.0: | 0.4.9-alt2cvs20050406 |
Group :: Video
RPM: ffmpeg
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: ffmpeg-20050313-alt-config.patch
Download
Download
diff -ruN FFMpeg-20050406.orig/ffmpeg-config.in FFMpeg-20050406/ffmpeg-config.in
--- FFMpeg-20050406.orig/ffmpeg-config.in 1970-01-01 03:00:00 +0300
+++ FFMpeg-20050406/ffmpeg-config.in 2005-04-13 16:41:42 +0400
@@ -0,0 +1,104 @@
+#!/bin/sh
+
+# ffmpeg-config
+
+prefix="@PREFIX@"
+version="@VERSION@"
+
+include_dir="@INCLUDEDIR@"
+lib_dir="@LIBDIR@"
+
+link_libs=""
+
+usage()
+{
+ cat <<EOF
+Usage: ffmpeg-config [OPTIONS]
+Options:
+ [--prefix]
+ [--cflags]
+ [--libs [avcodec] [avformat] [postproc]]
+ [--plugin-libs [avcodec] [avformat] [postproc]]
+ [--version]
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+while test $# -gt 0; do
+ case $1 in
+ --prefix)
+ echo_prefix=yes
+ ;;
+
+ --cflags)
+ echo_cflags=yes
+ ;;
+
+ --libs)
+ echo_libs=yes
+ ;;
+
+ --plugin-libs)
+ echo_plugin_libs=yes
+ ;;
+
+ --version)
+ echo_version=yes
+ ;;
+
+ avcodec|avformat|postproc)
+ if test "$echo_libs" = "yes"; then
+ link_libs="$link_libs -l$1"
+ if test "$1" != "avcodec"; then
+ link_libs="$link_libs -lavcodec"
+ fi
+ elif test "$echo_plugin_libs" = "yes"; then
+ link_plugin_libs="$link_plugin_libs -l${1}_pic"
+ if test "$1" != "avcodec"; then
+ link_plugin_libs="$link_plugin_libs -lavcodec_pic"
+ fi
+ else
+ usage 1 1>&2
+ fi
+ ;;
+
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+if test "$echo_prefix" = "yes"; then
+ echo $prefix
+fi
+
+cflags="-I$include_dir"
+link_libs="$link_libs @EXTRALIBS@"
+link_plugin_libs="$link_plugin_libs @EXTRALIBS@"
+
+if test "$lib_dir" != "/usr/lib"; then
+ libs="-L$lib_dir"
+else
+ libs=""
+fi
+
+if test "$echo_cflags" = "yes"; then
+ echo $cflags
+fi
+
+if test "$echo_libs" = "yes"; then
+ echo $libs $link_libs
+fi
+
+if test "$echo_plugin_libs" = "yes"; then
+ echo $libs $link_plugin_libs
+fi
+
+if test "$echo_version" = "yes"; then
+ echo $version
+fi
diff -ruN FFMpeg-20050406.orig/Makefile FFMpeg-20050406/Makefile
--- FFMpeg-20050406.orig/Makefile 2005-04-13 17:35:46 +0400
+++ FFMpeg-20050406/Makefile 2005-04-13 17:37:37 +0400
@@ -93,6 +93,8 @@
SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
FFLIBS = -L./libavformat -lavformat -L./libavcodec -lavcodec
+VERSION=$(shell grep "\#define FFMPEG_VERSION " libavcodec/avcodec.h | cut -d "\"" -f 2 )
+
all: lib $(PROG) $(PROGTEST) $(VHOOK) $(QTFASTSTART) $(DOC)
lib:
@@ -137,6 +139,13 @@
documentation:
$(MAKE) -C doc all
+ffmpeg-config: ffmpeg-config.in
+ sed -e 's,@PREFIX@,$(prefix),g' \
+ -e 's,@LIBDIR@,$(libdir),g' \
+ -e 's,@INCLUDEDIR@,$(includedir),g' \
+ -e 's,@VERSION@,$(VERSION),g' \
+ -e 's,@EXTRALIBS@,$(EXTRALIBS),g' $< > $@
+
.PHONY: install
install: all install-man $(INSTALLVHOOK)
@@ -205,8 +214,7 @@
$(MAKE) -C tests $@
# tar release (use 'make -k tar' on a checkouted tree)
-FILE=ffmpeg-$(shell grep "\#define FFMPEG_VERSION " libavcodec/avcodec.h | \
- cut -d "\"" -f 2 )
+FILE=ffmpeg-$(VERSION)
tar:
rm -rf /tmp/$(FILE)