2006-10-30 18:32:55 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -z "$1" -o $# -ne 1 ]; then
|
|
|
|
echo "Usage: $0 <xine-version>"
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
version=$1
|
2011-11-20 00:40:14 +00:00
|
|
|
tarball="xine-lib-$version.tar.xz"
|
2006-10-30 18:32:55 +00:00
|
|
|
dir="xine-lib-$version"
|
2011-11-20 00:40:14 +00:00
|
|
|
modtarball="xine-lib-$version-pruned.tar.xz"
|
2006-10-30 18:32:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
if [ ! -f $tarball ]; then
|
|
|
|
echo "Can't find $tarball !"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Uncompressing $tarball..."
|
|
|
|
rm -rf $dir
|
2011-11-20 00:40:14 +00:00
|
|
|
tar -xJf $tarball
|
2006-10-30 18:32:55 +00:00
|
|
|
cd $dir
|
|
|
|
|
2008-03-19 19:51:59 +00:00
|
|
|
rmpluglib()
|
|
|
|
{
|
|
|
|
echo "removing src/$1/$2..."
|
|
|
|
rm -rf src/$1/$2
|
|
|
|
sed -i -e "s/SUBDIRS = \(.*\)$2\(.*\)/SUBDIRS = \1\2/g" src/$1/Makefile.am
|
|
|
|
sed -i -e "/^src\/$1\/$2/d" configure.ac
|
|
|
|
}
|
|
|
|
|
2006-10-30 18:32:55 +00:00
|
|
|
# Main libraries
|
2008-01-26 23:31:13 +00:00
|
|
|
for remove in libfaad libffmpeg libmad libmpeg2 dxr3 liba52 libdts; do
|
2006-10-30 18:32:55 +00:00
|
|
|
echo "removing src/$remove..."
|
|
|
|
rm -rf src/$remove
|
|
|
|
sed -i -e "/$remove/d" src/Makefile.am
|
|
|
|
sed -i -e "/^src\/$remove/d" configure.ac
|
|
|
|
done
|
|
|
|
# Input plugin libraries
|
2008-01-26 23:31:13 +00:00
|
|
|
for remove in vcd; do
|
2008-03-19 19:51:59 +00:00
|
|
|
rmpluglib input vcd
|
|
|
|
done
|
|
|
|
for remove in ffmpeg; do
|
|
|
|
rmpluglib combined ffmpeg
|
2006-10-30 18:32:55 +00:00
|
|
|
done
|
|
|
|
# Input plugins
|
|
|
|
for p in dvd vcd mms; do
|
|
|
|
echo "removing $p input plugin..."
|
|
|
|
# Remove sources
|
|
|
|
for sourcefile in `awk '/^xineplug_inp_'$p'_la_SOURCES/ { $1=""; $2=""; print $0}' src/input/Makefile.am`; do
|
|
|
|
if [ "`grep -c $sourcefile src/input/Makefile.am`" -le 1 ]; then # if this file is only used for this plugin
|
|
|
|
rm -f src/input/$sourcefile
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
# Remove from Makefile
|
|
|
|
sed -i -e "/xineplug_inp_$p/d" src/input/Makefile.am
|
|
|
|
done
|
|
|
|
# Demuxers
|
2009-01-07 19:18:46 +00:00
|
|
|
# These are ok now ( http://bugzilla.redhat.com/213597 )
|
|
|
|
#for p in mpeg mpeg_block mpeg_ts mpeg_elem mpeg_pes yuv4mpeg2; do
|
|
|
|
# echo "removing $p demuxer..."
|
|
|
|
# [ -f src/demuxers/demux_$p.c ] && rm -f src/demuxers/demux_$p.c
|
|
|
|
# sed -i -e "/xineplug_dmx_$p/d" src/demuxers/Makefile.am
|
|
|
|
#done
|
2007-04-11 21:36:29 +00:00
|
|
|
# Postprocessors
|
2006-10-30 18:32:55 +00:00
|
|
|
echo "removing planar and deinterlace postprocessors..."
|
2007-04-11 21:36:29 +00:00
|
|
|
sed -i -e 's/deinterlace //g' src/post/Makefile.am # see comments in speedy.c
|
|
|
|
sed -i -e 's/planar //g' src/post/Makefile.am # requires libpostproc
|
|
|
|
sed -i -e '/post\/\(deinterlace\|planar\)/d' configure.ac
|
|
|
|
rm -rf src/post/{deinterlace,planar}
|
|
|
|
# NSF decoder
|
|
|
|
echo "removing NSF decoder..."
|
|
|
|
rm -rf src/libxineadec/{nosefart,nsf.c}
|
|
|
|
sed -i -e '/^xineplug_decode_nsf_la/,/^\s*$/d' \
|
|
|
|
-e /xineplug_decode_nsf/d \
|
|
|
|
-e 's/ nosefart//' \
|
|
|
|
src/libxineadec/Makefile.am
|
2008-01-06 21:51:14 +00:00
|
|
|
sed -i -e '/nosefart\/Makefile/d' configure.ac
|
2006-10-30 18:32:55 +00:00
|
|
|
|
|
|
|
# All clean !
|
|
|
|
|
|
|
|
cd ..
|
2006-12-08 07:31:46 +00:00
|
|
|
echo "Generating $modtarball..."
|
2011-11-20 00:40:14 +00:00
|
|
|
tar -cJf $modtarball $dir
|
2006-10-30 18:32:55 +00:00
|
|
|
rm -rf $dir
|