aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authordbn <dbn@FreeBSD.org>2013-05-07 03:24:47 +0800
committerdbn <dbn@FreeBSD.org>2013-05-07 03:24:47 +0800
commit92a000f5665e08931f451bc9515c88695584d7c0 (patch)
tree0bf3fdff5cf8e85186cfa416681f9decfaff7600 /emulators
parentb81180e3aa7bb06812130d1d378622377498db32 (diff)
downloadfreebsd-ports-gnome-92a000f5665e08931f451bc9515c88695584d7c0.tar.gz
freebsd-ports-gnome-92a000f5665e08931f451bc9515c88695584d7c0.tar.zst
freebsd-ports-gnome-92a000f5665e08931f451bc9515c88695584d7c0.zip
Fix emulators/i386-wine-devel's automatic nVidia patching.
Due to naming and other issues the patch failed properly detect if itself or nVidia-driver was installed, and aborted the patching. This fixes the patching for those who have nVidia-driver installed. Approved by: eadler,bdrewery (mentors, implicit)
Diffstat (limited to 'emulators')
-rw-r--r--emulators/i386-wine-devel/files/nvidia.sh19
1 files changed, 11 insertions, 8 deletions
diff --git a/emulators/i386-wine-devel/files/nvidia.sh b/emulators/i386-wine-devel/files/nvidia.sh
index 1a74e9dfec0b..4acbc2a8cbd3 100644
--- a/emulators/i386-wine-devel/files/nvidia.sh
+++ b/emulators/i386-wine-devel/files/nvidia.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2010, 2011, 2012 David Naylor <naylor.b.david@gmail.com>.
+# Copyright 2010, 2011, 2012, 2013 David Naylor <naylor.b.david@gmail.com>.
# Copyright 2012 Jan Beich <jbeich@tormail.org>
# All rights reserved.
#
@@ -55,6 +55,9 @@
# - fix mixed pkg/pkgng operation
# Version 1.9 - 2012/10/31
# - fix permission of extracts files
+# Version 1.10 - 2013/05/06
+# - s/wine-fbsd64/i386-wine/
+# - fix unwanted failures due to `set -e`
set -e
@@ -103,12 +106,12 @@ version() {
local ret pkg="$1"
if [ -f "/usr/local/sbin/pkg" ]
then
- ret=`pkg query -g '%v' $pkg`
+ ret=`pkg query -g '%v' $pkg || true`
fi
if [ -z "$ret" ]
then
- ret=`pkg_info -E $pkg'*' | cut -f 3 -d -`
+ ret=`pkg_info -E $pkg'*' | cut -f 3 -d - || true`
fi
# installed manually or failed to register
if [ -z "$ret" ] && [ "$pkg" = "nvidia-driver" ]
@@ -122,15 +125,15 @@ version() {
[ `whoami` = root ] \
|| terminate 254 "This script should be run as root"
-echo "===> Patching wine-fbsd64 to work with x11/nvidia-driver:"
+echo "===> Patching i386-wine to work with x11/nvidia-driver:"
if [ -z "${WINE}" ]
then
- WINE=`version wine-fbsd64`
+ WINE=`version i386-wine`
fi
[ -n "$WINE" ] \
- || terminate 255 "Unable to detect wine-fbsd64, please install first"
-echo "=> Detected wine-fbsd64: ${WINE}"
+ || terminate 255 "Unable to detect i386-wine, please install first"
+echo "=> Detected i386-wine: ${WINE}"
NV=`version nvidia-driver`
[ -n "$NV" ] \
@@ -175,4 +178,4 @@ echo "=> Cleaning up..."
[ -n "$NO_REMOVE_NVIDIA" ] || rm -vf NVIDIA-FreeBSD-x86-${NV}.tar.gz \
|| terminate 6 "Failed to remove files"
-echo "===> wine-fbsd64-${WINE} successfully patched for nvidia-driver-${NVIDIA}"
+echo "===> i386-wine-${WINE} successfully patched for nvidia-driver-${NVIDIA}"