View previous topic :: View next topic |
Author |
Message |
nivek98 n00b
Joined: 27 Jul 2004 Posts: 37
|
Posted: Mon Jan 02, 2006 4:32 am Post subject: ffmpeg cvs ebuild |
|
|
Does anyone know of an ffmpeg cvs ebuild other than the one in fluidportage? It doesn't work, and doesn't appear easy to fix(it looks like ffmpeg is not using autogen.sh?).
Nivek98 |
|
Back to top |
|
|
mark_alec Bodhisattva
Joined: 11 Sep 2004 Posts: 6066 Location: Melbourne, Australia
|
Posted: Mon Jan 02, 2006 4:36 am Post subject: |
|
|
Moved from Multimedia to Unsupported Software. _________________ www.gentoo.org.au || #gentoo-au |
|
Back to top |
|
|
CoffeeBuzz Apprentice
Joined: 15 Jun 2005 Posts: 269 Location: Canada Eh.
|
Posted: Mon Jan 02, 2006 3:25 pm Post subject: |
|
|
Here's ya go (based on fluidportage ebuild ... your milage may vary). First part is the ebuild, second part is the patch (ffmpeg-cvs-config.patch)
# Distributed under the terms of the GNU General Public License v2
inherit fluidcvs eutils flag-o-matic multilib toolchain-funcs
ECVS_SERVER="mplayerhq.hu:/cvsroot/ffmpeg"
ECVS_MODULE="ffmpeg"
ECVS_TOP_DIR="${DISTDIR}/cvs-src/${PN}"
MY_P=${P/_/-}
S=${WORKDIR}/${ECVS_MODULE}
S_BASE=${WORKDIR}/${ECVS_MODULE}
S_STATIC=${S_BASE}-static
S_SHARED=${S_BASE}-shared
DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec. (source from CVS)"
HOMEPAGE="http://ffmpeg.sourceforge.net/"
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="-*"
IUSE="aac altivec debug doc ieee1394 a52 encode imlib mmx ogg vorbis oss test theora threads truetype v4l xvid dts network zlib sdl elibc_FreeBSD"
DEPEND="imlib? ( media-libs/imlib2 )
truetype? ( >=media-libs/freetype-2 )
sdl? ( >=media-libs/libsdl-1.2.1 )
doc? ( app-text/texi2html )
encode? ( media-sound/lame )
ogg? ( media-libs/libogg )
vorbis? ( media-libs/libvorbis )
theora? ( media-libs/libtheora )
aac? ( media-libs/faad2 media-libs/faac )
a52? ( >=media-libs/a52dec-0.7.4-r4 )
xvid? ( >=media-libs/xvid-1.0 )
zlib? ( sys-libs/zlib )
dts? ( media-libs/libdts )
ieee1394? ( =media-libs/libdc1394-1*
sys-libs/libraw1394 )
test? ( net-misc/wget )"
src_unpack() {
fluidcvs_src_unpack
cd ${S}
#Append -fomit-frame-pointer to avoid some common issues
use debug || append-flags "-fomit-frame-pointer"
# for some reason it tries to #include <X11/Xlib.h>, but doesn't use it
sed -i s:\#define\ HAVE_X11:\#define\ HAVE_LINUX: ffplay.c
# Fix building with gcc4
#epatch ${FILESDIR}/${P}-osx.patch
#ffmpeg doesn'g use libtool, so the condition for PIC code
#is __PIC__, not PIC.
sed -i -e 's/#\(\(.*def *\)\|\(.*defined *\)\|\(.*defined(*\)\)PIC/#\1__PIC__/' \
libavcodec/i386/dsputil_mmx{.c,_rnd.h,_avg.h} \
libavcodec/msmpeg4.c \
libavutil/common.h \
|| die "sed failed (__PIC__)"
#autogen
#./autogen.sh
epatch ${FILESDIR}/${PN}-cvs-config.patch
# epatch ${FILESDIR}/${PN}-libdir-pic.patch
# epatch ${FILESDIR}/${PN}-a52.patch
# epatch ${FILESDIR}/${PN}-missing_links.patch
# To make sure the ffserver test will work
sed -i -e "s:-e debug=off::" tests/server-regression.sh
cd ${S}
cp -R ${S_BASE} ${S_STATIC}
mv ${S_BASE} ${S_SHARED}
#epatch ${FILESDIR}/${PN}-fix-makefiles.patch
}
src_compile() {
#Note; library makefiles don't propogate flags from config.mak so
#use specified CFLAGS are only used in executables
filter-flags -fforce-addr -momit-leaf-frame-pointer
local myconf=""
#disable mmx accelerated code if not requirested, or if PIC is required
# as the provided asm decidedly isn't PIC.
if ( ! has_pic && use mmx ) || use amd64; then
myconf="${myconf} --enable-mmx"
else
myconf="${myconf} --disable-mmx"
fi
if use elibc_FreeBSD; then
myconf="${myconf} --enable-memalign-hack"
fi
myconf="${myconf}
$(use_enable altivec) \
$(use_enable debug) \
$(use_enable encode mp3lame) \
$(use_enable a52) --disable-a52bin \
$(use_enable oss audio-oss) \
$(use_enable v4l) \
$(use_enable ieee1394 dv1394) \
$(use_enable threads pthreads) \
$(use_enable xvid) \
$(use_enable ogg libogg) \
$(use_enable vorbis) \
$(use_enable theora) \
$(use_enable dts) \
$(use_enable network) \
$(use_enable zlib) \
$(use_enable sdl ffplay) \
$(use_enable aac faad) --disable-faadbin \
--enable-gpl \
--enable-pp \
--disable-opts"
cd ${S_STATIC}
./configure --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --disable-shared-pp --disable-shared ${myconf} || die "Configure failed"
emake CC="$(tc-getCC)" || die "static failed"
cd ${S_SHARED}
./configure --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib --enable-shared-pp --enable-shared ${myconf} || die "Configure failed"
emake CC="$(tc-getCC)" || die "shared failed"
}
src_install() {
for d in ${S_STATIC} ${S_SHARED}; do
cd ${d}
use doc && make documentation
make DESTDIR=${D} \
prefix=${D}/usr \
libdir=${D}/usr/$(get_libdir) \
mandir=${D}/usr/share/man \
infodir=${D}/usr/share/info \
bindir=${D}/usr/bin \
install installlib || die "Install Failed"
done
cd ${S_SHARED}
dodoc ChangeLog README INSTALL
dodoc doc/*
cd ${S_STATIC}/libavcodec/libpostproc
make prefix=${D}/usr libdir=${D}/usr/$(get_libdir) \
install || die "Failed to install libpostproc.a!"
cd ${S_SHARED}/libavcodec/libpostproc
make prefix=${D}/usr libdir=${D}/usr/$(get_libdir) \
SHARED_PP="yes" \
install || die "Failed to install libpostproc.so!"
# Some stuff like transcode can use this one.
dolib ${S_STATIC}/libavcodec/libpostproc/libpostproc.a
preplib /usr
}
# Never die for now...
src_test() {
for d in ${S_STATIC} ${S_SHARED}; do
cd ${d}
make test || ewarn "Some test failed"
done
}
and the patch, ffmpeg-cvs-config.patch, put in the overlay/media/videos/ffmepg/files dir
--- ffmpeg/configure.orig 2006-01-02 10:19:44.000000000 -0500
+++ ffmpeg/configure 2006-01-02 10:19:52.000000000 -0500
@@ -464,18 +464,26 @@
;;
--disable-mmx) mmx="no"
;;
+ --enable-mmx) mmx="yes"
+ ;;
--disable-iwmmxt) iwmmxt="no"
;;
--disable-altivec) altivec="no"
;;
+ --enable-altivec) altivec="yes"
+ ;;
--enable-gprof) gprof="yes"
;;
--disable-v4l) v4l="no"
;;
+ --enable-v4l) v4l="yes"
+ ;;
--disable-bktr) bktr="no"
;;
--disable-audio-oss) audio_oss="no"
;;
+ --enable-audio-oss) audio_oss="yes"
+ ;;
--disable-audio-beos) audio_beos="no"
extralibs="$extralibs -lbe -lmedia"
;;
@@ -483,48 +491,74 @@
;;
--disable-network) network="no"; ffserver="no"
;;
+ --enable-network) network="yes"; ffserver="yes"
+ ;;
--disable-zlib) zlib="no"
;;
+ --enable-zlib) zlib="yes"
+ ;;
--enable-a52) a52="yes"
;;
+ --disable-a52) a52="yes"
+ ;;
--enable-a52bin) a52bin="yes"
;;
+ --disable-a52bin) a52bin="no"
+ ;;
--enable-dts) dts="yes"
extralibs="$extralibs -ldts"
;;
+ --disable-dts) dts="no"
+ ;;
--enable-pp) pp="yes"
;;
--enable-shared-pp) shared_pp="yes"
;;
+ --disable-shared-pp) shared_pp="no"
+ ;;
--enable-libgsm) libgsm="yes"
extralibs="$extralibs -lgsm"
;;
--enable-mp3lame) mp3lame="yes"
extralibs="$extralibs -lmp3lame"
;;
+ --disable-mp3lame) mp3lame="no"
+ ;;
--enable-libogg) libogg="yes"
extralibs="$extralibs -logg"
pkg_requires="$pkg_requires ogg >= 1.1"
;;
+ --disable-libogg) libogg="no"
+ ;;
--enable-vorbis) vorbis="yes"
extralibs="$extralibs -lvorbis -lvorbisenc"
pkg_requires="$pkg_requires vorbis vorbisenc"
;;
+ --disable-vorbis) vorbis="no"
+ ;;
--enable-theora) theora="yes"
extralibs="$extralibs -ltheora"
pkg_requires="$pkg_requires theora"
;;
+ --disable-theora) theora="no"
+ ;;
--enable-faad) faad="yes"
extralibs="$extralibs -lfaad"
;;
+ --disable-faad) faad="no"
+ ;;
--enable-faadbin) faadbin="yes"
;;
+ --disable-faadbin) faadbin="yes"
+ ;;
--enable-faac) faac="yes"
extralibs="$extralibs -lfaac"
;;
--enable-xvid) xvid="yes"
extralibs="$extralibs -lxvidcore"
;;
+ --disable-xvid) xvid="no"
+ ;;
--enable-x264) x264="yes"
extralibs="$extralibs -lx264"
;;
@@ -532,6 +566,8 @@
extralibs="$extralibs -ldc1394_control -lraw1394"
pkg_requires="$pkg_requires libraw1394"
;;
+ --disable-dc1394) dc1394="yes"
+ ;;
--disable-vhook) vhook="no"
;;
--disable-simple_idct) simpleidct="no"
@@ -540,16 +576,24 @@
;;
--enable-shared) lshared="yes"
;;
+ --disable-shared) lshared="no"
+ ;;
--disable-debug) debug="no"
;;
+ --enable-debug) debug="yes"
+ ;;
--disable-opts) optimize="no"
;;
+ --enable-opts) optimize="no"
+ ;;
--disable-mpegaudio-hp) mpegaudio_hp="no"
;;
--disable-ffserver) ffserver="no"
;;
--disable-ffplay) ffplay="no"
;;
+ --enable-ffplay) ffplay="yes"
+ ;;
--enable-small) optimize="small"
;;
--enable-amr_nb) amr_nb="yes"
@@ -564,6 +608,8 @@
;;
--enable-pthreads) pthreads="yes"
;;
+ --disable-pthreads) pthreads="no"
+ ;;
--enable-gpl) gpl="yes"
;;
--enable-memalign-hack) memalignhack="yes" |
|
Back to top |
|
|
nivek98 n00b
Joined: 27 Jul 2004 Posts: 37
|
Posted: Tue Jan 03, 2006 3:48 am Post subject: |
|
|
Ah, a configure patch. I still question why they stopped using the Autotools for the build process, but this should do.
Just started the emerge, configure went successfully. Hopefully no build issues.
Thanks |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|