summaryrefslogtreecommitdiffstats
path: root/vlc
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2007-04-09 20:44:24 +0000
committer Eric Hameleers <alien@slackware.com>2007-04-09 20:44:24 +0000
commit07f8ac77495bd1fd50a5b29a66dc057443646d4c (patch)
tree223cd63662d6aabb79612012f3b804384c9057e3 /vlc
parent0125008a555cb74f8993b551233fa7e0fd9c680e (diff)
downloadasb-07f8ac77495bd1fd50a5b29a66dc057443646d4c.tar.gz
asb-07f8ac77495bd1fd50a5b29a66dc057443646d4c.tar.xz
Let's try a mozilla plugin build.
Diffstat (limited to 'vlc')
-rwxr-xr-xvlc/build/vlc-1.0.SlackBuild78
1 files changed, 72 insertions, 6 deletions
diff --git a/vlc/build/vlc-1.0.SlackBuild b/vlc/build/vlc-1.0.SlackBuild
index c62039d2..a3c68d24 100755
--- a/vlc/build/vlc-1.0.SlackBuild
+++ b/vlc/build/vlc-1.0.SlackBuild
@@ -53,6 +53,7 @@
# Set initial variables:
PRGNAM=vlc
+PRGNAM2=mozplugin
VERSION=${VERSION:-"0.8.6a"}
ARCH=${ARCH:-"i486"}
BUILD=${BUILD:-"1"}
@@ -60,6 +61,17 @@ BUILD=${BUILD:-"1"}
DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog HACKING INSTALL MAINTAINERS \
NEWS README THANKS"
+# The script needs the seamonkey SDK in order to build a mozilla plugin.
+# If no version of Seamonkey is found, no plugin will be compiled:
+MOZBROWSER=$( basename $( readlink /usr/lib/seamonkey ) )
+if [ -z "$MOZBROWSER" ]; then
+ MOZPLUGIN="NO"
+ DO_MOZPLUGIN=""
+else
+ MOZPLUGIN="YES"
+ DO_MOZPLUGIN="--enable-mozilla --with-mozilla-sdk-path=/usr/include/${MOZBROWSER}"
+fi
+
# The vlc contrib directory lags behind the current vlc version:
CONTRIB=0.8.5
@@ -113,6 +125,7 @@ SRCDIR=`dirname $0`
# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
TMP=${TMP:-"/tmp/build"}
PKG=$TMP/package-$PRGNAM
+PKG2=$TMP/package-$PRGNAM-$PRGNAM2
OUTPUT=${OUTPUT:-"/tmp"}
# VLC source
@@ -288,6 +301,12 @@ else
rm -rf $PKG/* # We always erase old package's contents:
fi
+if [ ! -d $PKG2 ]; then
+ mkdir -p $PKG2 # place for the package to be built
+else
+ rm -rf $PKG2/* # We always erase old package's contents:
+fi
+
if [ ! -d $OUTPUT ]; then
mkdir -p $OUTPUT # place for the package to be saved
fi
@@ -1077,9 +1096,27 @@ cat $SRCDIR/vlc-0.8.6a_osdmenu_paths.patch | patch -p1 \
sed -i -e 's|/lib/vlc|/usr/lib${LIBDIRSUFFIX}/vlc|g' vlc-config.in.in configure* \
2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+# Preparations for building a separate vlc mozilla plugin :
+if [ "MOZPLUGIN" == "YES" ]; then
+ # Fix perms issues
+ chmod 644 mozilla/control/*
+ chmod 644 src/control/log.c
+ sed -i 's/\r//' mozilla/control/*
+ # Fix Seamonkey includes for mozilla vlc plugin.
+ find mozilla/* -type f -name "*.cpp" -exec sed -i \
+ "s|<mozilla-config.h>|<${MOZBROWSER}/mozilla-config.h>|" \{} \;
+ find mozilla/* -type f -name "*.h" -exec sed -i \
+ "s|<npapi.h>|<${MOZBROWSER}/plugin/npapi.h>|" \{} \;
+ # Fix mozilla plugin:
+ export XPIDL=/usr/lib/${MOZBROWSER}/xpidl
+ export XPIDL_INCL="-I/usr/include/${MOZBROWSER} \
+ -I/usr/share/idl/$MOZBROWSER} \
+ -I/usr/include/nspr4/"
+fi
+
sh bootstrap
-CFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \
+CFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include -I/usr/include/nspr4/" \
CPPFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \
LDFLAGS="$SLKLDFLAGS -L`pwd`/../vlcdeps/usr/lib" \
PKG_CONFIG_PATH="`pwd`/../vlcdeps/usr/lib/pkgconfig" \
@@ -1148,6 +1185,7 @@ PKG_CONFIG_PATH="`pwd`/../vlcdeps/usr/lib/pkgconfig" \
--with-ffmpeg-zlib \
--with-ffmpeg-tree=$TMP/tmp-$PRGNAM/ffmpeg-${FFMPEG} \
--with-wx-config-path=$TMP/tmp-$PRGNAM/wxGTK-${WXGTK} \
+ ${DO_MOZPLUGIN} \
--program-prefix="" \
--program-suffix="" \
--build=i486-slackware-linux \
@@ -1156,15 +1194,12 @@ PKG_CONFIG_PATH="`pwd`/../vlcdeps/usr/lib/pkgconfig" \
# It did not pick up wxGTK with --enable-wxwidgets \
make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
cd -
+# Stuff to consider adding:
# --enable-dv \
# --enable-pvr \
# --enable-dvb \
# --enable-real \
# --enable-realrtsp \
-# --enable-portaudio \
-# --enable-cyberlink \
-# --enable-pda \
-# --enable-xosd \
}
# -----------------------------------------------------------------------------
@@ -1172,6 +1207,32 @@ cd -
# and creating the actual Slackware package in $OUTPUT
# -----------------------------------------------------------------------------
+build_mozplugin()
+{
+# Get the plugin file from the vlc install directory and cleanup overthere:
+mkdir -p $PKG2/usr/lib/mozilla/plugins/
+mv -f $PKG/usr/lib/mozilla/plugins/libvlcplugin.so \
+ $PKG2/usr/lib/mozilla/plugins/
+rm -rf $PKG/usr/lib/mozilla
+
+mkdir -p $PKG2/install
+cat $SRCDIR/slack-desc.$PRGNAM2 > $PKG2/install/slack-desc
+if [ -f $SRCDIR/slack-required.$PRGNAM2 ]; then
+ cat $SRCDIR/slack-required.$PRGNAM2 > $PKG2/install/slack-required
+fi
+
+cd $PKG2
+makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM2}.log
+cd $OUTPUT
+md5sum ${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}.tgz.md5
+cd -
+cat $PKG2/install/slack-desc | grep "^${PRGNAM}-${PRGNAM2}" > $OUTPUT/${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}.txt
+if [ -f $PKG2/install/slack-required ]; then
+ cat $PKG2/install/slack-required > $OUTPUT/${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}.dep
+fi
+
+}
+
build_slackpkg()
{
#
@@ -1256,6 +1317,7 @@ fi
if [ "$P1" = "--cleanup" ]; then
rm -rf $TMP/tmp-$PRGNAM
rm -rf $PKG
+ rm -rf $PKG2
fi
}
@@ -1311,5 +1373,9 @@ make_shout || exit 1
# And finally, let vlc collect all of the above into one app:
make_vlc || exit 1
-# Pack all this stuff into a Slackware package:
+# Should we also build a package for the mozilla plugin?
+[ "$MOZPLUGIN" == "YES" ] && build_mozplugin
+
+# Pack all this stuff into a Slackware package (this routine also will execute
+# the '--cleanup' functionality if requested):
build_slackpkg