diff options
Diffstat (limited to 'media/libs')
54 files changed, 5828 insertions, 1839 deletions
diff --git a/media/libs/aubio/aubio.SlackBuild b/media/libs/aubio/aubio.SlackBuild new file mode 100755 index 00000000..8c7107d8 --- /dev/null +++ b/media/libs/aubio/aubio.SlackBuild @@ -0,0 +1,185 @@ +#!/bin/bash +# +# aubio.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# aubio.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for aubio, by Silvio Rhatto +# requires: fftw jack swig libsamplerate +# tested: aubio-0.3.2 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="aubio" +PKG_NAME="aubio" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.3.2} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://aubio.org/pub/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done + +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done +fi + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler--------------------------------------------------------| +aubio: aubio (library for audio labelling) +aubio: +aubio: aubio is a library for audio labelling. Its features include +aubio: segmenting a sound file before each of its attacks, performing pitch +aubio: detection, tapping the beat and producing midi streams from live audio. +aubio: The name aubio comes from 'audio' with a typo: several transcription +aubio: errors are likely to be found in the results too. +aubio: +aubio: +aubio: +aubio: +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/media/libs/aubio/slack-required b/media/libs/aubio/slack-required new file mode 100644 index 00000000..098e794b --- /dev/null +++ b/media/libs/aubio/slack-required @@ -0,0 +1,7 @@ +# Dependency list to aubio +# +# dependency [condition] [version]] +fftw +jack +swig +libsamplerate diff --git a/media/libs/edje/edje.SlackBuild b/media/libs/edje/edje.SlackBuild index 139f6623..47a8bc70 100755 --- a/media/libs/edje/edje.SlackBuild +++ b/media/libs/edje/edje.SlackBuild @@ -1,105 +1,142 @@ #!/bin/bash # -# edje.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# edje.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# edje.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# edje.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for edje -# by rhatto at riseup.net +# slackbuild for edje, by Silvio Rhatto +# requires: eet evas ecore efreet embryo +# tested: edje-svn_version # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building edje are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="edje" +# Set variables +CWD="$(pwd)" +SRC_NAME="edje" +PKG_NAME="edje" ARCH=${ARCH:=i486} -VERSION="`date +%Y%m%d`" +SRC_VERSION=${VERSION:=svn_version} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc"} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -# ------- error codes for createpkg -------------- +# Set error codes (used by createpkg) ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 -ERROR_PATCH=40; ERROR_VCS=41 - -SRC_DIR="$SRC_DIR/efl" -mkdir -p $SRC_DIR - -if [ -d "$SRC_DIR/e17/libs/edje" ]; then - cd $SRC_DIR/e17/libs/edje - cvs update || exit $ERROR_VCS -else - cd $SRC_DIR - # echo "Please hit ENTER on passwd prompt..." - # cvs -d:pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e login || exit $ERROR_VCS - cvs -z3 -d:pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e co e17/libs/edje || exit $ERROR_VCS -fi - -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -cd $SRC_DIR/e17/libs/edje +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -make clean &> /dev/null -./autogen.sh --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF -make || exit $ERROR_MAKE -make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -CWD="`pwd`" +# Get svn source code +cd "$SRC_DIR" +SND_DIR="`basename http://svn.enlightenment.org/svn/e/trunk/edje`" -cd $TMP/package-$PACKAGE +if [ "`find "$SRC_DIR/" -name .svn`" != "" ] && [ -d "$SRC_DIR/$SND_DIR" ]; then + cd $SND_DIR + svn update || exit $ERROR_VCS +else + svn checkout http://svn.enlightenment.org/svn/e/trunk/edje $SND_DIR || exit $ERROR_VCS + cd $SND_DIR +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +PKG_VERSION="`svn info | awk '/Last Changed Rev:/ { print $4 }'`_svn" + +# Copy svn source +cd "$PKG_WORK" +cp -a $SRC_DIR/* . +PKG_SRC="$PWD/$SND_DIR" +cd "$PKG_SRC" + +# Configure +./autogen.sh || exit $ERROR_CONF +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog NEWS README TODO BUGS" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler---------------------------------------------------------| edje: edje edje: edje: A graphical layout and animation library for animated resizable, @@ -111,22 +148,13 @@ edje: edje: edje: edje: -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +EODESC -DOCS="AUTHORS COPYING ChangeLog CHANGELOG INSTALL NEWS README TODO" - -for file in $DOCS; do - if [ -f "$CWD/$file" ]; then - cp $CWD/$file usr/doc/$PACKAGE-$VERSION/ - fi -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/edje/slack-required b/media/libs/edje/slack-required index 4680dcfc..562a7203 100644 --- a/media/libs/edje/slack-required +++ b/media/libs/edje/slack-required @@ -1,5 +1,8 @@ -eet -evas -ecore -efreet -embryo +# Dependency list to edje +# +# dependency [condition] [version]] +eet +evas +ecore +efreet +embryo diff --git a/media/libs/efreet/efreet.SlackBuild b/media/libs/efreet/efreet.SlackBuild index 30d1adb6..6f60b111 100755 --- a/media/libs/efreet/efreet.SlackBuild +++ b/media/libs/efreet/efreet.SlackBuild @@ -1,105 +1,142 @@ #!/bin/bash # -# efreet.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# efreet.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# efreet.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# efreet.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for efreet -# by rhatto at riseup.net +# slackbuild for efreet, by Silvio Rhatto +# requires: eet evas ecore +# tested: efreet-svn_version # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building efreet are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="efreet" +# Set variables +CWD="$(pwd)" +SRC_NAME="efreet" +PKG_NAME="efreet" ARCH=${ARCH:=i486} -VERSION="`date +%Y%m%d`" +SRC_VERSION=${VERSION:=svn_version} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc"} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -# ------- error codes for createpkg -------------- +# Set error codes (used by createpkg) ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 -ERROR_PATCH=40; ERROR_VCS=41 - -SRC_DIR="$SRC_DIR/efl" -mkdir -p $SRC_DIR - -if [ -d "$SRC_DIR/e17/libs/efreet" ]; then - cd $SRC_DIR/e17/libs/efreet - cvs update || exit $ERROR_VCS -else - cd $SRC_DIR - # echo "Please hit ENTER on passwd prompt..." - # cvs -d:pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e login || exit $ERROR_VCS - cvs -z3 -d:pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e co e17/libs/efreet || exit $ERROR_VCS -fi - -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -cd $SRC_DIR/e17/libs/efreet +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -make clean &> /dev/null -./autogen.sh --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF -make || exit $ERROR_MAKE -make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -CWD="`pwd`" +# Get svn source code +cd "$SRC_DIR" +SND_DIR="`basename http://svn.enlightenment.org/svn/e/trunk/efreet`" -cd $TMP/package-$PACKAGE +if [ "`find "$SRC_DIR/" -name .svn`" != "" ] && [ -d "$SRC_DIR/$SND_DIR" ]; then + cd $SND_DIR + svn update || exit $ERROR_VCS +else + svn checkout http://svn.enlightenment.org/svn/e/trunk/efreet $SND_DIR || exit $ERROR_VCS + cd $SND_DIR +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +PKG_VERSION="`svn info | awk '/Last Changed Rev:/ { print $4 }'`_svn" + +# Copy svn source +cd "$PKG_WORK" +cp -a $SRC_DIR/* . +PKG_SRC="$PWD/$SND_DIR" +cd "$PKG_SRC" + +# Configure +./autogen.sh || exit $ERROR_CONF +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog NEWS README TODO BUGS" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler-------------------------------------------------------| efreet: efreet efreet: efreet: library for handling of freedesktop.org specs. @@ -111,22 +148,13 @@ efreet: efreet: efreet: efreet: -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +EODESC -DOCS="AUTHORS COPYING ChangeLog CHANGELOG INSTALL NEWS README TODO" - -for file in $DOCS; do - if [ -f "$CWD/$file" ]; then - cp $CWD/$file usr/doc/$PACKAGE-$VERSION/ - fi -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/efreet/slack-required b/media/libs/efreet/slack-required index 5081839e..f68a198a 100644 --- a/media/libs/efreet/slack-required +++ b/media/libs/efreet/slack-required @@ -1,3 +1,6 @@ -eet -evas -ecore +# Dependency list to efreet +# +# dependency [condition] [version]] +eet +evas +ecore diff --git a/media/libs/embryo/embryo.SlackBuild b/media/libs/embryo/embryo.SlackBuild index dff4c50e..9b612c3d 100755 --- a/media/libs/embryo/embryo.SlackBuild +++ b/media/libs/embryo/embryo.SlackBuild @@ -1,105 +1,142 @@ #!/bin/bash # -# embryo.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# embryo.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# embryo.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# embryo.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for embryo -# by rhatto at riseup.net +# slackbuild for embryo, by Silvio Rhatto +# requires: eet evas ecore efreet +# tested: embryo-svn_version # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building embryo are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="embryo" +# Set variables +CWD="$(pwd)" +SRC_NAME="embryo" +PKG_NAME="embryo" ARCH=${ARCH:=i486} -VERSION="`date +%Y%m%d`" +SRC_VERSION=${VERSION:=svn_version} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc"} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -# ------- error codes for createpkg -------------- +# Set error codes (used by createpkg) ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 -ERROR_PATCH=40; ERROR_VCS=41 - -SRC_DIR="$SRC_DIR/efl" -mkdir -p $SRC_DIR - -if [ -d "$SRC_DIR/e17/libs/embryo" ]; then - cd $SRC_DIR/e17/libs/embryo - cvs update || exit $ERROR_VCS -else - cd $SRC_DIR - # echo "Please hit ENTER on passwd prompt..." - # cvs -d:pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e login || exit $ERROR_VCS - cvs -z3 -d:pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e co e17/libs/embryo || exit $ERROR_VCS -fi - -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -cd $SRC_DIR/e17/libs/embryo +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -make clean &> /dev/null -./autogen.sh --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF -make || exit $ERROR_MAKE -make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -CWD="`pwd`" +# Get svn source code +cd "$SRC_DIR" +SND_DIR="`basename http://svn.enlightenment.org/svn/e/trunk/embryo`" -cd $TMP/package-$PACKAGE +if [ "`find "$SRC_DIR/" -name .svn`" != "" ] && [ -d "$SRC_DIR/$SND_DIR" ]; then + cd $SND_DIR + svn update || exit $ERROR_VCS +else + svn checkout http://svn.enlightenment.org/svn/e/trunk/embryo $SND_DIR || exit $ERROR_VCS + cd $SND_DIR +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +PKG_VERSION="`svn info | awk '/Last Changed Rev:/ { print $4 }'`_svn" + +# Copy svn source +cd "$PKG_WORK" +cp -a $SRC_DIR/* . +PKG_SRC="$PWD/$SND_DIR" +cd "$PKG_SRC" + +# Configure +./autogen.sh || exit $ERROR_CONF +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog NEWS README TODO BUGS" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler-------------------------------------------------------| embryo: embryo embryo: embryo: Embryo is primarily a shared library that gives you an API to load and control @@ -111,22 +148,13 @@ embryo: embryo: embryo: embryo: -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +EODESC -DOCS="AUTHORS COPYING ChangeLog CHANGELOG INSTALL NEWS README TODO" - -for file in $DOCS; do - if [ -f "$CWD/$file" ]; then - cp $CWD/$file usr/doc/$PACKAGE-$VERSION/ - fi -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/embryo/slack-required b/media/libs/embryo/slack-required index 4daa9c56..85e8274e 100644 --- a/media/libs/embryo/slack-required +++ b/media/libs/embryo/slack-required @@ -1,4 +1,7 @@ -eet -evas -ecore -efreet +# Dependency list to embryo +# +# dependency [condition] [version]] +eet +evas +ecore +efreet diff --git a/media/libs/emotion/emotion.SlackBuild b/media/libs/emotion/emotion.SlackBuild index cd11cde7..11df454c 100755 --- a/media/libs/emotion/emotion.SlackBuild +++ b/media/libs/emotion/emotion.SlackBuild @@ -1,105 +1,142 @@ #!/bin/bash # -# emotion.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# emotion.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# emotion.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# emotion.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for emotion -# by rhatto at riseup.net +# slackbuild for emotion, by Silvio Rhatto +# requires: ecore +# tested: emotion-svn_version # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building emotion are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="emotion" +# Set variables +CWD="$(pwd)" +SRC_NAME="emotion" +PKG_NAME="emotion" ARCH=${ARCH:=i486} -VERSION="`date +%Y%m%d`" +SRC_VERSION=${VERSION:=svn_version} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc"} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -# ------- error codes for createpkg -------------- +# Set error codes (used by createpkg) ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 -ERROR_PATCH=40; ERROR_VCS=41 - -SRC_DIR="$SRC_DIR/efl" -mkdir -p $SRC_DIR - -if [ -d "$SRC_DIR/e17/libs/emotion" ]; then - cd $SRC_DIR/e17/libs/emotion - cvs update || exit $ERROR_VCS -else - cd $SRC_DIR - # echo "Please hit ENTER on passwd prompt..." - # cvs -d:pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e login || exit $ERROR_VCS - cvs -z3 -d:pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e co e17/libs/emotion || exit $ERROR_VCS -fi - -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -cd $SRC_DIR/e17/libs/emotion +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -make clean &> /dev/null -./autogen.sh --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF -make || exit $ERROR_MAKE -make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -CWD="`pwd`" +# Get svn source code +cd "$SRC_DIR" +SND_DIR="`basename http://svn.enlightenment.org/svn/e/trunk/emotion`" -cd $TMP/package-$PACKAGE +if [ "`find "$SRC_DIR/" -name .svn`" != "" ] && [ -d "$SRC_DIR/$SND_DIR" ]; then + cd $SND_DIR + svn update || exit $ERROR_VCS +else + svn checkout http://svn.enlightenment.org/svn/e/trunk/emotion $SND_DIR || exit $ERROR_VCS + cd $SND_DIR +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +PKG_VERSION="`svn info | awk '/Last Changed Rev:/ { print $4 }'`_svn" + +# Copy svn source +cd "$PKG_WORK" +cp -a $SRC_DIR/* . +PKG_SRC="$PWD/$SND_DIR" +cd "$PKG_SRC" + +# Configure +./autogen.sh || exit $ERROR_CONF +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog NEWS README TODO BUGS" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler------------------------------------------------------| emotion: emotion emotion: emotion: A media object library for Evas and Ecore @@ -111,22 +148,13 @@ emotion: emotion: emotion: emotion: -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +EODESC -DOCS="AUTHORS COPYING ChangeLog CHANGELOG INSTALL NEWS README TODO" - -for file in $DOCS; do - if [ -f "$CWD/$file" ]; then - cp $CWD/$file usr/doc/$PACKAGE-$VERSION/ - fi -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/emotion/slack-required b/media/libs/emotion/slack-required new file mode 100644 index 00000000..ded74d7a --- /dev/null +++ b/media/libs/emotion/slack-required @@ -0,0 +1,4 @@ +# Dependency list to emotion +# +# dependency [condition] [version]] +ecore diff --git a/media/libs/faad2/faad2-2.6.1.diff b/media/libs/faad2/faad2-2.6.1.diff new file mode 100644 index 00000000..bb246163 --- /dev/null +++ b/media/libs/faad2/faad2-2.6.1.diff @@ -0,0 +1,1040 @@ +diff -urNad faad2-svn~/include/neaacdec.h faad2-svn/include/neaacdec.h +--- faad2-svn~/include/neaacdec.h 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/include/neaacdec.h 2007-11-28 23:29:27.000000000 +0000 +@@ -35,6 +35,7 @@ + extern "C" { + #endif /* __cplusplus */ + ++#include <stdint.h> + + #if 1 + /* MACROS FOR BACKWARDS COMPATIBILITY */ +@@ -197,51 +198,51 @@ + unsigned char ps; + } NeAACDecFrameInfo; + +-char* NEAACDECAPI NeAACDecGetErrorMessage(unsigned char errcode); ++int8_t* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode); + +-unsigned long NEAACDECAPI NeAACDecGetCapabilities(void); ++uint32_t NEAACDECAPI NeAACDecGetCapabilities(void); + + NeAACDecHandle NEAACDECAPI NeAACDecOpen(void); + + NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder); + +-unsigned char NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder, ++uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder, + NeAACDecConfigurationPtr config); + + /* Init the library based on info from the AAC file (ADTS/ADIF) */ +-long NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, +- unsigned char *buffer, +- unsigned long buffer_size, +- unsigned long *samplerate, +- unsigned char *channels); ++int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, ++ uint8_t *buffer, ++ uint32_t buffer_size, ++ uint32_t *samplerate, ++ uint8_t *channels); + + /* Init the library using a DecoderSpecificInfo */ +-char NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, unsigned char *pBuffer, +- unsigned long SizeOfDecoderSpecificInfo, +- unsigned long *samplerate, unsigned char *channels); ++int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, unsigned char *pBuffer, ++ uint32_t SizeOfDecoderSpecificInfo, ++ uint32_t *samplerate, uint8_t *channels); + + /* Init the library for DRM */ +-char NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, unsigned long samplerate, +- unsigned char channels); ++int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate, ++ uint8_t channels); + +-void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, long frame); ++void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame); + + void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder); + + void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder, + NeAACDecFrameInfo *hInfo, +- unsigned char *buffer, +- unsigned long buffer_size); ++ uint8_t *buffer, ++ uint32_t buffer_size); + + void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder, + NeAACDecFrameInfo *hInfo, +- unsigned char *buffer, +- unsigned long buffer_size, ++ uint8_t *buffer, ++ uint32_t buffer_size, + void **sample_buffer, +- unsigned long sample_buffer_size); ++ uint32_t sample_buffer_size); + +-char NEAACDECAPI NeAACDecAudioSpecificConfig(unsigned char *pBuffer, +- unsigned long buffer_size, ++int8_t NEAACDECAPI NeAACDecAudioSpecificConfig(uint8_t *pBuffer, ++ uint32_t buffer_size, + mp4AudioSpecificConfig *mp4ASC); + + #ifdef _WIN32 +diff -urNad faad2-svn~/libfaad/Makefile.am faad2-svn/libfaad/Makefile.am +--- faad2-svn~/libfaad/Makefile.am 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/Makefile.am 2007-11-28 23:31:03.000000000 +0000 +@@ -1,28 +1,29 @@ + lib_LTLIBRARIES = libfaad.la + ++AM_CFLAGS = -iquote $(top_srcdir)/include + include_HEADERS = $(top_srcdir)/include/faad.h \ +- $(top_srcdir)/include/neaacdec.h ++ $(top_srcdir)/include/neaacdec.h + + libfaad_la_LDFLAGS = -lm + + libfaad_la_SOURCES = bits.c cfft.c decoder.c drc.c \ +-drm_dec.c error.c filtbank.c \ +-ic_predict.c is.c lt_predict.c mdct.c mp4.c ms.c output.c pns.c \ +-ps_dec.c ps_syntax.c \ +-pulse.c specrec.c syntax.c tns.c hcr.c huffman.c \ +-rvlc.c ssr.c ssr_fb.c ssr_ipqf.c common.c \ +-sbr_dct.c sbr_e_nf.c sbr_fbt.c sbr_hfadj.c sbr_hfgen.c \ +-sbr_huff.c sbr_qmf.c sbr_syntax.c sbr_tf_grid.c sbr_dec.c \ +-analysis.h bits.h cfft.h cfft_tab.h common.h \ +-decoder.h drc.h drm_dec.h error.h fixed.h filtbank.h \ +-huffman.h ic_predict.h iq_table.h is.h kbd_win.h lt_predict.h \ +-mdct.h mdct_tab.h mp4.h ms.h output.h pns.h ps_dec.h ps_tables.h \ +-pulse.h rvlc.h \ +-sbr_dct.h sbr_dec.h sbr_e_nf.h sbr_fbt.h sbr_hfadj.h sbr_hfgen.h \ +-sbr_huff.h sbr_noise.h sbr_qmf.h sbr_syntax.h sbr_tf_grid.h \ +-sine_win.h specrec.h ssr.h ssr_fb.h ssr_ipqf.h \ +-ssr_win.h syntax.h structs.h tns.h \ +-sbr_qmf_c.h codebook/hcb.h \ +-codebook/hcb_1.h codebook/hcb_2.h codebook/hcb_3.h codebook/hcb_4.h \ +-codebook/hcb_5.h codebook/hcb_6.h codebook/hcb_7.h codebook/hcb_8.h \ +-codebook/hcb_9.h codebook/hcb_10.h codebook/hcb_11.h codebook/hcb_sf.h +\ No newline at end of file ++ drm_dec.c error.c filtbank.c \ ++ ic_predict.c is.c lt_predict.c mdct.c mp4.c ms.c output.c pns.c \ ++ ps_dec.c ps_syntax.c \ ++ pulse.c specrec.c syntax.c tns.c hcr.c huffman.c \ ++ rvlc.c ssr.c ssr_fb.c ssr_ipqf.c common.c \ ++ sbr_dct.c sbr_e_nf.c sbr_fbt.c sbr_hfadj.c sbr_hfgen.c \ ++ sbr_huff.c sbr_qmf.c sbr_syntax.c sbr_tf_grid.c sbr_dec.c \ ++ analysis.h bits.h cfft.h cfft_tab.h common.h \ ++ decoder.h drc.h drm_dec.h error.h fixed.h filtbank.h \ ++ huffman.h ic_predict.h iq_table.h is.h kbd_win.h lt_predict.h \ ++ mdct.h mdct_tab.h mp4.h ms.h output.h pns.h ps_dec.h ps_tables.h \ ++ pulse.h rvlc.h \ ++ sbr_dct.h sbr_dec.h sbr_e_nf.h sbr_fbt.h sbr_hfadj.h sbr_hfgen.h \ ++ sbr_huff.h sbr_noise.h sbr_qmf.h sbr_syntax.h sbr_tf_grid.h \ ++ sine_win.h specrec.h ssr.h ssr_fb.h ssr_ipqf.h \ ++ ssr_win.h syntax.h structs.h tns.h \ ++ sbr_qmf_c.h codebook/hcb.h \ ++ codebook/hcb_1.h codebook/hcb_2.h codebook/hcb_3.h codebook/hcb_4.h \ ++ codebook/hcb_5.h codebook/hcb_6.h codebook/hcb_7.h codebook/hcb_8.h \ ++ codebook/hcb_9.h codebook/hcb_10.h codebook/hcb_11.h codebook/hcb_sf.h +diff -urNad faad2-svn~/libfaad/common.h faad2-svn/libfaad/common.h +--- faad2-svn~/libfaad/common.h 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/common.h 2007-11-28 23:29:27.000000000 +0000 +@@ -39,6 +39,8 @@ + # include "../config.h" + #endif + ++#include "neaacdec.h" ++ + #if 1 + #define INLINE __inline + #else +@@ -210,7 +212,7 @@ + #else + # if HAVE_STDINT_H + # include <stdint.h> +-# else ++# else /* !HAVE_STDINT_H */ + /* we need these... */ + #ifndef __TCS__ + typedef unsigned long long uint64_t; +@@ -225,7 +227,7 @@ + typedef long int32_t; + typedef short int16_t; + typedef char int8_t; +-# endif ++# endif /* !HAVE_STDINT_H */ + #endif + #if HAVE_UNISTD_H + //# include <unistd.h> +diff -urNad faad2-svn~/libfaad/decoder.c faad2-svn/libfaad/decoder.c +--- faad2-svn~/libfaad/decoder.c 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/decoder.c 2007-11-28 23:29:27.000000000 +0000 +@@ -34,7 +34,6 @@ + #include <stdlib.h> + #include <string.h> + +-#include "decoder.h" + #include "mp4.h" + #include "syntax.h" + #include "error.h" +@@ -54,13 +53,13 @@ + #endif + + /* static function declarations */ +-static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, ++static void* aac_frame_decode(NeAACDecStruct* hDecoder, NeAACDecFrameInfo *hInfo, + uint8_t *buffer, uint32_t buffer_size, + void **sample_buffer, uint32_t sample_buffer_size); +-static void create_channel_config(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo); ++static void create_channel_config(NeAACDecStruct* hDecoder, NeAACDecFrameInfo *hInfo); + + +-char* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode) ++int8_t* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode) + { + if (errcode >= NUM_ERROR_MESSAGES) + return NULL; +@@ -97,9 +96,9 @@ + NeAACDecHandle NEAACDECAPI NeAACDecOpen(void) + { + uint8_t i; +- NeAACDecHandle hDecoder = NULL; ++ NeAACDecStruct* hDecoder = NULL; + +- if ((hDecoder = (NeAACDecHandle)faad_malloc(sizeof(NeAACDecStruct))) == NULL) ++ if ((hDecoder = (NeAACDecStruct*)faad_malloc(sizeof(NeAACDecStruct))) == NULL) + return NULL; + + memset(hDecoder, 0, sizeof(NeAACDecStruct)); +@@ -154,8 +153,9 @@ + return hDecoder; + } + +-NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder) ++NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hpDecoder) + { ++ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder; + if (hDecoder) + { + NeAACDecConfigurationPtr config = &(hDecoder->config); +@@ -166,9 +166,10 @@ + return NULL; + } + +-uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder, ++uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hpDecoder, + NeAACDecConfigurationPtr config) + { ++ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder; + if (hDecoder && config) + { + /* check if we can decode this object type */ +@@ -203,7 +204,7 @@ + } + + +-int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, uint8_t *buffer, ++int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hpDecoder, uint8_t *buffer, + uint32_t buffer_size, + uint32_t *samplerate, uint8_t *channels) + { +@@ -211,7 +212,7 @@ + bitfile ld; + adif_header adif; + adts_header adts; +- ++ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder; + + if ((hDecoder == NULL) || (samplerate == NULL) || (channels == NULL)) + return -1; +@@ -310,12 +311,13 @@ + } + + /* Init the library using a DecoderSpecificInfo */ +-int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer, ++int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hpDecoder, uint8_t *pBuffer, + uint32_t SizeOfDecoderSpecificInfo, + uint32_t *samplerate, uint8_t *channels) + { + int8_t rc; + mp4AudioSpecificConfig mp4ASC; ++ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder; + + if((hDecoder == NULL) + || (pBuffer == NULL) +@@ -401,9 +403,11 @@ + } + + #ifdef DRM +-int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate, ++int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hpDecoder, uint32_t samplerate, + uint8_t channels) + { ++ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder; ++ + if (hDecoder == NULL) + return 1; /* error */ + +@@ -442,9 +446,10 @@ + } + #endif + +-void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder) ++void NEAACDECAPI NeAACDecClose(NeAACDecHandle hpDecoder) + { + uint8_t i; ++ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder; + + if (hDecoder == NULL) + return; +@@ -495,8 +500,10 @@ + if (hDecoder) faad_free(hDecoder); + } + +-void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame) ++void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hpDecoder, int32_t frame) + { ++ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder; ++ + if (hDecoder) + { + hDecoder->postSeekResetFlag = 1; +@@ -506,7 +513,7 @@ + } + } + +-static void create_channel_config(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo) ++static void create_channel_config(NeAACDecStruct* hDecoder, NeAACDecFrameInfo *hInfo) + { + hInfo->num_front_channels = 0; + hInfo->num_side_channels = 0; +@@ -724,18 +731,22 @@ + } + } + +-void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder, ++void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hpDecoder, + NeAACDecFrameInfo *hInfo, + uint8_t *buffer, uint32_t buffer_size) + { ++ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder; ++ + return aac_frame_decode(hDecoder, hInfo, buffer, buffer_size, NULL, 0); + } + +-void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder, ++void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hpDecoder, + NeAACDecFrameInfo *hInfo, + uint8_t *buffer, uint32_t buffer_size, + void **sample_buffer, uint32_t sample_buffer_size) + { ++ NeAACDecStruct* hDecoder = (NeAACDecStruct*)hpDecoder; ++ + if ((sample_buffer == NULL) || (sample_buffer_size == 0)) + { + hInfo->error = 27; +@@ -750,14 +761,14 @@ + + #define ERROR_STATE_INIT 6 + +-static void conceal_output(NeAACDecHandle hDecoder, uint16_t frame_len, ++static void conceal_output(NeAACDecStruct* hDecoder, uint16_t frame_len, + uint8_t out_ch, void *sample_buffer) + { + return; + } + #endif + +-static void* aac_frame_decode(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, ++static void* aac_frame_decode(NeAACDecStruct* hDecoder, NeAACDecFrameInfo *hInfo, + uint8_t *buffer, uint32_t buffer_size, + void **sample_buffer2, uint32_t sample_buffer_size) + { +diff -urNad faad2-svn~/libfaad/decoder.h faad2-svn/libfaad/decoder.h +--- faad2-svn~/libfaad/decoder.h 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/decoder.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,124 +0,0 @@ +-/* +-** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding +-** Copyright (C) 2003-2005 M. Bakker, Nero AG, http://www.nero.com +-** +-** This program is free software; you can redistribute it and/or modify +-** it under the terms of the GNU General Public License as published by +-** the Free Software Foundation; either version 2 of the License, or +-** (at your option) any later version. +-** +-** This program is distributed in the hope that it will be useful, +-** but WITHOUT ANY WARRANTY; without even the implied warranty of +-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-** GNU General Public License for more details. +-** +-** You should have received a copy of the GNU General Public License +-** along with this program; if not, write to the Free Software +-** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-** +-** Any non-GPL usage of this software or parts of this software is strictly +-** forbidden. +-** +-** The "appropriate copyright message" mentioned in section 2c of the GPLv2 +-** must read: "Code from FAAD2 is copyright (c) Nero AG, www.nero.com" +-** +-** Commercial non-GPL licensing of this software is possible. +-** For more info contact Nero AG through Mpeg4AAClicense@nero.com. +-** +-** $Id: decoder.h,v 1.48 2007/11/01 12:33:30 menno Exp $ +-**/ +- +-#ifndef __DECODER_H__ +-#define __DECODER_H__ +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-#ifdef _WIN32 +- #pragma pack(push, 8) +- #ifndef NEAACDECAPI +- #define NEAACDECAPI __cdecl +- #endif +-#else +- #ifndef NEAACDECAPI +- #define NEAACDECAPI +- #endif +-#endif +- +- +-/* library output formats */ +-#define FAAD_FMT_16BIT 1 +-#define FAAD_FMT_24BIT 2 +-#define FAAD_FMT_32BIT 3 +-#define FAAD_FMT_FLOAT 4 +-#define FAAD_FMT_FIXED FAAD_FMT_FLOAT +-#define FAAD_FMT_DOUBLE 5 +- +-#define LC_DEC_CAP (1<<0) +-#define MAIN_DEC_CAP (1<<1) +-#define LTP_DEC_CAP (1<<2) +-#define LD_DEC_CAP (1<<3) +-#define ERROR_RESILIENCE_CAP (1<<4) +-#define FIXED_POINT_CAP (1<<5) +- +-#define FRONT_CHANNEL_CENTER (1) +-#define FRONT_CHANNEL_LEFT (2) +-#define FRONT_CHANNEL_RIGHT (3) +-#define SIDE_CHANNEL_LEFT (4) +-#define SIDE_CHANNEL_RIGHT (5) +-#define BACK_CHANNEL_LEFT (6) +-#define BACK_CHANNEL_RIGHT (7) +-#define BACK_CHANNEL_CENTER (8) +-#define LFE_CHANNEL (9) +-#define UNKNOWN_CHANNEL (0) +- +-char* NEAACDECAPI NeAACDecGetErrorMessage(uint8_t errcode); +- +-uint32_t NEAACDECAPI NeAACDecGetCapabilities(void); +- +-NeAACDecHandle NEAACDECAPI NeAACDecOpen(void); +- +-NeAACDecConfigurationPtr NEAACDECAPI NeAACDecGetCurrentConfiguration(NeAACDecHandle hDecoder); +- +-uint8_t NEAACDECAPI NeAACDecSetConfiguration(NeAACDecHandle hDecoder, +- NeAACDecConfigurationPtr config); +- +-/* Init the library based on info from the AAC file (ADTS/ADIF) */ +-int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, +- uint8_t *buffer, +- uint32_t buffer_size, +- uint32_t *samplerate, +- uint8_t *channels); +- +-/* Init the library using a DecoderSpecificInfo */ +-int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer, +- uint32_t SizeOfDecoderSpecificInfo, +- uint32_t *samplerate, uint8_t *channels); +- +-/* Init the library for DRM */ +-int8_t NEAACDECAPI NeAACDecInitDRM(NeAACDecHandle *hDecoder, uint32_t samplerate, +- uint8_t channels); +- +-void NEAACDECAPI NeAACDecClose(NeAACDecHandle hDecoder); +- +-void NEAACDECAPI NeAACDecPostSeekReset(NeAACDecHandle hDecoder, int32_t frame); +- +-void* NEAACDECAPI NeAACDecDecode(NeAACDecHandle hDecoder, +- NeAACDecFrameInfo *hInfo, +- uint8_t *buffer, +- uint32_t buffer_size); +- +-void* NEAACDECAPI NeAACDecDecode2(NeAACDecHandle hDecoder, +- NeAACDecFrameInfo *hInfo, +- uint8_t *buffer, uint32_t buffer_size, +- void **sample_buffer, uint32_t sample_buffer_size); +- +-#ifdef _WIN32 +- #pragma pack(pop) +-#endif +- +-#ifdef __cplusplus +-} +-#endif +-#endif +diff -urNad faad2-svn~/libfaad/filtbank.c faad2-svn/libfaad/filtbank.c +--- faad2-svn~/libfaad/filtbank.c 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/filtbank.c 2007-11-28 23:29:27.000000000 +0000 +@@ -40,7 +40,6 @@ + #endif + + #include "filtbank.h" +-#include "decoder.h" + #include "syntax.h" + #include "kbd_win.h" + #include "sine_win.h" +diff -urNad faad2-svn~/libfaad/hcr.c faad2-svn/libfaad/hcr.c +--- faad2-svn~/libfaad/hcr.c 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/hcr.c 2007-11-28 23:29:27.000000000 +0000 +@@ -214,7 +214,7 @@ + codeword[index].bits.len = 0; + } + +-uint8_t reordered_spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, ++uint8_t reordered_spectral_data(NeAACDecStruct* hDecoder, ic_stream *ics, + bitfile *ld, int16_t *spectral_data) + { + uint16_t PCWs_done; +diff -urNad faad2-svn~/libfaad/mp4.h faad2-svn/libfaad/mp4.h +--- faad2-svn~/libfaad/mp4.h 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/mp4.h 2007-11-28 23:29:27.000000000 +0000 +@@ -35,11 +35,7 @@ + extern "C" { + #endif + +-#include "decoder.h" +- +-int8_t NEAACDECAPI NeAACDecAudioSpecificConfig(uint8_t *pBuffer, +- uint32_t buffer_size, +- mp4AudioSpecificConfig *mp4ASC); ++#include "neaacdec.h" + + int8_t AudioSpecificConfig2(uint8_t *pBuffer, + uint32_t buffer_size, +diff -urNad faad2-svn~/libfaad/output.c faad2-svn/libfaad/output.c +--- faad2-svn~/libfaad/output.c 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/output.c 2007-11-28 23:29:27.000000000 +0000 +@@ -32,7 +32,6 @@ + #include "structs.h" + + #include "output.h" +-#include "decoder.h" + + #ifndef FIXED_POINT + +@@ -87,7 +86,7 @@ + + #define CONV(a,b) ((a<<1)|(b&0x1)) + +-static void to_PCM_16bit(NeAACDecHandle hDecoder, real_t **input, ++static void to_PCM_16bit(NeAACDecStruct* hDecoder, real_t **input, + uint8_t channels, uint16_t frame_len, + int16_t **sample_buffer) + { +@@ -152,7 +151,7 @@ + } + } + +-static void to_PCM_24bit(NeAACDecHandle hDecoder, real_t **input, ++static void to_PCM_24bit(NeAACDecStruct* hDecoder, real_t **input, + uint8_t channels, uint16_t frame_len, + int32_t **sample_buffer) + { +@@ -222,7 +221,7 @@ + } + } + +-static void to_PCM_32bit(NeAACDecHandle hDecoder, real_t **input, ++static void to_PCM_32bit(NeAACDecStruct* hDecoder, real_t **input, + uint8_t channels, uint16_t frame_len, + int32_t **sample_buffer) + { +@@ -292,7 +291,7 @@ + } + } + +-static void to_PCM_float(NeAACDecHandle hDecoder, real_t **input, ++static void to_PCM_float(NeAACDecStruct* hDecoder, real_t **input, + uint8_t channels, uint16_t frame_len, + float32_t **sample_buffer) + { +@@ -344,7 +343,7 @@ + } + } + +-static void to_PCM_double(NeAACDecHandle hDecoder, real_t **input, ++static void to_PCM_double(NeAACDecStruct* hDecoder, real_t **input, + uint8_t channels, uint16_t frame_len, + double **sample_buffer) + { +@@ -396,7 +395,7 @@ + } + } + +-void *output_to_PCM(NeAACDecHandle hDecoder, ++void *output_to_PCM(NeAACDecStruct* hDecoder, + real_t **input, void *sample_buffer, uint8_t channels, + uint16_t frame_len, uint8_t format) + { +@@ -466,7 +465,7 @@ + } + } + +-void* output_to_PCM(NeAACDecHandle hDecoder, ++void* output_to_PCM(NeAACDecStruct* hDecoder, + real_t **input, void *sample_buffer, uint8_t channels, + uint16_t frame_len, uint8_t format) + { +diff -urNad faad2-svn~/libfaad/output.h faad2-svn/libfaad/output.h +--- faad2-svn~/libfaad/output.h 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/output.h 2007-11-28 23:29:27.000000000 +0000 +@@ -35,7 +35,7 @@ + extern "C" { + #endif + +-void* output_to_PCM(NeAACDecHandle hDecoder, ++void* output_to_PCM(NeAACDecStruct* hDecoder, + real_t **input, + void *samplebuffer, + uint8_t channels, +diff -urNad faad2-svn~/libfaad/specrec.c faad2-svn/libfaad/specrec.c +--- faad2-svn~/libfaad/specrec.c 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/specrec.c 2007-11-28 23:29:27.000000000 +0000 +@@ -58,7 +58,7 @@ + + + /* static function declarations */ +-static uint8_t quant_to_spec(NeAACDecHandle hDecoder, ++static uint8_t quant_to_spec(NeAACDecStruct* hDecoder, + ic_stream *ics, int16_t *quant_data, + real_t *spec_data, uint16_t frame_len); + +@@ -300,10 +300,9 @@ + in section named section. This offset depends on window_sequence and + scale_factor_grouping and is needed to decode the spectral_data(). + */ +-uint8_t window_grouping_info(NeAACDecHandle hDecoder, ic_stream *ics) ++uint8_t window_grouping_info(NeAACDecStruct* hDecoder, ic_stream *ics) + { + uint8_t i, g; +- + uint8_t sf_index = hDecoder->sf_index; + + switch (ics->window_sequence) { +@@ -546,7 +545,7 @@ + - Within a scalefactor window band, the coefficients are in ascending + spectral order. + */ +-static uint8_t quant_to_spec(NeAACDecHandle hDecoder, ++static uint8_t quant_to_spec(NeAACDecStruct* hDecoder, + ic_stream *ics, int16_t *quant_data, + real_t *spec_data, uint16_t frame_len) + { +@@ -680,7 +679,7 @@ + return error; + } + +-static uint8_t allocate_single_channel(NeAACDecHandle hDecoder, uint8_t channel, ++static uint8_t allocate_single_channel(NeAACDecStruct* hDecoder, uint8_t channel, + uint8_t output_channels) + { + int mul = 1; +@@ -781,7 +780,7 @@ + return 0; + } + +-static uint8_t allocate_channel_pair(NeAACDecHandle hDecoder, ++static uint8_t allocate_channel_pair(NeAACDecStruct* hDecoder, + uint8_t channel, uint8_t paired_channel) + { + int mul = 1; +@@ -886,7 +885,7 @@ + return 0; + } + +-uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics, ++uint8_t reconstruct_single_channel(NeAACDecStruct* hDecoder, ic_stream *ics, + element *sce, int16_t *spec_data) + { + uint8_t retval; +@@ -1096,7 +1095,7 @@ + return 0; + } + +-uint8_t reconstruct_channel_pair(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2, ++uint8_t reconstruct_channel_pair(NeAACDecStruct* hDecoder, ic_stream *ics1, ic_stream *ics2, + element *cpe, int16_t *spec_data1, int16_t *spec_data2) + { + uint8_t retval; +@@ -1106,6 +1105,7 @@ + #ifdef PROFILE + int64_t count = faad_get_ts(); + #endif ++ + if (hDecoder->element_alloced[hDecoder->fr_ch_ele] == 0) + { + retval = allocate_channel_pair(hDecoder, cpe->channel, (uint8_t)cpe->paired_channel); +diff -urNad faad2-svn~/libfaad/specrec.h faad2-svn/libfaad/specrec.h +--- faad2-svn~/libfaad/specrec.h 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/specrec.h 2007-11-28 23:29:27.000000000 +0000 +@@ -37,10 +37,10 @@ + + #include "syntax.h" + +-uint8_t window_grouping_info(NeAACDecHandle hDecoder, ic_stream *ics); +-uint8_t reconstruct_channel_pair(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2, ++uint8_t window_grouping_info(NeAACDecStruct* hDecoder, ic_stream *ics); ++uint8_t reconstruct_channel_pair(NeAACDecStruct* hDecoder, ic_stream *ics1, ic_stream *ics2, + element *cpe, int16_t *spec_data1, int16_t *spec_data2); +-uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics, element *sce, ++uint8_t reconstruct_single_channel(NeAACDecStruct* hDecoder, ic_stream *ics, element *sce, + int16_t *spec_data); + + #ifdef __cplusplus +diff -urNad faad2-svn~/libfaad/structs.h faad2-svn/libfaad/structs.h +--- faad2-svn~/libfaad/structs.h 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/structs.h 2007-11-28 23:29:27.000000000 +0000 +@@ -312,67 +312,6 @@ + ic_stream ics2; + } element; /* syntax element (SCE, CPE, LFE) */ + +-typedef struct mp4AudioSpecificConfig +-{ +- /* Audio Specific Info */ +- /*uint8_t*/ unsigned char objectTypeIndex; +- /*uint8_t*/ unsigned char samplingFrequencyIndex; +- /*uint32_t*/ unsigned long samplingFrequency; +- /*uint8_t*/ unsigned char channelsConfiguration; +- +- /* GA Specific Info */ +- /*uint8_t*/ unsigned char frameLengthFlag; +- /*uint8_t*/ unsigned char dependsOnCoreCoder; +- /*uint16_t*/ unsigned short coreCoderDelay; +- /*uint8_t*/ unsigned char extensionFlag; +- /*uint8_t*/ unsigned char aacSectionDataResilienceFlag; +- /*uint8_t*/ unsigned char aacScalefactorDataResilienceFlag; +- /*uint8_t*/ unsigned char aacSpectralDataResilienceFlag; +- /*uint8_t*/ unsigned char epConfig; +- +- /*uint8_t*/ char sbr_present_flag; +- /*uint8_t*/ char forceUpSampling; +- /*uint8_t*/ char downSampledSBR; +-} mp4AudioSpecificConfig; +- +-typedef struct NeAACDecConfiguration +-{ +- /*uint8_t*/ unsigned char defObjectType; +- /*uint32_t*/ unsigned long defSampleRate; +- /*uint8_t*/ unsigned char outputFormat; +- /*uint8_t*/ unsigned char downMatrix; +- /*uint8_t*/ unsigned char useOldADTSFormat; +- /*uint8_t*/ unsigned char dontUpSampleImplicitSBR; +-} NeAACDecConfiguration, *NeAACDecConfigurationPtr; +- +-typedef struct NeAACDecFrameInfo +-{ +- /*uint32_t*/ unsigned long bytesconsumed; +- /*uint32_t*/ unsigned long samples; +- /*uint8_t*/ unsigned char channels; +- /*uint8_t*/ unsigned char error; +- /*uint32_t*/ unsigned long samplerate; +- +- /* SBR: 0: off, 1: on; normal, 2: on; downsampled */ +- /*uint8_t*/ unsigned char sbr; +- +- /* MPEG-4 ObjectType */ +- /*uint8_t*/ unsigned char object_type; +- +- /* AAC header type; MP4 will be signalled as RAW also */ +- /*uint8_t*/ unsigned char header_type; +- +- /* multichannel configuration */ +- /*uint8_t*/ unsigned char num_front_channels; +- /*uint8_t*/ unsigned char num_side_channels; +- /*uint8_t*/ unsigned char num_back_channels; +- /*uint8_t*/ unsigned char num_lfe_channels; +- /*uint8_t*/ unsigned char channel_position[MAX_CHANNELS]; +- +- /* PS: 0: off, 1: on */ +- /*uint8_t*/ unsigned char ps; +-} NeAACDecFrameInfo; +- + typedef struct + { + uint8_t adts_header_present; +@@ -477,9 +416,7 @@ + int64_t requant_cycles; + #endif + const unsigned char *cmes; +-} NeAACDecStruct, *NeAACDecHandle; +- +- ++} NeAACDecStruct; + + #ifdef __cplusplus + } +diff -urNad faad2-svn~/libfaad/syntax.c faad2-svn/libfaad/syntax.c +--- faad2-svn~/libfaad/syntax.c 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/syntax.c 2007-11-28 23:29:27.000000000 +0000 +@@ -38,7 +38,6 @@ + #include <stdlib.h> + #include <string.h> + +-#include "decoder.h" + #include "syntax.h" + #include "specrec.h" + #include "huffman.h" +@@ -55,51 +54,51 @@ + + + /* static function declarations */ +-static void decode_sce_lfe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld, ++static void decode_sce_lfe(NeAACDecStruct* hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld, + uint8_t id_syn_ele); +-static void decode_cpe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld, ++static void decode_cpe(NeAACDecStruct* hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld, + uint8_t id_syn_ele); +-static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, ++static uint8_t single_lfe_channel_element(NeAACDecStruct* hDecoder, bitfile *ld, + uint8_t channel, uint8_t *tag); +-static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld, ++static uint8_t channel_pair_element(NeAACDecStruct* hDecoder, bitfile *ld, + uint8_t channel, uint8_t *tag); + #ifdef COUPLING_DEC +-static uint8_t coupling_channel_element(NeAACDecHandle hDecoder, bitfile *ld); ++static uint8_t coupling_channel_element(NeAACDecStruct* hDecoder, bitfile *ld); + #endif +-static uint16_t data_stream_element(NeAACDecHandle hDecoder, bitfile *ld); ++static uint16_t data_stream_element(NeAACDecStruct* hDecoder, bitfile *ld); + static uint8_t program_config_element(program_config *pce, bitfile *ld); +-static uint8_t fill_element(NeAACDecHandle hDecoder, bitfile *ld, drc_info *drc ++static uint8_t fill_element(NeAACDecStruct* hDecoder, bitfile *ld, drc_info *drc + #ifdef SBR_DEC + ,uint8_t sbr_ele + #endif + ); +-static uint8_t individual_channel_stream(NeAACDecHandle hDecoder, element *ele, ++static uint8_t individual_channel_stream(NeAACDecStruct* hDecoder, element *ele, + bitfile *ld, ic_stream *ics, uint8_t scal_flag, + int16_t *spec_data); +-static uint8_t ics_info(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld, ++static uint8_t ics_info(NeAACDecStruct* hDecoder, ic_stream *ics, bitfile *ld, + uint8_t common_window); +-static uint8_t section_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld); +-static uint8_t scale_factor_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld); ++static uint8_t section_data(NeAACDecStruct* hDecoder, ic_stream *ics, bitfile *ld); ++static uint8_t scale_factor_data(NeAACDecStruct* hDecoder, ic_stream *ics, bitfile *ld); + #ifdef SSR_DEC + static void gain_control_data(bitfile *ld, ic_stream *ics); + #endif +-static uint8_t spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld, ++static uint8_t spectral_data(NeAACDecStruct* hDecoder, ic_stream *ics, bitfile *ld, + int16_t *spectral_data); + static uint16_t extension_payload(bitfile *ld, drc_info *drc, uint16_t count); + static uint8_t pulse_data(ic_stream *ics, pulse_info *pul, bitfile *ld); + static void tns_data(ic_stream *ics, tns_info *tns, bitfile *ld); + #ifdef LTP_DEC +-static uint8_t ltp_data(NeAACDecHandle hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld); ++static uint8_t ltp_data(NeAACDecStruct* hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld); + #endif + static uint8_t adts_fixed_header(adts_header *adts, bitfile *ld); + static void adts_variable_header(adts_header *adts, bitfile *ld); + static void adts_error_check(adts_header *adts, bitfile *ld); + static uint8_t dynamic_range_info(bitfile *ld, drc_info *drc); + static uint8_t excluded_channels(bitfile *ld, drc_info *drc); +-static uint8_t side_info(NeAACDecHandle hDecoder, element *ele, ++static uint8_t side_info(NeAACDecStruct* hDecoder, element *ele, + bitfile *ld, ic_stream *ics, uint8_t scal_flag); + #ifdef DRM +-static int8_t DRM_aac_scalable_main_header(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2, ++static int8_t DRM_aac_scalable_main_header(NeAACDecStruct* hDecoder, ic_stream *ics1, ic_stream *ics2, + bitfile *ld, uint8_t this_layer_stereo); + #endif + +@@ -321,7 +320,7 @@ + return 0; + } + +-static void decode_sce_lfe(NeAACDecHandle hDecoder, ++static void decode_sce_lfe(NeAACDecStruct* hDecoder, + NeAACDecFrameInfo *hInfo, bitfile *ld, + uint8_t id_syn_ele) + { +@@ -366,7 +365,7 @@ + hDecoder->fr_ch_ele++; + } + +-static void decode_cpe(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld, ++static void decode_cpe(NeAACDecStruct* hDecoder, NeAACDecFrameInfo *hInfo, bitfile *ld, + uint8_t id_syn_ele) + { + uint8_t channels = hDecoder->fr_channels; +@@ -414,7 +413,7 @@ + hDecoder->fr_ch_ele++; + } + +-void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, ++void raw_data_block(NeAACDecStruct* hDecoder, NeAACDecFrameInfo *hInfo, + bitfile *ld, program_config *pce, drc_info *drc) + { + uint8_t id_syn_ele; +@@ -584,7 +583,7 @@ + + /* Table 4.4.4 and */ + /* Table 4.4.9 */ +-static uint8_t single_lfe_channel_element(NeAACDecHandle hDecoder, bitfile *ld, ++static uint8_t single_lfe_channel_element(NeAACDecStruct* hDecoder, bitfile *ld, + uint8_t channel, uint8_t *tag) + { + uint8_t retval = 0; +@@ -631,7 +630,7 @@ + } + + /* Table 4.4.5 */ +-static uint8_t channel_pair_element(NeAACDecHandle hDecoder, bitfile *ld, ++static uint8_t channel_pair_element(NeAACDecStruct* hDecoder, bitfile *ld, + uint8_t channels, uint8_t *tag) + { + ALIGN int16_t spec_data1[1024] = {0}; +@@ -761,7 +760,7 @@ + } + + /* Table 4.4.6 */ +-static uint8_t ics_info(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld, ++static uint8_t ics_info(NeAACDecStruct* hDecoder, ic_stream *ics, bitfile *ld, + uint8_t common_window) + { + uint8_t retval = 0; +@@ -912,7 +911,7 @@ + + #ifdef COUPLING_DEC + /* Table 4.4.8: Currently just for skipping the bits... */ +-static uint8_t coupling_channel_element(NeAACDecHandle hDecoder, bitfile *ld) ++static uint8_t coupling_channel_element(NeAACDecStruct* hDecoder, bitfile *ld) + { + uint8_t c, result = 0; + uint8_t ind_sw_cce_flag = 0; +@@ -1005,7 +1004,7 @@ + #endif + + /* Table 4.4.10 */ +-static uint16_t data_stream_element(NeAACDecHandle hDecoder, bitfile *ld) ++static uint16_t data_stream_element(NeAACDecStruct* hDecoder, bitfile *ld) + { + uint8_t byte_aligned; + uint16_t i, count; +@@ -1034,7 +1033,7 @@ + } + + /* Table 4.4.11 */ +-static uint8_t fill_element(NeAACDecHandle hDecoder, bitfile *ld, drc_info *drc ++static uint8_t fill_element(NeAACDecStruct* hDecoder, bitfile *ld, drc_info *drc + #ifdef SBR_DEC + ,uint8_t sbr_ele + #endif +@@ -1213,7 +1212,7 @@ + + #ifdef DRM + /* Table 4.4.13 ASME */ +-void DRM_aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, ++void DRM_aac_scalable_main_element(NeAACDecStruct* hDecoder, NeAACDecFrameInfo *hInfo, + bitfile *ld, program_config *pce, drc_info *drc) + { + uint8_t retval = 0; +@@ -1423,7 +1422,7 @@ + } + + /* Table 4.4.15 */ +-static int8_t DRM_aac_scalable_main_header(NeAACDecHandle hDecoder, ic_stream *ics1, ic_stream *ics2, ++static int8_t DRM_aac_scalable_main_header(NeAACDecStruct* hDecoder, ic_stream *ics1, ic_stream *ics2, + bitfile *ld, uint8_t this_layer_stereo) + { + uint8_t retval = 0; +@@ -1491,7 +1490,7 @@ + } + #endif + +-static uint8_t side_info(NeAACDecHandle hDecoder, element *ele, ++static uint8_t side_info(NeAACDecStruct* hDecoder, element *ele, + bitfile *ld, ic_stream *ics, uint8_t scal_flag) + { + uint8_t result; +@@ -1584,7 +1583,7 @@ + } + + /* Table 4.4.24 */ +-static uint8_t individual_channel_stream(NeAACDecHandle hDecoder, element *ele, ++static uint8_t individual_channel_stream(NeAACDecStruct* hDecoder, element *ele, + bitfile *ld, ic_stream *ics, uint8_t scal_flag, + int16_t *spec_data) + { +@@ -1644,7 +1643,7 @@ + } + + /* Table 4.4.25 */ +-static uint8_t section_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld) ++static uint8_t section_data(NeAACDecStruct* hDecoder, ic_stream *ics, bitfile *ld) + { + uint8_t g; + uint8_t sect_esc_val, sect_bits; +@@ -1891,7 +1890,7 @@ + } + + /* Table 4.4.26 */ +-static uint8_t scale_factor_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld) ++static uint8_t scale_factor_data(NeAACDecStruct* hDecoder, ic_stream *ics, bitfile *ld) + { + uint8_t ret = 0; + #ifdef PROFILE +@@ -1999,7 +1998,7 @@ + + #ifdef LTP_DEC + /* Table 4.4.28 */ +-static uint8_t ltp_data(NeAACDecHandle hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld) ++static uint8_t ltp_data(NeAACDecStruct* hDecoder, ic_stream *ics, ltp_info *ltp, bitfile *ld) + { + uint8_t sfb, w; + +@@ -2062,7 +2061,7 @@ + #endif + + /* Table 4.4.29 */ +-static uint8_t spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld, ++static uint8_t spectral_data(NeAACDecStruct* hDecoder, ic_stream *ics, bitfile *ld, + int16_t *spectral_data) + { + int8_t i; +diff -urNad faad2-svn~/libfaad/syntax.h faad2-svn/libfaad/syntax.h +--- faad2-svn~/libfaad/syntax.h 2007-11-28 23:28:14.000000000 +0000 ++++ faad2-svn/libfaad/syntax.h 2007-11-28 23:29:27.000000000 +0000 +@@ -35,7 +35,6 @@ + extern "C" { + #endif + +-#include "decoder.h" + #include "bits.h" + + #define MAIN 1 +@@ -113,12 +112,12 @@ + + uint8_t adts_frame(adts_header *adts, bitfile *ld); + void get_adif_header(adif_header *adif, bitfile *ld); +-void raw_data_block(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, ++void raw_data_block(NeAACDecStruct* hDecoder, NeAACDecFrameInfo *hInfo, + bitfile *ld, program_config *pce, drc_info *drc); +-uint8_t reordered_spectral_data(NeAACDecHandle hDecoder, ic_stream *ics, bitfile *ld, ++uint8_t reordered_spectral_data(NeAACDecStruct* hDecoder, ic_stream *ics, bitfile *ld, + int16_t *spectral_data); + #ifdef DRM +-void DRM_aac_scalable_main_element(NeAACDecHandle hDecoder, NeAACDecFrameInfo *hInfo, ++void DRM_aac_scalable_main_element(NeAACDecStruct* hDecoder, NeAACDecFrameInfo *hInfo, + bitfile *ld, program_config *pce, drc_info *drc); + #endif + diff --git a/media/libs/faad2/faad2.SlackBuild b/media/libs/faad2/faad2.SlackBuild index 9329ee8b..d2dfb73d 100755 --- a/media/libs/faad2/faad2.SlackBuild +++ b/media/libs/faad2/faad2.SlackBuild @@ -1,109 +1,168 @@ #!/bin/bash # -# faad2.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# faad2.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# faad2.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# faad2.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for faad2 -# by rafael at riseup.net +# slackbuild for faad2, by Silvio Rhatto +# requires: +# tested: faad2-2.6.1 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building faad2 are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="faad2" +# Set variables +CWD="$(pwd)" +SRC_NAME="faad2" +PKG_NAME="faad2" ARCH=${ARCH:=i486} -VERSION=${VERSION:=2.0} -BUILD=${BUILD:=1rd} -SRC_DIR=${SRC:=$CWD} +SRC_VERSION=${VERSION:=2.6.1} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--with-docdir=/usr/doc/$PKG_NAME-$VERSION"} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://ufpr.dl.sourceforge.net/sourceforge/faac/$SRC" +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" -fi - -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP - -tar xvf$tarflag $SRC_DIR/$SRC -cd $PACKAGE - -autoreconf -vif -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --with-docdir=/usr/doc/$PACKAGE-$VERSION +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://downloads.sourceforge.net/faac/$SRC" -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p0 < $CWD/$PACKAGE-$VERSION.diff +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install - -CWD="`pwd`" +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -cd $TMP/package-$PACKAGE +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +autoreconf -vif +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler--------------------------------------------------------| faad2: faad2 (faad2 is a free Advanced Audio Decoder) faad2: faad2: Faad2 is a free Advanced Audio Decoder. @@ -115,18 +174,13 @@ faad2: faad2: faad2: http://www.audiocoding.com/ faad2: -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +EODESC -for file in AUTHORS COPYING ChangeLog INSTALL NEWS README TODO;do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/glitz/glitz.SlackBuild b/media/libs/glitz/glitz.SlackBuild index 92541d75..12a86a36 100755 --- a/media/libs/glitz/glitz.SlackBuild +++ b/media/libs/glitz/glitz.SlackBuild @@ -1,113 +1,167 @@ #!/bin/bash # -# glitz.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# glitz.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# glitz.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# glitz.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for glitz -# by rhatto at riseup.net +# slackbuild for glitz, by Silvio Rhatto +# requires: +# tested: glitz-0.5.6 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building glitz are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="glitz" +# Set variables +CWD="$(pwd)" +SRC_NAME="glitz" +PKG_NAME="glitz" ARCH=${ARCH:=i486} -VERSION=${VERSION:=0.5.6} +SRC_VERSION=${VERSION:=0.5.6} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -# ------- error codes for createpkg -------------- +# Set error codes (used by createpkg) ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 -ERROR_TAR=37; ERROR_MKPKG=38 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://cairographics.org/snapshots/$SRC" +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://cairographics.org/snapshots/$SRC" -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP - -tar xvf$tarflag $SRC_DIR/$SRC || exit $ERROR_TAR -cd $PACKAGE-$VERSION +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done fi -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF -make || exit $ERROR_MAKE -make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL - -CWD="`pwd`" - -cd $TMP/package-$PACKAGE - -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog NEWS README TODO" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler--------------------------------------------------------| glitz: glitz glitz: glitz: Glitz is an OpenGL image compositing library. Glitz provides @@ -119,20 +173,13 @@ glitz: glitz: glitz: glitz: -EOF +EODESC -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION - -DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO" - -for file in $DOCS; do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/gst-ffmpeg/gst-ffmpeg.SlackBuild b/media/libs/gst-ffmpeg/gst-ffmpeg.SlackBuild new file mode 100644 index 00000000..3846e235 --- /dev/null +++ b/media/libs/gst-ffmpeg/gst-ffmpeg.SlackBuild @@ -0,0 +1,149 @@ +#!/bin/bash +# +# gst-ffmpeg.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# gst-ffmpeg.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for gst-ffmpeg, by Rafael Diniz +# requires: gstreamer gst-plugins-base ffmpeg +# tested: gst-ffmpeg-0.10.4 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="gst-ffmpeg" +PKG_NAME="gst-ffmpeg" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.10.4} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rd} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --with-docdir=/usr/doc/$PKG_NAME-$PKG_VERSION"} +NUMJOBS=${NUMJOBS:="-j3"} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://gstreamer.freedesktop.org/src/gst-ffmpeg/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +./configure --prefix="$PREFIX" --libdir="$LIBDIR" || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler---------------------------------------------------| +gst-ffmpeg: gst-ffmpeg (ffmpeg plugin for gstreamer) +gst-ffmpeg: +gst-ffmpeg: FFmpeg plugin for gstreamer. +gst-ffmpeg: +gst-ffmpeg: +gst-ffmpeg: +gst-ffmpeg: +gst-ffmpeg: +gst-ffmpeg: +gst-ffmpeg: http://gstreamer.freedesktop.org/ +gst-ffmpeg: +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/media/libs/gst-ffmpeg/slack-required b/media/libs/gst-ffmpeg/slack-required new file mode 100644 index 00000000..5ff9a046 --- /dev/null +++ b/media/libs/gst-ffmpeg/slack-required @@ -0,0 +1,6 @@ +# Dependency list to gst-ffmpeg +# +# dependency [condition] [version]] +gstreamer +gst-plugins-base +ffmpeg diff --git a/media/libs/gst-plugins-bad/gst-plugins-bad.SlackBuild b/media/libs/gst-plugins-bad/gst-plugins-bad.SlackBuild new file mode 100755 index 00000000..5c912172 --- /dev/null +++ b/media/libs/gst-plugins-bad/gst-plugins-bad.SlackBuild @@ -0,0 +1,153 @@ +#!/bin/bash +# +# gst-plugins-bad.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# gst-plugins-bad.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for gst-plugins-bad, by Rafael Diniz +# requires: gstreamer gst-plugins-base +# tested: gst-plugins-bad-0.10.7 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="gst-plugins-bad" +PKG_NAME="gst-plugins-bad" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.10.7} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rd} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --with-docdir=/usr/doc/$PKG_NAME-$PKG_VERSION"} +NUMJOBS=${NUMJOBS:="-j3"} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://gstreamer.freedesktop.org/src/gst-plugins-bad/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler----------------------------------------------| +gst-plugins-bad: gst-plugins-bad (plugins for gstreamer) +gst-plugins-bad: +gst-plugins-bad: Free Software plugins for gstreamer with problems +gst-plugins-bad: related to quality. +gst-plugins-bad: +gst-plugins-bad: +gst-plugins-bad: +gst-plugins-bad: +gst-plugins-bad: +gst-plugins-bad: http://gstreamer.freedesktop.org/ +gst-plugins-bad: +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/media/libs/gst-plugins-bad/slack-required b/media/libs/gst-plugins-bad/slack-required new file mode 100644 index 00000000..6f90752f --- /dev/null +++ b/media/libs/gst-plugins-bad/slack-required @@ -0,0 +1,5 @@ +# Dependency list to gst-plugins-bad +# +# dependency [condition] [version]] +gstreamer +gst-plugins-base diff --git a/media/libs/gst-plugins-base/gst-plugins-base.SlackBuild b/media/libs/gst-plugins-base/gst-plugins-base.SlackBuild new file mode 100755 index 00000000..466113bd --- /dev/null +++ b/media/libs/gst-plugins-base/gst-plugins-base.SlackBuild @@ -0,0 +1,153 @@ +#!/bin/bash +# +# gst-plugins-base.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# gst-plugins-base.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for gst-plugins-base, by Rafael Diniz +# requires: gstreamer +# tested: gst-plugins-base-0.10.19 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="gst-plugins-base" +PKG_NAME="gst-plugins-base" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.10.19} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rd} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --with-docdir=/usr/doc/$PKG_NAME-$PKG_VERSION"} +NUMJOBS=${NUMJOBS:="-j3"} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://gstreamer.freedesktop.org/src/gst-plugins-base/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler---------------------------------------------| +gst-plugins-base: gst-plugins-base (plugins for gstreamer) +gst-plugins-base: +gst-plugins-base: Base plugins for gstreamer, you need this to get gstreamer +gst-plugins-base: working. +gst-plugins-base: +gst-plugins-base: +gst-plugins-base: +gst-plugins-base: +gst-plugins-base: +gst-plugins-base: http://gstreamer.freedesktop.org/ +gst-plugins-base: +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/media/libs/gst-plugins-base/slack-required b/media/libs/gst-plugins-base/slack-required new file mode 100644 index 00000000..60982360 --- /dev/null +++ b/media/libs/gst-plugins-base/slack-required @@ -0,0 +1,4 @@ +# Dependency list to gst-plugins-base +# +# dependency [condition] [version]] +gstreamer diff --git a/media/libs/gst-plugins-good/gst-plugins-good.SlackBuild b/media/libs/gst-plugins-good/gst-plugins-good.SlackBuild new file mode 100755 index 00000000..1776b5ac --- /dev/null +++ b/media/libs/gst-plugins-good/gst-plugins-good.SlackBuild @@ -0,0 +1,153 @@ +#!/bin/bash +# +# gst-plugins-good.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# gst-plugins-good.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for gst-plugins-good, by Rafael Diniz +# requires: gstreamer gst-plugins-base +# tested: gst-plugins-good-0.10.8 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="gst-plugins-good" +PKG_NAME="gst-plugins-good" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.10.8} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rd} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --with-docdir=/usr/doc/$PKG_NAME-$PKG_VERSION"} +NUMJOBS=${NUMJOBS:="-j3"} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://gstreamer.freedesktop.org/src/gst-plugins-good/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler---------------------------------------------| +gst-plugins-good: gst-plugins-good (plugins for gstreamer) +gst-plugins-good: +gst-plugins-good: Free Software plugins for gstreamer with no problems +gst-plugins-good: related to patents. +gst-plugins-good: +gst-plugins-good: +gst-plugins-good: +gst-plugins-good: +gst-plugins-good: +gst-plugins-good: http://gstreamer.freedesktop.org/ +gst-plugins-good: +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/media/libs/gst-plugins-good/slack-required b/media/libs/gst-plugins-good/slack-required new file mode 100644 index 00000000..dad684cf --- /dev/null +++ b/media/libs/gst-plugins-good/slack-required @@ -0,0 +1,5 @@ +# Dependency list to gst-plugins-good +# +# dependency [condition] [version]] +gstreamer +gst-plugins-base diff --git a/media/libs/gst-plugins-ugly/gst-plugins-ugly.SlackBuild b/media/libs/gst-plugins-ugly/gst-plugins-ugly.SlackBuild new file mode 100755 index 00000000..6736cd92 --- /dev/null +++ b/media/libs/gst-plugins-ugly/gst-plugins-ugly.SlackBuild @@ -0,0 +1,153 @@ +#!/bin/bash +# +# gst-plugins-ugly.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# gst-plugins-ugly.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for gst-plugins-ugly, by Rafael Diniz +# requires: gstreamer gst-plugins-base +# tested: gst-plugins-ugly-0.10.8 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="gst-plugins-ugly" +PKG_NAME="gst-plugins-ugly" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.10.8} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rd} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --with-docdir=/usr/doc/$PKG_NAME-$PKG_VERSION"} +NUMJOBS=${NUMJOBS:="-j3"} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://gstreamer.freedesktop.org/src/gst-plugins-ugly/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler---------------------------------------------| +gst-plugins-ugly: gst-plugins-ugly (plugins for gstreamer) +gst-plugins-ugly: +gst-plugins-ugly: Free Software plugins for gstreamer with problems +gst-plugins-ugly: related to patents. +gst-plugins-ugly: +gst-plugins-ugly: +gst-plugins-ugly: +gst-plugins-ugly: +gst-plugins-ugly: +gst-plugins-ugly: http://gstreamer.freedesktop.org/ +gst-plugins-ugly: +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/media/libs/gst-plugins-ugly/slack-required b/media/libs/gst-plugins-ugly/slack-required new file mode 100644 index 00000000..d4fa6ac2 --- /dev/null +++ b/media/libs/gst-plugins-ugly/slack-required @@ -0,0 +1,5 @@ +# Dependency list to gst-plugins-ugly +# +# dependency [condition] [version]] +gstreamer +gst-plugins-base diff --git a/media/libs/gstreamer/gstreamer.SlackBuild b/media/libs/gstreamer/gstreamer.SlackBuild new file mode 100755 index 00000000..5941669a --- /dev/null +++ b/media/libs/gstreamer/gstreamer.SlackBuild @@ -0,0 +1,153 @@ +#!/bin/bash +# +# gstreamer.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# gstreamer.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for gstreamer, by Rafael Diniz +# requires: +# tested: gstreamer-0.10.19 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="gstreamer" +PKG_NAME="gstreamer" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.10.19} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rd} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --with-docdir=/usr/doc/$PKG_NAME-$PKG_VERSION"} +NUMJOBS=${NUMJOBS:="-j3"} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://gstreamer.freedesktop.org/src/gstreamer/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler----------------------------------------------------| +gstreamer: gstreamer (gstreamer is a multimedia library) +gstreamer: +gstreamer: GStreamer is a library for constructing of graphs of media-handling +gstreamer: components. The use cases it covers range from simple Ogg/Vorbis +gstreamer: playback, audio/video streaming to complex audio (mixing) and video +gstreamer: (non-linear editing) processing. +gstreamer: +gstreamer: +gstreamer: +gstreamer: http://gstreamer.freedesktop.org/ +gstreamer: +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/media/libs/ilmbase/ilmbase.SlackBuild b/media/libs/ilmbase/ilmbase.SlackBuild new file mode 100755 index 00000000..d391f141 --- /dev/null +++ b/media/libs/ilmbase/ilmbase.SlackBuild @@ -0,0 +1,185 @@ +#!/bin/bash +# +# ilmbase.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# ilmbase.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for ilmbase, by Silvio Rhatto +# requires: +# tested: ilmbase-1.0.1 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="ilmbase" +PKG_NAME="ilmbase" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=1.0.1} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://download.savannah.nongnu.org/releases/openexr/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done + +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done +fi + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog LICENSE NEWS README" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +ilmbase: ilmbase +ilmbase: +ilmbase: OpenEXR ILM Base libraries +ilmbase: +ilmbase: +ilmbase: +ilmbase: +ilmbase: +ilmbase: +ilmbase: +ilmbase: +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/media/libs/imlib2/imlib2.SlackBuild b/media/libs/imlib2/imlib2.SlackBuild index eaa49e71..93e3c18f 100755 --- a/media/libs/imlib2/imlib2.SlackBuild +++ b/media/libs/imlib2/imlib2.SlackBuild @@ -1,106 +1,136 @@ #!/bin/bash # -# imlib2.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# imlib2.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# imlib2.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# imlib2.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for imlib2 -# by rhatto at riseup.net +# slackbuild for imlib2, by Alexandre Vieira de Souza +# requires: +# tested: imlib2-1.4.1 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building imlib2 are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="imlib2" +# Set variables +CWD="$(pwd)" +SRC_NAME="imlib2" +PKG_NAME="imlib2" ARCH=${ARCH:=i486} -VERSION="`date +%Y%m%d`" -BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_VERSION=${VERSION:=1.4.1} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1avs} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:="-j4"} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -# ------- error codes for createpkg -------------- +# Set error codes (used by createpkg) ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 -ERROR_PATCH=40; ERROR_VCS=41 - -SRC_DIR="$SRC_DIR/efl" -mkdir -p $SRC_DIR - -if [ -d "$SRC_DIR/e17/libs/imlib2" ]; then - cd $SRC_DIR/e17/libs/imlib2 - cvs update || exit $ERROR_VCS -else - cd $SRC_DIR - # echo "Please hit ENTER on passwd prompt..." - # cvs -d:pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e login || exit $ERROR_VCS - cvs -z3 -d:pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e co e17/libs/imlib2 || exit $ERROR_VCS -fi - -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -cd $SRC_DIR/e17/libs/imlib2 +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -make clean &> /dev/null -./autogen.sh --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF -make || exit $ERROR_MAKE -make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -CWD="`pwd`" +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://prdownloads.sourceforge.net/enlightenment/$SRC" -cd $TMP/package-$PACKAGE +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| -imlib2: imlib2 + |-----handy-ruler-------------------------------------------------------| +imlib2: imlib2 by Slack.Sarava imlib2: imlib2: This is the Imlib 2 library - a library that does image file loading imlib2: and saving as well as rendering, manipulation, arbitrary polygon @@ -108,25 +138,16 @@ imlib2: support, etc. imlib2: imlib2: imlib2: +imlib2: by avs imlib2: imlib2: -imlib2: -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION - -DOCS="AUTHORS COPYING ChangeLog CHANGELOG INSTALL NEWS README TODO" +EODESC -for file in $DOCS; do - if [ -f "$CWD/$file" ]; then - cp $CWD/$file usr/doc/$PACKAGE-$VERSION/ - fi -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/ladspa/ladspa.SlackBuild b/media/libs/ladspa/ladspa.SlackBuild index 1929185c..432f9d63 100755 --- a/media/libs/ladspa/ladspa.SlackBuild +++ b/media/libs/ladspa/ladspa.SlackBuild @@ -1,121 +1,175 @@ #!/bin/bash # -# ladspa.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# ladspa.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# ladspa.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# ladspa.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for ladspa -# by rhatto at riseup.net +# slackbuild for ladspa, by Silvio Rhatto +# requires: +# tested: ladspa-1.13 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building ladspa are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="ladspa" +# Set variables +CWD="$(pwd)" +SRC_NAME="ladspa_sdk" +PKG_NAME="ladspa" ARCH=${ARCH:=i486} -VERSION=${VERSION:=1.13} +SRC_VERSION=${VERSION:=1.13} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -# ------- error codes for createpkg -------------- +# Set error codes (used by createpkg) ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 -ERROR_TAR=37; ERROR_MKPKG=38 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -RTOOL="wget" -PACKAGE_EXT="tgz" -SRC="$PACKAGE"_sdk_"$VERSION.$PACKAGE_EXT" -URL="http://www.ladspa.org/download/$SRC" +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then +# Dowload source if necessary +SRC="$SRC_NAME"_"$VERSION.tgz" +URL="http://www.ladspa.org/download/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gzip -t "$SRC_DIR/$SRC" 2> /dev/null; then wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP - -tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR -cd "$PACKAGE"_sdk +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done fi +# Configure cd src - -# for mkdirhier -export PATH="$PATH:/usr/X11R6/bin/" +export PATH="$PATH:/usr/X11R6/bin/" # for mkdirhier sed -e 's/\/usr\/local\/lib\/ladspa\//\/usr\/lib\/ladspa\//' \ -e 's/\/usr\/local\/bin\//\/usr\/bin\//' makefile > makefile.tmp || exit $ERROR_CONF -echo "PREFIX = $TMP/package-$PACKAGE" >> makefile.tmp || exit $ERROR_CONF +echo "PREFIX = $PKG" >> makefile.tmp || exit $ERROR_CONF sed -e 's/$(INSTALL_PLUGINS_DIR)/$(PREFIX)\/$(INSTALL_PLUGINS_DIR)/g' \ -e 's/$(INSTALL_INCLUDE_DIR)/$(PREFIX)\/$(INSTALL_INCLUDE_DIR)/g' \ -e 's/$(INSTALL_BINARY_DIR)/$(PREFIX)\/$(INSTALL_BINARY_DIR)/g' makefile.tmp > makefile || exit $ERROR_CONF -make || exit $ERROR_MAKE -make install || exit $ERROR_INSTALL -cd .. - -CWD="`pwd`" +# Compile +make $NUMJOBS || exit $ERROR_MAKE -cd $TMP/package-$PACKAGE +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL +cd .. -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="README doc/*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler-------------------------------------------------------| ladspa: ladspa (linux audio developer's plugin API) ladspa: ladspa: The Linux Audio Developer's Simple Plugin API (LADSPA) attempts to @@ -127,20 +181,13 @@ ladspa: ladspa: ladspa: ladspa: -EOF +EODESC -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION - -DOCS="COPYING *html" - -for file in $DOCS; do - cp $CWD/docs/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/libdv/libdv.SlackBuild b/media/libs/libdv/libdv.SlackBuild index 7941a2e8..75b76578 100755 --- a/media/libs/libdv/libdv.SlackBuild +++ b/media/libs/libdv/libdv.SlackBuild @@ -1,116 +1,167 @@ #!/bin/bash # -# libdv.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# libdv.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# libdv.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# libdv.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for libdv -# by rafael at riseup.net +# slackbuild for libdv, by Silvio Rhatto +# requires: +# tested: libdv-1.0.0 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building libdv are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="libdv" +# Set variables +CWD="$(pwd)" +SRC_NAME="libdv" +PKG_NAME="libdv" ARCH=${ARCH:=i486} -VERSION=${VERSION:=1.0.0} -BUILD=${BUILD:=1rd} -SRC_DIR=${SRC:=$CWD} +SRC_VERSION=${VERSION:=1.0.0} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - LIBDIR=/usr/lib64 - export LDFLAGS="$LDFLAGS -L/lib64 -L/usr/lib64 -fPIC" - export CFLAGS="$CFLAGS -fPIC" -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://superb-west.dl.sourceforge.net/sourceforge/libdv/$SRC" +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" -fi - - -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://downloads.sourceforge.net/libdv/$SRC" -tar xvf$tarflag $SRC_DIR/$SRC -cd $PACKAGE-$VERSION - -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -# apply debian patches, if exist -if [ -d "debian/patches" ]; then - for file in `ls debian/patches/*patch`; do - patch -p1 < $file +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done + +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi done fi -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install - -CWD="`pwd`" -cd $TMP/package-$PACKAGE - -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING COPYRIGHT ChangeLog NEWS README README.dvconnect README.encoder TODO" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler--------------------------------------------------------| libdv: libdv (libdv is a software codec for DV video) libdv: libdv: The Quasar DV codec (libdv) is a software codec for DV video, the @@ -122,21 +173,13 @@ libdv: libdv: http://libdv.sourceforge.net/ libdv: libdv: -EOF +EODESC -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION - -for file in AUTHORS COPYING COPYRIGHT ChangeLog INSTALL NEWS README README.dvconnect README.encoder TODO; do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -# install script -echo '( chroot . /sbin/ldconfig )' > install/doinst.sh - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/libdvbpsi/libdvbpsi.SlackBuild b/media/libs/libdvbpsi/libdvbpsi.SlackBuild new file mode 100755 index 00000000..59ef08e9 --- /dev/null +++ b/media/libs/libdvbpsi/libdvbpsi.SlackBuild @@ -0,0 +1,153 @@ +#!/bin/bash +# +# libdvbpsi.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# libdvbpsi.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for libdvbpsi, by Rafael Diniz +# requires: +# tested: libdvbpsi-0.1.6 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="libdvbpsi5" +PKG_NAME="libdvbpsi" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.1.6} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rd} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:="-j4"} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://download.videolan.org/pub/libdvbpsi/0.1.6/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler----------------------------------------------------| +libdvbpsi: libdvbpsi (a simple library for DVB PSI) +libdvbpsi: +libdvbpsi: +libdvbpsi: Libdvbpsi is a simple library designed for decoding and +libdvbpsi: generation of MPEG TS and DVB PSI tables. +libdvbpsi: +libdvbpsi: +libdvbpsi: +libdvbpsi: +libdvbpsi: http://www.videolan.org/developers/libdvbpsi.html +libdvbpsi: +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/media/libs/libexif-gtk/libexif-gtk.SlackBuild b/media/libs/libexif-gtk/libexif-gtk.SlackBuild index b96dd48e..0d683aed 100755 --- a/media/libs/libexif-gtk/libexif-gtk.SlackBuild +++ b/media/libs/libexif-gtk/libexif-gtk.SlackBuild @@ -1,111 +1,167 @@ #!/bin/bash # -# libexif-gtk.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# libexif-gtk.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# libexif-gtk.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# libexif-gtk.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for libexif-gtk -# by rhatto at riseup.net +# slackbuild for libexif-gtk, by Silvio Rhatto +# requires: +# tested: libexif-gtk-0.3.5 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building libexif-gtk are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="libexif-gtk" +# Set variables +CWD="$(pwd)" +SRC_NAME="libexif-gtk" +PKG_NAME="libexif-gtk" ARCH=${ARCH:=i486} -VERSION=${VERSION:=0.3.5} +SRC_VERSION=${VERSION:=0.3.5} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -# ------- error codes for createpkg -------------- +# Set error codes (used by createpkg) ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 -ERROR_PATCH=40 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -RTOOL="wget" -PACKAGE_EXT="bz2" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://easynews.dl.sourceforge.net/sourceforge/libexif/$SRC" +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.bz2" +URL="http://downloads.sourceforge.net/libexif/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP - -tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR -cd $PACKAGE-$VERSION +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH +if echo http://ftp.de.debian.org/debian/pool/main/libe/libexif-gtk/libexif-gtk_0.3.5-3.diff.gz | grep -q -v "PATCH URLS"; then + for patch_url in http://ftp.de.debian.org/debian/pool/main/libe/libexif-gtk/libexif-gtk_0.3.5-3.diff.gz; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done fi -# see http://blog.gmane.org/gmane.comp.graphics.libexif.devel/month=20060101 -export CFLAGS="-I/usr/include/libexif/" - -./configure --prefix=/usr --libdir=$LIBDIR || exit $ERROR_CONF -make || exit $ERROR_MAKE -make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL - -CWD="`pwd`" - -cd $TMP/package-$PACKAGE - -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler--------------------------------------------------| libexif-gtk: libexif-gtk (library to read and write EXIF data) libexif-gtk: libexif-gtk: Libexif reads and writes EXIF metainformation from and to image @@ -117,20 +173,13 @@ libexif-gtk: libexif-gtk: libexif-gtk: libexif-gtk: -EOF +EODESC -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION - -DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README" - -for file in $DOCS; do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/libgphoto2/libgphoto2.SlackBuild b/media/libs/libgphoto2/libgphoto2.SlackBuild index 83239a68..aaee17d6 100755 --- a/media/libs/libgphoto2/libgphoto2.SlackBuild +++ b/media/libs/libgphoto2/libgphoto2.SlackBuild @@ -10,13 +10,13 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # slackbuild for libgphoto2, by Rudson R. Alves # requires: -# tested: libgphoto2-2.4.0 +# tested: libgphoto2-2.4.2 # # Look for slackbuildrc @@ -31,7 +31,7 @@ CWD="$(pwd)" SRC_NAME="libgphoto2" PKG_NAME="libgphoto2" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=2.4.0} +SRC_VERSION=${VERSION:=2.4.2} PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rra} SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME @@ -55,8 +55,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2" + SLKCFLAGS="-O2 -fPIC" LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi # Set error codes (used by createpkg) @@ -86,7 +87,7 @@ fi # Untar cd "$PKG_WORK" tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR -PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $8 }'`" +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" cd "$PKG_SRC" # Configure @@ -122,9 +123,9 @@ done mkdir -p "$PKG/install" || exit $ERROR_MKDIR cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. diff --git a/media/libs/libiec61883/libiec61883.SlackBuild b/media/libs/libiec61883/libiec61883.SlackBuild index 3c88da73..3ff5578b 100755 --- a/media/libs/libiec61883/libiec61883.SlackBuild +++ b/media/libs/libiec61883/libiec61883.SlackBuild @@ -1,107 +1,167 @@ #!/bin/bash # -# libiec61883.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# libiec61883.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# libiec61883.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# libiec61883.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for libiec61883 -# by rafael at riseup.net +# slackbuild for libiec61883, by Silvio Rhatto +# requires: libraw1394 +# tested: libiec61883-1.1.0 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building libiec61883 are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="libiec61883" +# Set variables +CWD="$(pwd)" +SRC_NAME="libiec61883" +PKG_NAME="libiec61883" ARCH=${ARCH:=i486} -VERSION=${VERSION:=1.1.0} -BUILD=${BUILD:=1rd} -SRC_DIR=${SRC:=$CWD} +SRC_VERSION=${VERSION:=1.1.0} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --with-docdir=/usr/doc/$PKG_NAME-$VERSION"} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://www.linux1394.org/dl/$SRC" +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi - -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" -fi +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP - -tar xvf$tarflag $SRC_DIR/$SRC -cd $PACKAGE-$VERSION +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://www.linux1394.org/dl/$SRC" -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --with-docdir=/usr/doc/$PACKAGE-$VERSION -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install - -CWD="`pwd`" +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -cd $TMP/package-$PACKAGE +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler--------------------------------------------------| libiec61883: libiec61883 (libiec61883 is Firewire video related library) libiec61883: libiec61883: This library is an implementation of IEC 61883, part 1 (CIP, plug @@ -113,18 +173,13 @@ libiec61883: libiec61883: libiec61883: http://www.linux1394.org/ libiec61883: -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +EODESC -for file in AUTHORS COPYING ChangeLog INSTALL NEWS README;do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/libiec61883/slack-required b/media/libs/libiec61883/slack-required index 8bc743d3..af18a966 100644 --- a/media/libs/libiec61883/slack-required +++ b/media/libs/libiec61883/slack-required @@ -1 +1,4 @@ -libraw1394 +# Dependency list to libiec61883 +# +# dependency [condition] [version]] +libraw1394 diff --git a/media/libs/libjackasyn/libjackasyn.SlackBuild b/media/libs/libjackasyn/libjackasyn.SlackBuild index ce0e4219..6139a884 100755 --- a/media/libs/libjackasyn/libjackasyn.SlackBuild +++ b/media/libs/libjackasyn/libjackasyn.SlackBuild @@ -1,108 +1,167 @@ #!/bin/bash # -# libjackasyn.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# libjackasyn.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# libjackasyn.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# libjackasyn.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for libjackasyn -# by rhatto at riseup.net +# slackbuild for libjackasyn, by Silvio Rhatto +# requires: jack +# tested: libjackasyn-0.13 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building libjackasyn are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="libjackasyn" +# Set variables +CWD="$(pwd)" +SRC_NAME="libjackasyn" +PKG_NAME="libjackasyn" ARCH=${ARCH:=i486} -VERSION=${VERSION:=0.13} +SRC_VERSION=${VERSION:=0.13} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -# ------- error codes for createpkg -------------- +# Set error codes (used by createpkg) ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 -ERROR_PATCH=40 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://gige.xdv.org/libjackasyn/download/$SRC" +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://gige.xdv.org/libjackasyn/download/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP - -tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR -cd $PACKAGE-$VERSION +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done fi -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF -make || exit $ERROR_MAKE -make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF -CWD="`pwd`" +# Compile +make $NUMJOBS || exit $ERROR_MAKE -cd $TMP/package-$PACKAGE +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) -mkdir install -cat << EOF > install/slack-desc +# Install documentation +DOCS="AUTHORS CHANGELOG COPYING README TODO WORKING" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler--------------------------------------------------| libjackasyn: libjackasyn libjackasyn: libjackasyn: libjackasyn is a library that allows you to use programs written @@ -114,20 +173,13 @@ libjackasyn: libjackasyn: libjackasyn: libjackasyn: -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +EODESC -DOCS="AUTHORS CHANGELOG COPYING README TODO WORKING" - -for file in $DOCS; do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/libjackasyn/slack-required b/media/libs/libjackasyn/slack-required index b0b1dbc6..831cf00d 100644 --- a/media/libs/libjackasyn/slack-required +++ b/media/libs/libjackasyn/slack-required @@ -1 +1,4 @@ -jack +# Dependency list to libjackasyn +# +# dependency [condition] [version]] +jack diff --git a/media/libs/libkipi/libkipi.SlackBuild b/media/libs/libkipi/libkipi.SlackBuild index 98ded78c..e78a0d4a 100755 --- a/media/libs/libkipi/libkipi.SlackBuild +++ b/media/libs/libkipi/libkipi.SlackBuild @@ -10,9 +10,9 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # slackbuild for libkipi, by Rudson R. Alves # requires: @@ -55,8 +55,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2" + SLKCFLAGS="-O2 -fPIC" LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi # Set error codes (used by createpkg) @@ -86,7 +87,7 @@ fi # Untar cd "$PKG_WORK" tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR -PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $8 }'`" +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" cd "$PKG_SRC" # Configure @@ -122,20 +123,20 @@ done mkdir -p "$PKG/install" || exit $ERROR_MKDIR cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. |-----handy-ruler------------------------------------------------------| libkipi: libkipi by Slack.Sarava libkipi: -libkipi: -libkipi: -libkipi: -libkipi: -libkipi: +libkipi: Kipi (KDE Image Plugin Interface) is an effort to develop a common +libkipi: plugin structure for Digikam, KimDaBa, Showimg and Gwenview. Its aim +libkipi: is to share image plugins among graphic applications. Kipi is based +libkipi: on the old digiKam plugins implementation and is maintened by digiKam +libkipi: team. libkipi: libkipi: libkipi: diff --git a/media/libs/liblo/liblo.SlackBuild b/media/libs/liblo/liblo.SlackBuild index 906f9b5a..f701cd7f 100755 --- a/media/libs/liblo/liblo.SlackBuild +++ b/media/libs/liblo/liblo.SlackBuild @@ -1,108 +1,167 @@ #!/bin/bash # -# liblo.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# liblo.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# liblo.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# liblo.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for liblo -# by rhatto at riseup.net +# slackbuild for liblo, by Silvio Rhatto +# requires: +# tested: liblo-0.25 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building liblo are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="liblo" +# Set variables +CWD="$(pwd)" +SRC_NAME="liblo" +PKG_NAME="liblo" ARCH=${ARCH:=i486} -VERSION=${VERSION:=0.23} +SRC_VERSION=${VERSION:=0.25} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -# ------- error codes for createpkg -------------- +# Set error codes (used by createpkg) ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 -ERROR_PATCH=40 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://easynews.dl.sourceforge.net/sourceforge/$PACKAGE/$SRC" +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://downloads.sourceforge.net/liblo/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP - -tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR -cd $PACKAGE-$VERSION +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done fi -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR || exit $ERROR_CONF -make || exit $ERROR_MAKE -make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF -CWD="`pwd`" +# Compile +make $NUMJOBS || exit $ERROR_MAKE -cd $TMP/package-$PACKAGE +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) -mkdir install -cat << EOF > install/slack-desc +# Install documentation +DOCS="AUTHORS COPYING ChangeLog NEWS README TODO" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler--------------------------------------------------------| liblo: liblo liblo: liblo: LibLO is a lightweight library for handling the sending and @@ -114,20 +173,13 @@ liblo: liblo: liblo: liblo: -EOF +EODESC -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION - -DOCS="AUTHORS COPYING ChangeLog NEWS README TODO" - -for file in $DOCS; do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/liblrdf/liblrdf.SlackBuild b/media/libs/liblrdf/liblrdf.SlackBuild index 7ce34e55..7bc71141 100755 --- a/media/libs/liblrdf/liblrdf.SlackBuild +++ b/media/libs/liblrdf/liblrdf.SlackBuild @@ -1,108 +1,167 @@ #!/bin/bash # -# liblrdf.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# liblrdf.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# liblrdf.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# liblrdf.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for liblrdf -# by rhatto at riseup.net +# slackbuild for liblrdf, by Silvio Rhatto +# requires: raptor ladspa +# tested: liblrdf-0.4.0 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building liblrdf are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="liblrdf" +# Set variables +CWD="$(pwd)" +SRC_NAME="liblrdf" +PKG_NAME="liblrdf" ARCH=${ARCH:=i486} -VERSION=${VERSION:=0.4.0} +SRC_VERSION=${VERSION:=0.4.0} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://easynews.dl.sourceforge.net/sourceforge/lrdf/$SRC" +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi - -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" -fi +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://downloads.sourceforge.net/lrdf/$SRC" -tar xvf$tarflag $SRC_DIR/$SRC -cd $PACKAGE-$VERSION - -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install - -CWD="`pwd`" +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -cd $TMP/package-$PACKAGE +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog NEWS README" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler------------------------------------------------------| liblrdf: liblrdf (lightweight RDF) liblrdf: liblrdf: Liblrdf is a lightweight RDF library with special support for @@ -114,18 +173,13 @@ liblrdf: liblrdf: liblrdf: liblrdf: -EOF +EODESC -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION - -for file in AUTHORS COPYING ChangeLog INSTALL NEWS README; do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/liblrdf/slack-required b/media/libs/liblrdf/slack-required index 6c92f463..9791d715 100644 --- a/media/libs/liblrdf/slack-required +++ b/media/libs/liblrdf/slack-required @@ -1 +1,5 @@ -ladspa +# Dependency list to liblrdf +# +# dependency [condition] [version]] +raptor +ladspa diff --git a/media/libs/libopenraw/libopenraw.SlackBuild b/media/libs/libopenraw/libopenraw.SlackBuild new file mode 100644 index 00000000..bdd7ca1b --- /dev/null +++ b/media/libs/libopenraw/libopenraw.SlackBuild @@ -0,0 +1,153 @@ +#!/bin/bash +# +# libopenraw.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# libopenraw.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for libopenraw, by Alexandre Vieira de Souza +# requires: boost +# tested: libopenraw-0.0.5 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="libopenraw" +PKG_NAME="libopenraw" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.0.5} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1avs} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:="-j4"} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://libopenraw.freedesktop.org/download/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler---------------------------------------------------| +libopenraw: libopenraw by Slack.Sarava +libopenraw: +libopenraw: libopenraw is an ongoing project to provide a free software +libopenraw: implementation for camera RAW files decoding. One of the main +libopenraw: reasons is that dcraw is not suited for easy integration into +libopenraw: applications, and there is a need for an easy to use API to +libopenraw: build free software digital image processing application. +libopenraw: It also has the goal to address missing feature from dcraw +libopenraw: like meta-data decoding and easy thumbnail extraction. +libopenraw: +libopenraw: by avs +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/media/libs/libopenraw/slack-required b/media/libs/libopenraw/slack-required new file mode 100644 index 00000000..c9ddde0d --- /dev/null +++ b/media/libs/libopenraw/slack-required @@ -0,0 +1,4 @@ +# Dependency list to libopenraw +# +# dependency [condition] [version]] +boost >= 1.34.1 diff --git a/media/libs/libquicktime/libquicktime.SlackBuild b/media/libs/libquicktime/libquicktime.SlackBuild index 48be1984..4f92a32a 100755 --- a/media/libs/libquicktime/libquicktime.SlackBuild +++ b/media/libs/libquicktime/libquicktime.SlackBuild @@ -1,108 +1,167 @@ #!/bin/bash # -# libquicktime.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# libquicktime.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# libquicktime.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# libquicktime.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for libquicktime -# by rafael at riseup.net +# slackbuild for libquicktime, by Silvio Rhatto +# requires: libx264 +# tested: libquicktime-1.0.3 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building libquicktime are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="libquicktime" +# Set variables +CWD="$(pwd)" +SRC_NAME="libquicktime" +PKG_NAME="libquicktime" ARCH=${ARCH:=i486} -VERSION=${VERSION:=1.0.2} -BUILD=${BUILD:=1rd} -SRC_DIR=${SRC:=$CWD} +SRC_VERSION=${VERSION:=1.0.3} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--with-docdir=/usr/doc/$PKG_NAME-$PKG_VERSION"} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://ufpr.dl.sourceforge.net/sourceforge/libquicktime/$SRC" +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi - -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" -fi +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://downloads.sourceforge.net/libquicktime/$SRC" -tar xvf$tarflag $SRC_DIR/$SRC -cd $PACKAGE-$VERSION - -# the current patch for 0.9.10 is required for newer libx264 -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -./configure --prefix=/usr --enable-gpl --sysconfdir=/etc --libdir=$LIBDIR --with-docdir=/usr/doc/$PACKAGE-$VERSION -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install - -CWD="`pwd`" +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -cd $TMP/package-$PACKAGE +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler-------------------------------------------------| libquicktime: libquicktime (libquicktime is a library for quicktime/avi/mp4 files) libquicktime: libquicktime: libquicktime is a library for reading and writing quicktime files. @@ -114,18 +173,13 @@ libquicktime: libquicktime: libquicktime: http://libquicktime.sourceforge.net/ libquicktime: -EOF +EODESC -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION - -for file in AUTHORS COPYING ChangeLog INSTALL NEWS README TODO;do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/libquicktime/slack-required b/media/libs/libquicktime/slack-required index 3e69b7cf..337e3583 100644 --- a/media/libs/libquicktime/slack-required +++ b/media/libs/libquicktime/slack-required @@ -1 +1,4 @@ -libx264 +# Dependency list to libquicktime +# +# dependency [condition] [version]] +libx264 diff --git a/media/libs/libsamplerate/libsamplerate.SlackBuild b/media/libs/libsamplerate/libsamplerate.SlackBuild index fb378797..26d9cd29 100755 --- a/media/libs/libsamplerate/libsamplerate.SlackBuild +++ b/media/libs/libsamplerate/libsamplerate.SlackBuild @@ -1,107 +1,167 @@ #!/bin/bash # -# libsamplerate.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# libsamplerate.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# libsamplerate.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# libsamplerate.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for libsamplerate -# by rafael at riseup.net +# slackbuild for libsamplerate, by Silvio Rhatto +# requires: +# tested: libsamplerate-0.1.4 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building libsamplerate are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="libsamplerate" +# Set variables +CWD="$(pwd)" +SRC_NAME="libsamplerate" +PKG_NAME="libsamplerate" ARCH=${ARCH:=i486} -VERSION=${VERSION:=0.1.2} -BUILD=${BUILD:=1rd} -SRC_DIR=${SRC:=$CWD} +SRC_VERSION=${VERSION:=0.1.4} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://www.mega-nerd.com/SRC/$SRC" +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi - -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" -fi +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP - -tar xvf$tarflag $SRC_DIR/$SRC -cd $PACKAGE-$VERSION +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://www.mega-nerd.com/SRC/$SRC" -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --with-docdir=/usr/doc/$PACKAGE-$VERSION -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install - -CWD="`pwd`" +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -cd $TMP/package-$PACKAGE +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler------------------------------------------------| libsamplerate: libsamplerate (libsamplerate is library for samplerate conversions) libsamplerate: libsamplerate: Secret Rabbit Code (aka libsamplerate) is a Sample Rate Converter @@ -113,18 +173,13 @@ libsamplerate: downsampling by a factor of 256 to upsampling by the same factor. libsamplerate: Arbitrary in this case means that the ratio of input and output libsamplerate: sample rates can be an irrational number. The conversion ratio can libsamplerate: also vary with time for speeding up and slowing down effects. -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +EODESC -for file in AUTHORS COPYING ChangeLog INSTALL NEWS README;do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/libsndfile/libsndfile.SlackBuild b/media/libs/libsndfile/libsndfile.SlackBuild index cee2454d..80422164 100755 --- a/media/libs/libsndfile/libsndfile.SlackBuild +++ b/media/libs/libsndfile/libsndfile.SlackBuild @@ -1,108 +1,167 @@ #!/bin/bash # -# libsndfile.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# libsndfile.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# libsndfile.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# libsndfile.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for libsndfile -# by rafael at riseup.net +# slackbuild for libsndfile, by Silvio Rhatto +# requires: +# tested: libsndfile-1.0.17 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building libsndfile are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="libsndfile" +# Set variables +CWD="$(pwd)" +SRC_NAME="libsndfile" +PKG_NAME="libsndfile" ARCH=${ARCH:=i486} -VERSION=${VERSION:=1.0.17} -BUILD=${BUILD:=1rd} -SRC_DIR=${SRC:=$CWD} +SRC_VERSION=${VERSION:=1.0.17} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--disable-flac --sysconfdir=/etc --with-docdir=/usr/doc/$PKG_NAME-$VERSION"} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://www.mega-nerd.com/libsndfile/$SRC" +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi - -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" -fi +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP - -tar xvf$tarflag $SRC_DIR/$SRC -cd $PACKAGE-$VERSION +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://www.mega-nerd.com/libsndfile/$SRC" -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -# lets disable flac, as the build is broke -./configure --disable-flac --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --with-docdir=/usr/doc/$PACKAGE-$VERSION -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install - -CWD="`pwd`" +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -cd $TMP/package-$PACKAGE +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler---------------------------------------------------| libsndfile: libsndfile (libsndfile is a library for audio manipulation) libsndfile: libsndfile: Libsndfile is a C library for reading and writing files containing @@ -114,18 +173,13 @@ libsndfile: libsndfile: libsndfile: http://www.mega-nerd.com/libsndfile/ libsndfile: -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +EODESC -for file in AUTHORS COPYING ChangeLog INSTALL NEWS README TODO;do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/libx264/libx264.SlackBuild b/media/libs/libx264/libx264.SlackBuild index 8c2957a1..eb2c4e20 100755 --- a/media/libs/libx264/libx264.SlackBuild +++ b/media/libs/libx264/libx264.SlackBuild @@ -1,122 +1,167 @@ #!/bin/bash # -# libx264.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# libx264.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# libx264.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# libx264.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for libx264 -# by rafael at riseup.net +# slackbuild for libx264, by Silvio Rhatto +# requires: yasm +# tested: libx264-20080714 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building libx264 are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="libx264" +# Set variables +CWD="$(pwd)" +SRC_NAME="libx264" +PKG_NAME="libx264" ARCH=${ARCH:=i486} -VERSION=${VERSION:=20080512} -BUILD=${BUILD:=1rd} -SRC_DIR=${SRC:=$CWD} +SRC_VERSION=${VERSION:=20080729} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--enable-shared --enable-visualize --enable-pic"} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -RTOOL="wget" -PACKAGE_EXT="bz2" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-$VERSION-2245.tar.$PACKAGE_EXT" +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" -fi +# Dowload source if necessary +SRC="x264-snapshot-$VERSION-2245.tar.bz2" +URL="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/$SRC" -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP - -tar xvf$tarflag $SRC_DIR/$SRC - -mv x264-snapshot-$VERSION-2245 $PACKAGE-$VERSION - -cd $PACKAGE-$VERSION - -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -# These hacks are needed because x264 do not correcly accepts CFLAGS not ac_options for optimized code. -# REMOVED!!! - rafael2k -# if [ "$ARCH" == "i486" ] || [ "$ARCH" == "i386" ]; then -# patch -p0 < $CWD/$PACKAGE-nommxfix.patch -# fi - -# if [ "$ARCH" == "powerpc" ] && [ "$HAVE_ALTIVEC" != "true" ]; then -# patch -p0 < $CWD/$PACKAGE-noaltivecfix.patch -# fi - - -./configure --prefix=/usr --enable-shared --enable-visualize --enable-pic --libdir=$LIBDIR -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install - -CWD="`pwd`" - -cd $TMP/package-$PACKAGE +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done +fi -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler------------------------------------------------------| libx264: libx264 (x264 is a free library for encoding H264/AVC video streams) libx264: libx264: x264 is a free library for encoding H264/AVC video streams. The code @@ -128,18 +173,13 @@ libx264: libx264: libx264: http://developers.videolan.org/x264.html libx264: -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +EODESC -for file in AUTHORS COPYING;do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/libx264/slack-required b/media/libs/libx264/slack-required index eff8d5c7..5b987a1e 100644 --- a/media/libs/libx264/slack-required +++ b/media/libs/libx264/slack-required @@ -1 +1,4 @@ -yasm +# Dependency list to libx264 +# +# dependency [condition] [version]] +yasm diff --git a/media/libs/openexr/openexr.SlackBuild b/media/libs/openexr/openexr.SlackBuild index e4362b16..6b0654ee 100755 --- a/media/libs/openexr/openexr.SlackBuild +++ b/media/libs/openexr/openexr.SlackBuild @@ -1,113 +1,167 @@ #!/bin/bash # -# openexr.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# openexr.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# openexr.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# openexr.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for OpenEXR -# by rafael at riseup.net +# slackbuild for openexr, by Silvio Rhatto +# requires: ilmbase +# tested: openexr-1.6.1 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building OpenEXR are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="openexr" +# Set variables +CWD="$(pwd)" +SRC_NAME="openexr" +PKG_NAME="openexr" ARCH=${ARCH:=i486} -VERSION=${VERSION:=1.4.0a} -BUILD=${BUILD:=1rd} -SRC_DIR=${SRC:=$CWD} +SRC_VERSION=${VERSION:=1.6.1} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--with-docdir=/usr/doc/$PKG_NAME-$PKG_VERSION"} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://download.savannah.nongnu.org/releases/openexr/$SRC" +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi - -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" -fi +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://download.savannah.gnu.org/releases/openexr/$SRC" -tar xvf$tarflag $SRC_DIR/$SRC - -# small hack for version 1.4.0 -if [ "$VERSION" == "1.4.0a" ]; then - mv openexr-1.4.0 openexr-1.4.0a +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi -cd $PACKAGE-$VERSION +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done fi -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --with-docdir=/usr/doc/$PACKAGE-$VERSION -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install - -CWD="`pwd`" - -cd $TMP/package-$PACKAGE - -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING ChangeLog INSTALL LICENSE NEWS README" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler------------------------------------------------------| openexr: OpenEXR (OpenEXR set of libraries for higher color fidelity images) openexr: openexr: OpenEXR supports several lossless compression methods, some of which @@ -119,18 +173,13 @@ openexr: openexr: openexr: http://www.openexr.com/ openexr: -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +EODESC -for file in AUTHORS COPYING ChangeLog INSTALL LICENSE NEWS README;do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/openexr/slack-required b/media/libs/openexr/slack-required new file mode 100644 index 00000000..d7c3a860 --- /dev/null +++ b/media/libs/openexr/slack-required @@ -0,0 +1,4 @@ +# Dependency list to openexr +# +# dependency [condition] [version]] +ilmbase diff --git a/media/libs/raptor/raptor.SlackBuild b/media/libs/raptor/raptor.SlackBuild index fba07f18..8f3cbb9e 100755 --- a/media/libs/raptor/raptor.SlackBuild +++ b/media/libs/raptor/raptor.SlackBuild @@ -1,108 +1,211 @@ #!/bin/bash # -# raptor.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# raptor.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# raptor.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# raptor.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # -# slackbuild script for raptor -# by rhatto at riseup.net +# slackbuild for raptor, by Silvio Rhatto +# requires: +# tested: raptor-1.4.18 # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building raptor are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap -# else -# echo Sleeping 3 seconds... -# sleep 3 - fi -fi - -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -# default settings -PACKAGE="raptor" +# Set variables +CWD="$(pwd)" +SRC_NAME="raptor" +PKG_NAME="raptor" ARCH=${ARCH:=i486} -VERSION=${VERSION:=1.4.14} +SRC_VERSION=${VERSION:=1.4.18} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} -SRC_DIR=${SRC:=$CWD} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} - -if [ "$ARCH" == "x86_64" ]; then - export LDFLAGS="-L/lib64 -L/usr/lib64" - LIBDIR=/usr/lib64 -else - LIBDIR=/usr/lib +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" URL="http://download.librdf.org/source/$SRC" -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" +# Import minimized signing key from +if echo http://purl.org/net/dajobe/gnupg.asc | grep -q -v "SIGNING KEY URL"; then + lynx -dump http://purl.org/net/dajobe/gnupg.asc | gpg --import || exit $ERROR_GPG +elif echo [[SIGNING KEY ID]] | grep -q -v "SIGNING KEY ID"; then + gpg --recv-keys [[SIGNING KEY ID]] || exit $ERROR_GPG else - tarflag="z" + gpg --import << EOKEY || exit $ERROR_GPG +[[SIGNING KEY]] +EOKEY fi -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" +# Download source's signature if necessary and check it +if echo http://download.librdf.org/source/raptor-1.4.18.tar.gz.asc | grep -q -v "SIGNING URL"; then + SIGNATURE="`basename http://download.librdf.org/source/raptor-1.4.18.tar.gz.asc`" + if [ ! -s "$SRC_DIR/$SIGNATURE" ]; then + wget "http://download.librdf.org/source/raptor-1.4.18.tar.gz.asc" -O "$SRC_DIR/$SIGNATURE" || exit $ERROR_WGET + fi +else + if [ -s "$SRC_DIR/$SRC.sig" ]; then + SIGNATURE="$SRC.sig" + elif [ -s "$SRC_DIR/$SRC.asc" ]; then + SIGNATURE="$SRC.asc" + else + echo Trying to get signature file from $URL.sig... + if wget "$URL.sig" -O "$SRC_DIR/$SRC.sig"; then + SIGNATURE="$SRC.sig" + else + rm $SRC_DIR/$SRC.sig + echo Trying to get signature file from $URL.asc... + if wget "$URL.asc" -O "$SRC_DIR/$SRC.asc"; then + SIGNATURE="$SRC.asc" + else + rm $SRC_DIR/$SRC.asc + echo "Error getting source's signature file" + exit $ERROR_GPG + fi + fi + fi fi -TMP="$TMP/$PACKAGE" -rm -rf $TMP -mkdir -p $TMP -cd $TMP - -tar xvf$tarflag $SRC_DIR/$SRC -cd $PACKAGE-$VERSION +echo Checking $SRC_DIR/$SRC with gpg using $SRC_DIR/$SIGNATURE... +gpg --verify "$SRC_DIR/$SIGNATURE" "$SRC_DIR/$SRC" || exit $ERROR_GPG +echo Success. + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done -if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then - patch -p1 < $CWD/$PACKAGE-$VERSION.diff +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done fi -./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR -make || exit 32 -make DESTDIR=$TMP/package-$PACKAGE install - -CWD="`pwd`" - -cd $TMP/package-$PACKAGE - -find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="AUTHORS COPYING* ChangeLog* LICENSE* NEWS* NOTICE README*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done -mkdir install -cat << EOF > install/slack-desc +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler-------------------------------------------------------| raptor: raptor (RDF parser/serializer library) raptor: raptor: Raptor is a free software / Open Source C library that provides a @@ -114,18 +217,13 @@ raptor: The serializing syntaxes ar eRDF/XML, N-Triples and RSS 1.0. raptor: raptor: raptor: -EOF - -# docs -mkdir -p usr/doc/$PACKAGE-$VERSION +EODESC -for file in AUTHORS COPYING* ChangeLog* INSTALL* LICENSE* NEWS* NOTICE README*; do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ -done - -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/smpeg/smpeg.SlackBuild b/media/libs/smpeg/smpeg.SlackBuild index 6143a65d..635922be 100644 --- a/media/libs/smpeg/smpeg.SlackBuild +++ b/media/libs/smpeg/smpeg.SlackBuild @@ -77,11 +77,17 @@ mkdir -p "$REPOS" || exit $ERROR_MKDIR mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR # Get svn source code -[ "`find "$SRC_DIR/" -name .svn`" != "" ] && SVN_ACTION="update" || SVN_ACTION="checkout" cd "$SRC_DIR" -svn $SVN_ACTION svn://svn.icculus.org/smpeg/trunk $PKG_SRC || exit $ERROR_VCS -SND_DIR="`ls -l | awk '/^d/ { print $NF }'`" -cd $SND_DIR +SND_DIR="`basename svn://svn.icculus.org/smpeg/trunk`" + +if [ "`find "$SRC_DIR/" -name .svn`" != "" ] && [ -d "$SRC_DIR/$SND_DIR" ]; then + cd $SND_DIR + svn update || exit $ERROR_VCS +else + svn checkout svn://svn.icculus.org/smpeg/trunk $SND_DIR || exit $ERROR_VCS + cd $SND_DIR +fi + PKG_VERSION="`svn info | awk '/Last Changed Rev:/ { print $4 }'`_svn" # Copy svn source diff --git a/media/libs/speex/speex.SlackBuild b/media/libs/speex/speex.SlackBuild index 9b861d72..6fc50b95 100755 --- a/media/libs/speex/speex.SlackBuild +++ b/media/libs/speex/speex.SlackBuild @@ -1,145 +1,185 @@ #!/bin/bash # -# got it from http://ftp.cgu.edu.tw/Mirror/linuxpackages/Slackware-10.2-x86_64/pcxz/speex/speex.SlackBuild -# small changes by rhatto +# speex.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# speex.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for speex, by Silvio Rhatto +# requires: +# tested: speex-1.2beta3 # -CWD="`pwd`" - +# Look for slackbuildrc if [ -f ~/.slackbuildrc ]; then source ~/.slackbuildrc elif [ -f /etc/slackbuildrc ]; then source /etc/slackbuildrc fi -PACKAGE="speex" -VERSION=${VERSION:=1.0.5} +# Set variables +CWD="$(pwd)" +SRC_NAME="speex" +PKG_NAME="speex" ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=1.2beta3} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} -SRC_DIR=${SRC:=$CWD} +PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:=""} -RTOOL="wget" -PACKAGE_EXT="gz" -SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" -URL="http://downloads.us.xiph.org/releases/speex/$SRC" - -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi - -SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" -fi - -if [ "$ARCH" == "i386" ]; then +if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" -elif [ "$ARCH" == "i486" ]; then +elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mcpu=i686" -elif [ "$ARCH" == "s390" ]; then +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" -elif [ "$ARCH" == "x86_64" ]; then +elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi -if [ "$ARCH" == "x86_64" ]; then - LIBDIR="/usr/lib64" -else - LIBDIR="/usr/lib" -fi +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 -TMP="$TMP/$PACKAGE" -PKG=$TMP/package-$PACKAGE -rm -rf $TMP -mkdir -p $PKG -cd $TMP +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null -rm -rf speex-$VERSION -tar xvf$tarflag $SRC_DIR/speex-$VERSION.tar.gz -cd speex-$VERSION +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR -chown -R root.root . -find . -perm 777 -exec chmod 755 {} \; -find . -perm 664 -exec chmod 644 {} \; +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://downloads.xiph.org/releases/speex/$SRC" -LDFLAGS=-L$LIBDIR \ -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure --prefix=/usr --sysconfdir=/etc --disable-debug --libdir=$LIBDIR \ - --program-prefix="" --program-suffix="" $ARCH-slackware-linux -make || exit 32 -make install DESTDIR=$PKG - -( cd $PKG - for dn in usr usr/local usr/X11R6 - do - for dn2 in bin sbin - do - for file in `find $dn/$dn2 -type f 2> /dev/null` - do - chown root.bin $PKG/$file /$file 2> /dev/null - done - done - done -) -( cd $PKG - for dn in usr usr/local usr/X11R6 - do - for dn2 in man share/man info share/info - do - for file in `find $dn/$dn2 -type f 2> /dev/null` - do - gzip -9f $PKG/$file /$file 2> /dev/null - done - done - done -) +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi -( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null -) +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Patch source +patches=" + $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff + $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" +for patch in $patches; do + if [ -f "$CWD/$patch" ]; then + patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH + fi +done + +if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then + for patch_url in [[PATCH URLS]]; do + patch="`basename $patch_url`" + if [ ! -s "$SRC_DIR/$patch" ]; then + wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET + fi + if [ "`basename $patch .gz`" != "$patch" ]; then + gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH + else + patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done +fi -mkdir -p $PKG/usr/doc/speex-$VERSION -cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README TODO $PKG/usr/doc/speex-$VERSION -mkdir -p $PKG/install +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) -cat << EOF > $PKG/install/slack-desc +# Install documentation +DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must +# on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler-----------------------------------------------------| + |-----handy-ruler--------------------------------------------------------| speex: speex speex: -speex: The Speex is a patent-free, Open Source/Free Software voice codec. -speex: -speex: -speex: +speex: Speex is an Open Source/Free Software patent-free audio +speex: compression format designed for speech. The Speex Project +speex: aims to lower the barrier of entry for voice applications +speex: by providing a free alternative to expensive proprietary +speex: speech codecs. Moreover, Speex is well-adapted to Internet +speex: applications and provides useful features that are not +speex: present in most other codecs. speex: speex: -speex: -speex: -speex: -EOF +EODESC -if [ -f $CWD/slack-required ]; then - cat $CWD/slack-required > $PKG/install/slack-required -fi - -cd $PKG -makepkg -l y -c n $REPOS/speex-$VERSION-$ARCH-$BUILD.tgz +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +# Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $TMP + rm -rf "$PKG_WORK" "$PKG" fi - diff --git a/media/libs/unicap/unicap.SlackBuild b/media/libs/unicap/unicap.SlackBuild new file mode 100755 index 00000000..ddc46899 --- /dev/null +++ b/media/libs/unicap/unicap.SlackBuild @@ -0,0 +1,153 @@ +#!/bin/bash +# +# unicap.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# unicap.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for unicap, by Rafael Diniz +# requires: +# tested: unicap-0.2.23 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="unicap" +PKG_NAME="unicap" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.2.23} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rd} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:="-j3"} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://unicap-imaging.org/downloads/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler-------------------------------------------------------| +unicap: unicap (video capture library) +unicap: +unicap: Unicap provides a uniform interface to video capture +unicap: devices. It allows applications to use any supported +unicap: video capture device via a single API. +unicap: +unicap: +unicap: +unicap: +unicap: http://unicap-imaging.org/ +unicap: +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi diff --git a/media/libs/zvbi/zvbi.SlackBuild b/media/libs/zvbi/zvbi.SlackBuild new file mode 100755 index 00000000..f0d8ca3b --- /dev/null +++ b/media/libs/zvbi/zvbi.SlackBuild @@ -0,0 +1,153 @@ +#!/bin/bash +# +# zvbi.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# zvbi.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for zvbi, by Rafael Diniz +# requires: +# tested: zvbi-0.2.30 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="zvbi" +PKG_NAME="zvbi" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.2.30} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rd} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:="-j4"} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.bz2" +URL="http://ufpr.dl.sourceforge.net/sourceforge/zapping/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler---------------------------------------------------------| +zvbi: zvbi by Slack.Sarava +zvbi: +zvbi: The ZVBI library provides routines to access raw VBI sampling devices, +zvbi: a versatile raw VBI bit slicer, decoders for various data services and +zvbi: basic search, render and export functions for text pages. The library +zvbi: was written for the Zapping TV viewer and Zapzilla Teletext browser. +zvbi: +zvbi: +zvbi: +zvbi: +zvbi: +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi |