summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Petris2017-10-15 13:54:32 -0400
committerRyan Petris2017-10-15 13:55:09 -0400
commite23bec4dadb8bde32f23fc5f14cfa3c86ba808dd (patch)
tree683552f741c2ccf04b5c6a9f0022721893ce9c0b
parente4691082d4b1bacbb09bfd15a0a9810b4e49261c (diff)
downloadaur-e23bec4dadb8bde32f23fc5f14cfa3c86ba808dd.tar.gz
Patch for SCons 3.0 compatibility.
-rw-r--r--PKGBUILD21
-rw-r--r--vdrift-sconscript.patch11
-rw-r--r--vdrift-sconstruct.patch59
3 files changed, 85 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6a1a523ec314..cd9ecef8bc65 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 228104 2017-05-15 15:08:35Z svenstaro $
-# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Maintainer: Ryan Petris <ryan at petris.net>
+# Contributor: Sven-Hendrik Haase <sh at lutzhaase.com>
# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
-# Contributor: Lone_Wolf lonewolf@xs4all.nl
+# Contributor: Lone_Wolf <lonewolf at xs4all.nl>
pkgname=vdrift
pkgver=2014.10.20
-pkgrel=9
+pkgrel=10
pkgdesc="Open source driving simulation made with drift racing in mind"
arch=('i686' 'x86_64')
url="http://vdrift.net/"
@@ -13,14 +13,23 @@ license=('GPL')
depends=('bullet' 'curl' 'sdl2_image' 'glew' 'libvorbis' 'hicolor-icon-theme' 'libarchive')
makedepends=('scons' 'mesa')
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-${pkgver//./-}.tar.bz2
- vdrift-gcc6.patch)
+ vdrift-gcc6.patch
+ vdrift-sconstruct.patch
+ vdrift-sconscript.patch)
sha512sums=('5f6afbb4bdc273455f6bf4e3eba6e3b702d96fbe3c7b5068cee0c114d5de28b82ceed44ee891f59e9bfe194f0c597f464a13aadf7f34b204630ec54df282e4ee'
- '4f77497aa3d1b9299028fa58fec2a42ca47b2dd5f132581d408bad7b7ca77b76f2b6c5fb89b4ac4e72b546c4e993addf55445c49b3f5f00a75bace0dd12b9753')
+ '4f77497aa3d1b9299028fa58fec2a42ca47b2dd5f132581d408bad7b7ca77b76f2b6c5fb89b4ac4e72b546c4e993addf55445c49b3f5f00a75bace0dd12b9753'
+ 'af62ce65390953473f7d8646cdaa4f11d921ba8c9ef7f8dbff887ac1cc529ea4431b36fe6ac8d89bf4aef221d1d0957ac03b91d701d0b8c27626af17f8b90630'
+ '49d427bbe481583c6e24bc272ca883a047fd6fc432b340105b3757db17f39c630f5cd1431917300d86db9e9c2e7f3fd37c4631a2a204bdf22a7e2773020916ee')
prepare() {
cd vdrift
+
# Fix build with GCC 6 (Fedora)
patch -p1 -i ../vdrift-gcc6.patch
+
+ # Patch SConstruct and SConscript for SCons 3.0 compatibility
+ patch -p1 -i ../vdrift-sconstruct.patch
+ patch -p1 -i ../vdrift-sconscript.patch
}
build() {
diff --git a/vdrift-sconscript.patch b/vdrift-sconscript.patch
new file mode 100644
index 000000000000..b0ac4d326532
--- /dev/null
+++ b/vdrift-sconscript.patch
@@ -0,0 +1,11 @@
+--- ./src/SConscript.orig 2014-09-04 16:06:21.000000000 -0400
++++ ./src/SConscript 2017-10-15 11:22:06.536446627 -0400
+@@ -151,7 +151,7 @@ src = Split("""
+ utils.cpp
+ window.cpp""")
+
+-src.sort(lambda x, y: cmp(x.lower(),y.lower()))
++src.sort(key=lambda x: x.lower())
+
+ #------------------------#
+ # Copy Build Environment #
diff --git a/vdrift-sconstruct.patch b/vdrift-sconstruct.patch
new file mode 100644
index 000000000000..4a2cdaf1f8e0
--- /dev/null
+++ b/vdrift-sconstruct.patch
@@ -0,0 +1,59 @@
+--- ./SConstruct.orig 2014-08-04 08:43:04.000000000 -0400
++++ ./SConstruct 2017-10-15 11:18:01.792656230 -0400
+@@ -92,9 +92,9 @@ elif sys.platform == 'darwin':
+
+ for a in env['universal']:
+ if not sdk_path:
+- print 'Building a universal binary require access to an ' + \
++ print ('Building a universal binary require access to an ' + \
+ 'SDK that has universal \nbinary support.If you know ' + \
+- 'the location of such an SDK, specify it using the \n"SDK" option'
++ 'the location of such an SDK, specify it using the \n"SDK" option')
+ Exit(1)
+ env.Append( CCFLAGS = ['-arch', a], LINKFLAGS = ['-arch', a] )
+
+@@ -141,11 +141,11 @@ else:
+ CC = 'gcc', CXX = 'g++',
+ options = opts)
+ # Take environment variables into account
+- if os.environ.has_key('CXX'):
++ if 'CXX' in os.environ:
+ env['CXX'] = os.environ['CXX']
+- if os.environ.has_key('CXXFLAGS'):
++ if 'CXXFLAGS' in os.environ:
+ env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
+- if os.environ.has_key('LDFLAGS'):
++ if 'LDFLAGS' in os.environ:
+ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
+ check_headers = ['GL/gl.h', 'SDL2/SDL.h', 'SDL2/SDL_image.h', 'vorbis/vorbisfile.h', 'curl/curl.h', 'bullet/btBulletCollisionCommon.h', 'bullet/btBulletDynamicsCommon.h']
+ check_libs = []
+@@ -232,7 +232,7 @@ def distcopy (target, source, env):
+ def tarballer (target, source, env):
+ cmd = 'tar -jcf "%s" -C "%s" .' % ( str(target[0]), str(source[0]) )
+ #cmd = 'tar -jcf ' + str (target[0]) + ' ' + str(source[0]) + " --exclude '*~' "
+- print 'running ', cmd, ' ... '
++ print ('running ', cmd, ' ... ')
+ p = os.popen (cmd)
+ return p.close ()
+
+@@ -362,11 +362,11 @@ env.ParseConfig('pkg-config bullet --lib
+ conf = Configure(env)
+ for header in check_headers:
+ if not conf.CheckCXXHeader(header):
+- print 'You do not have the %s headers installed. Exiting.' % header
++ print ('You do not have the %s headers installed. Exiting.' % header)
+ Exit(1)
+ for lib in check_libs:
+ if not conf.CheckLibWithHeader(lib[0], lib[1], 'C', lib[2]):
+- print lib[3]
++ print (lib[3])
+ Exit(1)
+
+ env = conf.Finish()
+@@ -535,4 +535,5 @@ if 'data-package' in COMMAND_LINE_TARGET
+ if 'autopackage' in COMMAND_LINE_TARGETS:
+ os.system("CXX1=g++-3.4 CXX2=g++-4.1 APBUILD_CXX1=g++-3.4 APBUILD_NO_STATIC_X=1 VDRIFT_VERSION=%s VDRIFT_MINIMAL=%d VDRIFT_RELEASE=%d makepackage tools/autopackage/vdrift.apspec" % (version, env['minimal'], env['release']))
+
+-SConscript('src/SConscript', variant_dir = build_dir, duplicate = 0)
++VariantDir(build_dir, '.', duplicate = 0)
++SConscript('src/SConscript')