summaryrefslogtreecommitdiffstats
path: root/wine-pipelight
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2013-11-04 14:07:15 +0000
committer Eric Hameleers <alien@slackware.com>2013-11-04 14:07:15 +0000
commitcc2eb27f13845c486ff79390bbf31620243f216e (patch)
tree556bf1c9675bae624cbd84be21db92608670fa36 /wine-pipelight
parent1c148b3c0f1b33318287ebcf2d543c0bd50f9222 (diff)
downloadasb-cc2eb27f13845c486ff79390bbf31620243f216e.tar.gz
asb-cc2eb27f13845c486ff79390bbf31620243f216e.tar.xz
Initial revision
Diffstat (limited to 'wine-pipelight')
-rw-r--r--wine-pipelight/build/slack-desc19
-rw-r--r--wine-pipelight/build/slack-required2
-rwxr-xr-xwine-pipelight/build/wine-pipelight.SlackBuild288
3 files changed, 309 insertions, 0 deletions
diff --git a/wine-pipelight/build/slack-desc b/wine-pipelight/build/slack-desc
new file mode 100644
index 00000000..d860e61c
--- /dev/null
+++ b/wine-pipelight/build/slack-desc
@@ -0,0 +1,19 @@
+# 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------------------------------------------------------|
+wine-pipelight: Wine Is Not an Emulator
+wine-pipelight:
+wine-pipelight: Wine is an Open Source implementation of the Windows API
+wine-pipelight: on top of X and Unix.
+wine-pipelight: This package contains a patched version of Wine, suitable
+wine-pipelight: for use with PipeLight, a cross-browser plugin.
+wine-pipelight:
+wine-pipelight:
+wine-pipelight:
+wine-pipelight: Homepage: http://www.wine.com/
+wine-pipelight: https://launchpad.net/pipelight
diff --git a/wine-pipelight/build/slack-required b/wine-pipelight/build/slack-required
new file mode 100644
index 00000000..765ef0cb
--- /dev/null
+++ b/wine-pipelight/build/slack-required
@@ -0,0 +1,2 @@
+OpenAL
+
diff --git a/wine-pipelight/build/wine-pipelight.SlackBuild b/wine-pipelight/build/wine-pipelight.SlackBuild
new file mode 100755
index 00000000..661dec4a
--- /dev/null
+++ b/wine-pipelight/build/wine-pipelight.SlackBuild
@@ -0,0 +1,288 @@
+#!/bin/sh
+# $Id$
+# Copyright 2013 Eric Hameleers, Eindhoven, NL
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+# Slackware SlackBuild script
+# ===========================
+# By: Eric Hameleers <alien@slackware.com>
+# For: wine-pipelight
+# Descr: A patched version of Wine that works with PipeLight.
+# URL: http://winehq.com/ , https://launchpad.net/pipelight
+# Needs: OpenAL
+# Build-req: fontforge (builds better fonts when compiling wine)
+# Changelog:
+# 1.7.5-1 04/nov/2013 by Eric Hameleers <alien@slackware.com>
+# Initial build.
+#
+# Run 'sh wine-pipelight.SlackBuild' to build a Slackware package.
+# The package (.tgz) plus descriptive .txt file are created in /tmp .
+# Install using 'installpkg'.
+#
+# -----------------------------------------------------------------------------
+
+
+PRGNAM=wine-pipelight
+SRCNAM=wine
+SRCVER=${SRCVER:-"1.7.5"}
+VERSION=$(echo $SRCVER | tr '-' '.')
+BUILD=${BUILD:-1}
+TAG=${TAG:-alien}
+
+# For matching wine_gecko & wine versions, see http://wiki.winehq.org/Gecko
+GECKO=${GECKO:-2.24}
+
+DOCS="ANNOUNCE AUTHORS COPYING.LIB ChangeLog LICENSE* README VERSION"
+
+# Set the variable OPENGL to "NO" if you don't have a card that
+# supports hardware accelerated OpenGL:
+OPENGL=${OPENGL:-"YES"} # Use 'YES' not 'yes' : case-sensitive!
+
+# If you set REQUIRE_FONTFORGE to "NO" then the script won't refuse to build
+# wine-pipelight in case you don't have fontforge installed (it is needed to
+# generate the required base fonts).
+REQUIRE_FONTFORGE=${REQUIRE_FONTFORGE:-"YES"}
+
+# Where do we look for sources?
+SRCDIR=$(cd $(dirname $0); pwd)
+
+# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
+TMP=${TMP:-/tmp/build}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+SOURCE[0]="$SRCDIR/${SRCNAM}-${SRCVER}.tar.bz2"
+SRCURL[0]="http://downloads.sourceforge.net/project/${SRCNAM}/Source/${SRCNAM}-${SRCVER}.tar.bz2"
+
+SOURCE[1]="$SRCDIR/${SRCNAM}-${VERSION}-patches.tar.gz"
+SRCURL[1]="http://fds-team.de/mirror/wine-patches.tar.gz"
+
+SOURCE[2]="$SRCDIR/wine_gecko-${GECKO}-x86.msi"
+SRCURL[2]="http://downloads.sourceforge.net/wine/wine_gecko-${GECKO}-x86.msi"
+
+##
+## --- with a little luck, you won't have to edit below this point --- ##
+##
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+case "$ARCH" in
+ i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ ;;
+ x86_64) SLKCFLAGS="-O2 -fPIC"
+ ;;
+ *) SLKCFLAGS="-O2"
+ ;;
+esac
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+# Exit the script on errors:
+set -e
+trap 'echo "$0 FAILED on line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
+# Catch unitialized variables:
+set -u
+P1=${1:-1}
+
+# Save old umask and set to 0022:
+_UMASK_=$(umask)
+umask 0022
+
+# Create working directories:
+mkdir -p $OUTPUT # place for the package to be saved
+mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+mkdir -p $PKG # place for the package to be built
+rm -rf $PKG/* # always erase old package's contents
+rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
+rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
+ # remove old log files
+
+# Source files availability:
+for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
+ if ! [ -f ${SOURCE[$i]} ]; then
+ echo "Source '$(basename ${SOURCE[$i]})' not available yet..."
+ # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
+ [ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})"
+ if [ -f ${SOURCE[$i]} ]; then echo "Ah, found it!"; continue; fi
+ if ! [ "x${SRCURL[$i]}" == "x" ]; then
+ echo "Will download file to $(dirname $SOURCE[$i])"
+ wget -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true
+ if [ $? -ne 0 -o ! -s "${SOURCE[$i]}" ]; then
+ echo "Fail to download '$(basename ${SOURCE[$i]})'. Aborting the build."
+ mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL
+ exit 1
+ fi
+ else
+ echo "File '$(basename ${SOURCE[$i]})' not available. Aborting the build."
+ exit 1
+ fi
+ fi
+done
+
+if [ "$P1" == "--download" ]; then
+ echo "Download complete."
+ exit 0
+fi
+
+# --- PACKAGE BUILDING ---
+
+echo "++"
+echo "|| $PRGNAM-$VERSION"
+echo "++"
+
+if ! which fontforge >/dev/null 2>&1 ; then
+ echo "##"
+ echo "## The 'fontforge' program does not seem to be installed."
+ echo "## Wine uses fontforge to generate several TTF fonts (tahoma,tahomabd,marlett)"
+ echo "## that your Windows programs may want to use!"
+ if [ "$REQUIRE_FONTFORGE" != "YES" ]; then
+ echo "##"
+ echo "## Continuing the build anyway, but you were warned..."
+ echo "## Sleeping for 5 seconds, press <Ctrl>-C if you want to abort now."
+ echo "##"
+ sleep 5
+ else
+ echo "##"
+ echo "## Aborting the build - set the internal script variable:"
+ echo "##"
+ echo "## 'REQUIRE_FONTFORGE' to a value of 'NO'"
+ echo "##"
+ echo "## if you don't want to use fontforge to generate TTF fonts."
+ echo "##"
+ exit 1
+ fi
+fi
+
+cd $TMP/tmp-$PRGNAM
+
+echo "Extracting the source archive(s) for $PRGNAM..."
+tar -xvf ${SOURCE[0]}
+[ "$SRCVER" != "$VERSION" ] && mv ${PRGNAM}-${SRCVER} ${PRGNAM}-${VERSION}
+cd ${SRCNAM}-${VERSION}
+
+# Apply the pipelight patches:
+tar -xOf ${SOURCE[1]} | patch -p1 --verbose 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log
+
+chown -R root:root .
+chmod -R u+w,go+r-w,a+X-s .
+
+echo Building ...
+
+if [ "${OPENGL}" = "YES" -o "${OPENGL}" = "yes" ]; then
+ do_opengl=""
+else
+ do_opengl="out"
+fi
+
+# We are going to isolate wine-piplelight from the rest of the system
+# so that it does not clash with a regular wine installation:
+WPREFIX="/usr/libexec/${PRGNAM}"
+
+export CCAS="as"
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+export LDFLAGS="-L/usr/lib -ldl"
+if [ "$ARCH" = "x86_64" ]; then
+ export PKG_CONFIG_PATH="/usr/lib/pkgconfig:PKG_CONFIG_PATH"
+fi
+
+autoreconf -vif 2>&1 | tee $OUTPUT/autoreconf-${PRGNAM}.log
+./configure \
+ --prefix=${WPREFIX} \
+ --bindir=${WPREFIX}/bin \
+ --libdir=${WPREFIX}/lib \
+ --localstatedir=${WPREFIX}/var \
+ --sysconfdir=${WPREFIX}/etc \
+ --mandir=${WPREFIX}/man \
+ --with-x \
+ --with${do_opengl}-opengl \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$TARGET \
+ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
+
+make depend 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+make 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log
+make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
+
+# Add the wine-gecko MSI installer to the Wine package:
+mkdir -p $PKG/usr/share/wine/gecko
+cp -a ${SOURCE[2]} $PKG/usr/share/wine/gecko/
+
+# Add the font converter programs if they were created using fontforge:
+# (useful if you need to convert a Windows .fon file to UNIX .bdf)
+install -m 755 tools/{fnt2fon,sfnt2fnt} $PKG/$WPREFIX/bin
+
+# Add some documentation to the package:
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
+cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
+find $PKG/usr/doc -type f -exec chmod 644 {} \;
+
+# Compress the man page(s)
+if [ -d $PKG/usr/man ]; then
+ cd $PKG/usr/man
+ find . -type f -name "*.?" -exec gzip -9f {} \;
+ for i in $(find . -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
+
+# Strip binaries
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f1 -d: | xargs strip --strip-unneeded 2>/dev/null || true
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $SRCDIR/slack-desc > $PKG/install/slack-desc
+if [ -f $SRCDIR/doinst.sh ]; then
+ cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh
+fi
+if [ -f $SRCDIR/slack-required ]; then
+ cat $SRCDIR/slack-required > $PKG/install/slack-required
+fi
+
+# Build the package:
+cd $PKG
+makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
+cd $OUTPUT
+md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5
+cd -
+cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
+if [ -f $PKG/install/slack-required ]; then
+ cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep
+fi
+
+# Restore the original umask:
+umask ${_UMASK_}
+