summaryrefslogtreecommitdiffstats
path: root/vlc/build/vlc.SlackBuild
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2010-04-11 23:47:35 +0000
committer Eric Hameleers <alien@slackware.com>2010-04-11 23:47:35 +0000
commit7526a15140882836bbf3ff8bf522064da623d139 (patch)
tree9cd92bf9631f2a494df4f297fe923305b717fd61 /vlc/build/vlc.SlackBuild
parent3bda429f8555f6d1eafd7666a7f8adf464ad0c8e (diff)
downloadasb-7526a15140882836bbf3ff8bf522064da623d139.tar.gz
asb-7526a15140882836bbf3ff8bf522064da623d139.tar.xz
This one correctly builds a mozilla plugin
Diffstat (limited to 'vlc/build/vlc.SlackBuild')
-rwxr-xr-xvlc/build/vlc.SlackBuild183
1 files changed, 107 insertions, 76 deletions
diff --git a/vlc/build/vlc.SlackBuild b/vlc/build/vlc.SlackBuild
index 962a26ff..fdebac7d 100755
--- a/vlc/build/vlc.SlackBuild
+++ b/vlc/build/vlc.SlackBuild
@@ -204,7 +204,7 @@
# * New release. The ffmpeg/x264 snapshots were updated.
# 20091228-1: 28/dec/2009 by Eric Hameleers <alien@slackware.com>
# * Test of git snapshot (1.1.git)
-# 20100318-1: 19/mar/2010 by Eric Hameleers <alien@slackware.com>
+# 20100411-1: 12/apr/2010 by Eric Hameleers <alien@slackware.com>
# * Update of git snapshot (1.1.git). Also updated ffmpeg, live555
# and x264 snapshots. Fixed the ffmpeg checkout so that we can
# control what version of swscale gets used. Fixed the checkout
@@ -214,7 +214,8 @@
# projectM visualisation plugin and re-enabled ggi plugin.
# Added support for VAAPI, i.e. GPU-accelerated playback of H264.
# Fixed the qt4 build so that it is really isolated from any
-# pre-existing qt4 installation on your computer.
+# pre-existing qt4 installation on your computer. Used an
+# internal xulrunner sdk to build the mozilla-plugin.
# Added all patches used by this script to the package's
# documentation directory.
#
@@ -243,16 +244,15 @@ PRGNAM2=mozplugin
BUILD=${BUILD:-"1"}
TAG=${TAG:-"alien"}
-# SRCVER and VERSION values may be modified later!
-# If SRCVER is set to "HEAD" or to any value starting with "20",
+# VERSION value may be modified later!
+# If VERSION is set to "HEAD" or to any value starting with "20",
# (i.e. a "yyyymmdd" date format like "20100319") then you get a git snapshot;
# else we look for the tarball in vlc's official releases directory.
# Acceptible formats:
-#SRCVER=${SRCVER:-"1.0.4"}
-#SRCVER=${SRCVER:-"20100305"}
+#VERSION=${VERSION:-"1.0.4"}
+#VERSION=${VERSION:-"20100305"}
-SRCVER=${SRCVER:-"HEAD"}
-VERSION=$(echo $SRCVER | tr '-' '.')
+VERSION=${VERSION:-"HEAD"}
DOCS="ABOUT-NLS AUTHORS COPYING HACKING INSTALL NEWS README THANKS"
@@ -319,31 +319,13 @@ STATIC_QT4=${STATIC_QT4:-"NO"}
# Note: I _strongly_ suggest you compile ffmpeg statically!
STATIC_FFMPEG=${STATIC_FFMPEG:-"YES"}
-# By default do not build the Mozilla plugin (Slackware's seamonkey post-13.0
-# no longer supports building this).
-# You can enable building the Mozilla plugin by defining MOZPLUGIN="YES":
-MOZPLUGIN=${MOZPLUGIN:-"NO"}
+# You can disable building the Mozilla plugin by defining MOZPLUGIN="NO":
+MOZPLUGIN=${MOZPLUGIN:-"YES"}
# -----------------------------------------------------------------------------
# We're done with the initials. Let's move on:
# -----------------------------------------------------------------------------
-# 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:
-if [ "$MOZPLUGIN" == "NO" ]; then
- DO_MOZPLUGIN=""
-else
- SEAMONKEY=$( readlink /usr/lib${LIBDIRSUFFIX}/seamonkey )
- [ -n "${SEAMONKEY}" ] && MOZBROWSER=$(basename ${SEAMONKEY}) || MOZBROWSER=""
- if [ -z "$MOZBROWSER" ]; then
- MOZPLUGIN="NO"
- DO_MOZPLUGIN=""
- else
- MOZPLUGIN="YES"
- DO_MOZPLUGIN="--enable-mozilla"
- fi
-fi
-
# Dependent package versions
A52=0.7.4
AMR=0.1.2
@@ -362,17 +344,18 @@ DVDCSS=1.2.10
EBML=0.7.8
FAAC=1.28
FAAD2=2.7
+#FFMPEG=0.5
#FFMPEG=r20796 # 20091211
#FFMPEG=r22221 # 20100305
#FFMPEG=r22433 # 20100310
-FFMPEG=r22621 # 20100321
-#FFMPEG=0.5
+#FFMPEG=r22621 # 20100321
+FFMPEG=r22775 # 20100402
FLUID=1.0.9
GGI=2.2.2
GII=1.0.2
GOOM=2k4-0
KATE=0.3.7
-LAME=398-2
+LAME=3.98.4
LIBVA="0.31.0-1+sds11"
LIVE=latest
LUA=5.1.4
@@ -396,7 +379,8 @@ V4L=0.6.1
VCD=0.7.23
X264_SAFE=20080301-2245 # In later versions nasm complains
# about 'function hidden'
-X264=20100320-2245 # Needs yasm installed
+X264=20100409-2245 # Needs yasm installed
+XUL=1.9.2
# Determine what X we're running (the modular X returns the prefix
# in the next command, while older versions stay silent):
@@ -412,21 +396,38 @@ PKG=$TMP/package-$PRGNAM
PKG2=$TMP/package-$PRGNAM-$PRGNAM2
OUTPUT=${OUTPUT:-"/tmp"}
+# This is where we are going to temporarily install the dependencies:
+VLCDEPSDIR="$TMP/tmp-$PRGNAM/vlcdeps"
+
+# Building the mozilla plugin requires the Sun Java SDK:
+if [ "$MOZPLUGIN" == "NO" ]; then
+ DO_MOZPLUGIN=""
+else
+ if which javac 1>/dev/null 2>/dev/null ; then
+ MOZPLUGIN="YES"
+ DO_MOZPLUGIN="--enable-mozilla --with-mozilla-sdk-path=$VLCDEPSDIR/usr/xulrunner-sdk"
+ else
+ echo "+++ NOT building mozilla plugin - Needs Sun JDK from /extra! +++"
+ MOZPLUGIN="NO"
+ DO_MOZPLUGIN=""
+ fi
+fi
+
# Check for yasm, use older x264 snapshot if not found:
if ! which yasm >/dev/null 2>&1 ; then
- echo "##"
- echo "## The 'yasm' program does not seem to be installed."
- echo "## The X264 codec compilation needs yasm (nasm will not do)"
+ echo "+++"
+ echo "+++ The 'yasm' program does not seem to be installed."
+ echo "+++ The X264 codec compilation needs yasm (nasm will not do)"
if [ "$REQUIRE_YASM" != "YES" ]; then
X264=$X264_SAFE
- echo "## Continuing the build anyway, but will use an older X264 ($X264)..."
- echo "##"
+ echo "+++ Continuing the build anyway, but will use an older X264 ($X264)."
+ echo "+++"
else
- echo "## Aborting the build - set the internal script variable:"
- echo "## REQUIRE_YASM to 'NO' if you don't have yasm installed,"
- echo "## and want to fall back to an old (hopefully still useable)"
- echo "## version of X264 that builds with nasm instead."
- echo "##"
+ echo "+++ Aborting the build - set the internal script variable:"
+ echo "+++ REQUIRE_YASM to 'NO' if you don't have yasm installed,"
+ echo "+++ and want to fall back to an old (hopefully still useable)"
+ echo "+++ version of X264 that builds with nasm instead."
+ echo "+++"
exit 1
fi
fi
@@ -706,6 +707,11 @@ SRCURL[42]="http://www.splitted-desktop.com/~gbeauchesne/libva/libva_${LIBVA}.ta
SRCPAT[42]="NO"
USE[42]="YES"
+SOURCE[43]="$SRCDIR/xulrunner-${XUL}.source.tar.bz2"
+SRCURL[43]="http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/${XUL}/source/xulrunner-${XUL}.source.tar.bz2"
+SRCPAT[43]="NO"
+USE[43]="YES"
+
# CSS decoding- VLC can do without if you install an external libdvdcss package.
#SOURCE[xx]="$SRCDIR/libdvdcss-${DVDCSS}.tar.bz2"
#SRCURL[xx]="http://download.videolan.org/pub/libdvdcss/${DVDCSS}/libdvdcss-${DVDCSS}.tar.bz2"
@@ -933,8 +939,7 @@ fi
echo Building ...
# We will be installing static libs into the following directory:
-mkdir -p $TMP/tmp-$PRGNAM/vlcdeps/usr/{bin,doc,include,lib,man}
-VLCDEPSDIR="$TMP/tmp-$PRGNAM/vlcdeps"
+mkdir -p $VLCDEPSDIR/usr/{bin,doc,include,lib,man}
# -----------------------------------------------------------------------------
# Compile theora libraries
@@ -1148,7 +1153,6 @@ PKG_CONFIG_PATH="${VLCDEPSDIR}/usr/lib${LIBDIRSUFFIX}/pkgconfig" \
--enable-zlib \
--disable-vdpau \
$ARCHOPTS \
- --logfile=$OUTPUT/ffmpeg.conf.log \
--extra-cflags="-I${VLCDEPSDIR}/usr/include -DRUNTIME_CPUDETECT" \
--extra-ldflags="-L${VLCDEPSDIR}/usr/lib${LIBDIRSUFFIX}" \
2>&1 | tee $OUTPUT/configure-${PRGNAM}_ffmpeg.log
@@ -1162,6 +1166,7 @@ PKG_CONFIG_PATH="${VLCDEPSDIR}/usr/lib${LIBDIRSUFFIX}/pkgconfig" \
#--disable-vhook \
#--disable-devices \
#--disable-protocols \
+ #--logfile=$OUTPUT/ffmpeg.conf.log \
make -j${NUMJOBS} 2>&1 | tee $OUTPUT/make-${PRGNAM}_ffmpeg.log
[ $? -ne 0 ] && return 1
@@ -2529,6 +2534,41 @@ cd -
# -----------------------------------------------------------------------------
+# Compile xulrunner
+# -----------------------------------------------------------------------------
+make_xul()
+{
+echo -e "**\n** xul ...\n**"
+cd $TMP/tmp-$PRGNAM/mozilla-$(echo $XUL | cut -d. -f1-3)
+
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+export LDFLAGS="$SLKLDFLAGS"
+./configure \
+ --prefix=$VLCDEPSDIR/usr \
+ --libdir=$VLCDEPSDIR/usr/lib${LIBDIRSUFFIX} \
+ --disable-shared \
+ --enable-optimize="${CFLAGS}" \
+ --enable-strip \
+ --enable-libxul \
+ --enable-default-toolkit=cairo-gtk2 \
+ --enable-application=xulrunner \
+ --enable-standalone-modules=xpcom,plugin \
+ --build=$ARCH-slackware-linux \
+ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_xul.log
+make MOZ_MAKE_FLAGS="$NUMJOBS" 2>&1 | tee $OUTPUT/make-${PRGNAM}_xul.log
+# Create an SDK package that we pass to vlc's configure:
+echo -e "\n**\n**\n"
+make sdk 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_xul.log
+tar -C $VLCDEPSDIR/usr -xvf dist/xulrunner-${XUL}*.sdk.tar.bz2
+# Add DOCS to the vlcdeps to have it added to vlc package later:
+mkdir -p $VLCDEPSDIR/doc/xulrunner/
+cp LEGAL LICENSE README.txt $VLCDEPSDIR/doc/xulrunner/ || true
+cd -
+}
+
+
+# -----------------------------------------------------------------------------
# VLC
# -----------------------------------------------------------------------------
make_vlc()
@@ -2573,6 +2613,9 @@ cat $SRCDIR/vlc-0.9.0_deffont.patch \
| sed -e "s#@@XPREFIX@@#$XPREF#" -e "s#@@LIB@@#lib${LIBDIRSUFFIX}#" \
| patch -p1 --verbose 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+# Fix SDL header location:
+sed -i -e "s#SDL_image.h#SDL/&#" -e "s#SDL.h#SDL/&#" $(grep -lr "SDL*.h" .)
+
# Fix PLUGIN_PATH path for lib64
sed -i -e 's#/lib/vlc#/usr/lib${LIBDIRSUFFIX}/vlc#g' vlc-config.in.in configure* \
2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
@@ -2620,21 +2663,10 @@ if [ "$(echo $VERSION |cut -d. -f1-2)" = "1.0" ]; then
2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
fi
-# Preparations for building a separate vlc mozilla plugin :
-if [ "$MOZPLUGIN" == "YES" ]; then
- echo "+++ Building mozilla plugin using $MOZBROWSER sdk +++"
- # Fix Seamonkey includes for mozilla vlc plugin.
- find projects/mozilla -type f -name "*.cpp" -exec sed -i \
- "s#<mozilla-config.h>#<${MOZBROWSER}/mozilla-config.h>#" \{} \;
- find projects/mozilla -type f -name "*.h" -exec sed -i \
- "s#<npapi.h>#<${MOZBROWSER}/plugin/npapi.h>#" \{} \;
- # Fix mozilla plugin:
- export XPIDL="/usr/lib${LIBDIRSUFFIX}/${MOZBROWSER}/xpidl"
- export XPIDL_INCL="-I/usr/include/${MOZBROWSER} \
- -I/usr/share/idl/$MOZBROWSER}"
-else
- echo "+++ NOT building mozilla plugin - this needs the Seamonkey package! +++"
-fi
+## Preparations for building a separate vlc mozilla plugin :
+#export XPIDL="$VLCDEPSDIR/usr/lib${LIBDIRSUFFIX}/xulrunner/xpidl"
+#export XPIDL_INCL="-I$VLCDEPSDIR/usr/include/xulrunner \
+# -I$VLCDEPSDIR/usr/share/idl/xulrunner"
# Only enable DLL loader on ELF ix86 platforms:
if [ "$ARCH" == "i486" -o "$ARCH" == "i686" ]; then
@@ -2670,9 +2702,9 @@ sed -i -e 's/^#ifdef HAVE_EVENTFD/#ifdef HAVE_SYS_EVENTFD_H/' src/misc/objects.c
sh bootstrap
-CPPFLAGS="-I$VLCDEPSDIR/usr/include" \
-CFLAGS="-I$VLCDEPSDIR/usr/include $SLKCFLAGS" \
-CXXFLAGS="-I$VLCDEPSDIR/usr/include $SLKCFLAGS" \
+CPPFLAGS="-I$VLCDEPSDIR/usr/include -I$VLCDEPSDIR/usr/include/xulrunner" \
+CFLAGS="-I$VLCDEPSDIR/usr/include -I$VLCDEPSDIR/usr/include/xulrunner $SLKCFLAGS" \
+CXXFLAGS="-I$VLCDEPSDIR/usr/include -I$VLCDEPSDIR/usr/include/xulrunner $SLKCFLAGS" \
LDFLAGS="-L$VLCDEPSDIR/usr/lib${LIBDIRSUFFIX} $SLKLDFLAGS" \
LIBS="-lX11 -lva -lva-x11" \
PKG_CONFIG_PATH="$VLCDEPSDIR/usr/lib${LIBDIRSUFFIX}/pkgconfig" \
@@ -2816,15 +2848,9 @@ build_mozplugin()
{
echo -e "**\n** mozplugin ...\n**"
cd $TMP/tmp-$PRGNAM/${PRGNAM}-${SRCVER}
-# Get the plugin file from the vlc build directory:
+# Install the mozilla plugin:
mkdir -p $PKG2/usr/lib${LIBDIRSUFFIX}/mozilla/plugins/
-if [ -f ./projects/mozilla/libvlcplugin.so ]; then
- VLCPLUGINSO=./projects/mozilla/libvlcplugin.so
-else
- VLCPLUGINSO=./projects/mozilla/.libs/libvlcplugin.so
-fi
-cp -a ${VLCPLUGINSO} $PKG2/usr/lib${LIBDIRSUFFIX}/mozilla/plugins/
-strip --strip-unneeded $PKG2/usr/lib${LIBDIRSUFFIX}/mozilla/plugins/libvlcplugin.so
+make -C projects/mozilla DESTDIR=$PKG2 install-strip
mkdir -p $PKG2/install
cat $SRCDIR/slack-desc.$PRGNAM2 > $PKG2/install/slack-desc
@@ -2833,7 +2859,7 @@ if [ -f $SRCDIR/slack-required.$PRGNAM2 ]; then
fi
cd $PKG2
-makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM2}.log
+makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}_${PRGNAM2}.log
cd $OUTPUT
md5sum ${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5
cd -
@@ -2957,13 +2983,13 @@ fi
# Build the package:
cd $PKG
-makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
+makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-$(echo $VERSION |tr '-' '.')-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
-md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5
+md5sum ${PRGNAM}-$(echo $VERSION |tr '-' '.')-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-$(echo $VERSION |tr '-' '.')-${ARCH}-${BUILD}${TAG}.tgz.md5
cd -
-cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
+cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-$(echo $VERSION |tr '-' '.')-${ARCH}-${BUILD}${TAG}.txt
if [ -f $PKG/install/slack-required ]; then
- cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep
+ cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-$(echo $VERSION |tr '-' '.')-${ARCH}-${BUILD}${TAG}.dep
fi
}
@@ -2986,6 +3012,11 @@ if echo "$*" | grep -qw -- --unwrapvlcdeps ; then
else
#if [ "xy" == "x" ]; then
+ # Are we building the mozilla plugin?
+ if [ "$MOZPLUGIN" = "YES" ]; then
+ make_xul
+ fi
+
# qt4 is used for the vlc gui:
if [ "$STATIC_QT4" = "YES" -o "$STATIC_QT4" = "yes" ]; then
make_qt4