diff options
Diffstat (limited to 'net/www/gnash/gnash.SlackBuild')
-rwxr-xr-x | net/www/gnash/gnash.SlackBuild | 61 |
1 files changed, 47 insertions, 14 deletions
diff --git a/net/www/gnash/gnash.SlackBuild b/net/www/gnash/gnash.SlackBuild index 3809e9bb..dc62ae2f 100755 --- a/net/www/gnash/gnash.SlackBuild +++ b/net/www/gnash/gnash.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 gnash, by Rudson R. Alves -# requires: -# tested: gnash-0.8.2 +# requires: agg boost ffmpeg +# tested: gnash-0.8.3 # # Look for slackbuildrc @@ -31,7 +31,7 @@ CWD="$(pwd)" SRC_NAME="gnash" PKG_NAME="gnash" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=0.8.2} +SRC_VERSION=${VERSION:=0.8.3} PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rra} SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME @@ -40,8 +40,8 @@ PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} PREFIX=${PREFIX:=/usr} PKG_WORK="$TMP/$SRC_NAME" -CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --with-plugindir=$LIBDIR/mozilla/plugins --x-libraries=$LIBDIR"} -NUMJOBS=${NUMJOBS:="-j4"} +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --with-plugindir=$LIBDIR/mozilla/plugins --x-libraries=$LIBDIR --enable-nspr --enable-media=ffmpeg --with-ffmpeg-incl=/usr/include --with-nspr-incl=/usr/include/seamonkey/nspr --with-nspr-lib=/usr/lib/seamonkey --with-boost-incl=/usr/include/boost/boost "} +NUMJOBS=${NUMJOBS:="-j3"} # Set system libraries' path and optmization flags based on $ARCH LIBDIR="$PREFIX/lib" @@ -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) @@ -77,7 +78,7 @@ mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR # Dowload source if necessary SRC="$SRC_NAME-$VERSION.tar.bz2" -URL="ftp://mirrors.kernel.org/gnu/gnash/0.8.2/$SRC" +URL="ftp://mirrors.kernel.org/gnu/gnash/0.8.3/$SRC" if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET @@ -86,9 +87,41 @@ 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" +# 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 -Np0 < "$CWD/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch" ]; then + patch -Np0 < "$CWD/patches/$patch" || exit $ERROR_PATCH + elif [ -f "$CWD/$patch.gz" ]; then + gzip -dc "$CWD/$patch.gz" | patch -Np0 || exit $ERROR_PATCH + elif [ -f "$CWD/patches/$patch.gz" ]; then + gzip -dc "$CWD/patches/$patch.gz" | patch -Np0 || 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 -Np0 || exit $ERROR_PATCH + elif [ "`basename $patch .bz2`" != "$patch" ]; then + bzip2 -dc $SRC_DIR/$patch | patch -Np0 || exit $ERROR_PATCH + else + patch -Np0 < "$SRC_DIR/$patch" || exit $ERROR_PATCH + fi + done +fi + # Configure CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -110,7 +143,7 @@ make install DESTDIR="$PKG" || exit $ERROR_INSTALL ) # Install documentation -DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog ChangeLog-0.8.0 ChangeLog-0.8.1 INSTALL NEWS README TODO" +DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog ChangeLog-0.8.0 ChangeLog-0.8.1 ChangeLog-0.8.2 ChangeLog-0.8.3 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 @@ -122,9 +155,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 ':'. |