summaryrefslogtreecommitdiffstats
path: root/wine/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2015-09-19 21:48:49 +0000
committer Eric Hameleers <alien@slackware.com>2015-09-19 21:48:49 +0000
commit423c7a7c0d8ae027be86f0278fb4300469ca0c98 (patch)
treee4ffb4020f79e6775f3d7c9bf5b7fc49633d6ac8 /wine/build
parent4e47efd7029ff39c439d028c6e0006820e1ce384 (diff)
downloadasb-423c7a7c0d8ae027be86f0278fb4300469ca0c98.tar.gz
asb-423c7a7c0d8ae027be86f0278fb4300469ca0c98.tar.xz
wine: apply wine-d3d9 patch set when d3dadapter available
Diffstat (limited to 'wine/build')
-rwxr-xr-xwine/build/wine.SlackBuild92
1 files changed, 84 insertions, 8 deletions
diff --git a/wine/build/wine.SlackBuild b/wine/build/wine.SlackBuild
index 30e44f1f..fc08f18c 100755
--- a/wine/build/wine.SlackBuild
+++ b/wine/build/wine.SlackBuild
@@ -99,7 +99,10 @@
# 1.7.24-1 09/aug/2014 by Eric Hameleers <alien@slackware.com>
# 1.7.33-1 02/jan/2015 by Eric Hameleers <alien@slackware.com>
# 1.7.51-1 07/sep/2015 by Eric Hameleers <alien@slackware.com>
-# * Apply the wine-staging patch set.
+# * Apply the wine-staging patch set from http://wine-staging.com/.
+# 1.7.XX-1 XX/XXX/2015 by Eric Hameleers <alien@slackware.com>
+# * Apply the wine-d3d9 patch set if mesa was compiled with support
+# for d3dadapter. See https://wiki.ixit.cz/d3d9
#
# Run 'sh wine.SlackBuild' to build a Slackware package.
# The package (.txz) plus descriptive .txt file are created in /tmp .
@@ -117,6 +120,13 @@ TAG=${TAG:-alien}
# If you do not want wine64 on Slackware64, set this to "no":
DO_WINE64=${DO_WINE64:-"yes"}
+# Slackware until 14.1 does not have d3dadapter aka "nine" ebabled in mesa:
+if /usr/bin/pkg-config --exists d3d ; then
+ USE_NINE=${USE_NINE:-"YES"}
+else
+ USE_NINE=${USE_NINE:-"NO"}
+fi
+
# Add the "Gecko", Wine's own implementation of Internet Explorer.
# For matching wine_gecko & wine versions, see http://wiki.winehq.org/Gecko
GECKO=${GECKO:-2.40}
@@ -177,14 +187,57 @@ SRCURL[0]="http://downloads.sourceforge.net/project/${PRGNAM}/Source/${PRGNAM}-$
SOURCE[1]="$SRCDIR/${PRGNAM}-staging-${SRCVER}.tar.gz"
SRCURL[1]="https://github.com/${PRGNAM}-compholio/${PRGNAM}-staging/archive/v${SRCVER}.tar.gz"
-SOURCE[2]="$SRCDIR/wine_gecko-${GECKO}-x86.msi"
-SRCURL[2]="http://downloads.sourceforge.net/wine/wine_gecko-${GECKO}-x86.msi"
+SOURCE[2]="$SRCDIR/${PRGNAM}-d3d9-${SRCVER}.patch"
+SRCURL[2]=""
+
+SOURCE[3]="$SRCDIR/wine_gecko-${GECKO}-x86.msi"
+SRCURL[3]="http://downloads.sourceforge.net/wine/wine_gecko-${GECKO}-x86.msi"
if [ "$ARCH" = "x86_64" -a "$DO_WINE64" = "yes" ]; then
- SOURCE[3]="$SRCDIR/wine_gecko-${GECKO}-x86_64.msi"
- SRCURL[3]="http://downloads.sourceforge.net/wine/wine_gecko-${GECKO}-x86_64.msi"
+ SOURCE[4]="$SRCDIR/wine_gecko-${GECKO}-x86_64.msi"
+ SRCURL[4]="http://downloads.sourceforge.net/wine/wine_gecko-${GECKO}-x86_64.msi"
fi
+# Use the src_checkout() function if no downloadable tarball exists.
+src_checkout() {
+ # Param #1 : index in the SOURCE[] array.
+ # Param #2 : full path to where SOURCE[$1] should be created.
+ # Determine the tarball extension:
+ # Determine the directory name to create for the archive root:
+ PBASE=$(basename ${2} .patch)
+ # Determine the directory where we create our checkout:
+ CODIR=$(dirname ${2})
+ case ${1} in
+ 2) # Check out sources from GIT.
+ echo "** This checkout will take a long time **"
+ GITURI="https://github.com/NP-Hardass/wine-d3d9-patches.git"
+ RETDIR=$(pwd)
+ if [ -z "$(git config user.email)" ]; then
+ git config --global user.email "$USER@localhost"
+ fi
+ if [ -z "$(git config user.name)" ]; then
+ git config --global user.name "$USER"
+ fi
+ mkdir -p $CODIR/${PRGNAM}_temp_checkout_$$ \
+ && cd $CODIR/${PRGNAM}_temp_checkout_$$
+ mkdir ${PBASE} \
+ && cd ${PBASE} \
+ && \
+ # Checkout without downloading version history (fast!):
+ echo "Checking out HEAD from '$GITURI':"
+ git clone --depth=1 ${GITURI} . \
+ && chown -R root:root . \
+ && ./generate-d3d9-patch.sh ${VERSION} \
+ 2>&1 | tee $OUTPUT/${PRGNAM}_d3d9.patch.log \
+ && cp wine-d3d9-latest.patch ${2}
+ cd $RETDIR
+ rm -rf $CODIR/${PRGNAM}_temp_checkout_$$ || true
+ ;;
+ *) # Do nothing
+ ;;
+ esac
+}
+
# Exit the script on errors:
set -e
trap 'echo "$0 FAILED on line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
@@ -221,6 +274,12 @@ for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
exit 1
fi
else
+ # Try if we have a GIT download routine for ${SOURCE[$i]}
+ echo "Will checkout sources to $(dirname $SOURCE[$i])"
+ src_checkout $i "${SOURCE[$i]}" \
+ 2>&1 > $OUTPUT/checkout-$(basename ${SOURCE[$i]}).log
+ fi
+ if [ ! -f "${SOURCE[$i]}" -o ! -s "${SOURCE[$i]}" ]; then
echo "File '$(basename ${SOURCE[$i]})' not available. Aborting the build."
exit 1
fi
@@ -268,10 +327,19 @@ tar -xvf ${SOURCE[0]}
[ "$SRCVER" != "$VERSION" ] && mv ${PRGNAM}-${SRCVER} ${PRGNAM}-${VERSION}
cd ${PRGNAM}-${VERSION}
+# Patches:
+touch $OUTPUT/patch-${PRGNAM}.log
# Apply the wine-staging patches:
+echo -e "\n**\n** wine-staging:\n**" | tee -a $OUTPUT/patch-${PRGNAM}.log
tar -xf ${SOURCE[1]} --strip-components 1
./patches/patchinstall.sh DESTDIR="$(pwd)" --all \
- 2>&1 | tee $OUTPUT/patch-${PRGNAM}.log
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+if [ "$USE_NINE" = "YES" ]; then
+ # Apply the Direct3D9 patch set:
+ echo -e "\n**\n** direct3d9:\n**" | tee -a $OUTPUT/patch-${PRGNAM}.log
+ cat $SOURCE[2] | patch -p1 --verbose \
+ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log
+fi
chown -R root:root .
chmod -R u+w,go+r-w,a+X-s .
@@ -288,6 +356,12 @@ else
do_opengl="out"
fi
+if [ "$USE_NINE" = "YES" ]; then
+ do_nine=""
+else
+ do_nine="out"
+fi
+
export CCAS="as"
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
@@ -305,12 +379,14 @@ function wineconfigure ()
--mandir=/usr/man \
--with-x \
--with${do_opengl}-opengl \
+ --with${do_nine}-d3dadapter \
--program-prefix= \
--program-suffix= \
--build=$TARGET \
$*
}
+# Required because of the wine-staging as well as the direct3d9 patches:
autoreconf -vif 2>&1 | tee $OUTPUT/autoreconf-${PRGNAM}.log
if [ "$ARCH" = "x86_64" -a "$DO_WINE64" = "yes" ]; then
@@ -343,9 +419,9 @@ fi
# Add the wine-gecko MSI installer(s) to the Wine package:
mkdir -p $PKG/usr/share/wine/gecko
-install -m0644 ${SOURCE[2]} $PKG/usr/share/wine/gecko/
+install -m0644 ${SOURCE[3]} $PKG/usr/share/wine/gecko/
if [ "$ARCH" = "x86_64" -a "$DO_WINE64" = "yes" ]; then
- install -m0644 ${SOURCE[3]} $PKG/usr/share/wine/gecko/
+ install -m0644 ${SOURCE[4]} $PKG/usr/share/wine/gecko/
fi
# Add the font converter programs if they were created using fontforge: