summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD54
-rw-r--r--vdrift-gcc6.patch12
3 files changed, 90 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..20bd3ef4234b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = vdrift
+ pkgdesc = Open source driving simulation made with drift racing in mind
+ pkgver = 2014.10.20
+ pkgrel = 9
+ url = http://vdrift.net/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = scons
+ makedepends = mesa
+ depends = bullet
+ depends = curl
+ depends = sdl2_image
+ depends = glew
+ depends = libvorbis
+ depends = hicolor-icon-theme
+ depends = libarchive
+ source = http://downloads.sourceforge.net/sourceforge/vdrift/vdrift-2014-10-20.tar.bz2
+ source = vdrift-gcc6.patch
+ sha512sums = 5f6afbb4bdc273455f6bf4e3eba6e3b702d96fbe3c7b5068cee0c114d5de28b82ceed44ee891f59e9bfe194f0c597f464a13aadf7f34b204630ec54df282e4ee
+ sha512sums = 4f77497aa3d1b9299028fa58fec2a42ca47b2dd5f132581d408bad7b7ca77b76f2b6c5fb89b4ac4e72b546c4e993addf55445c49b3f5f00a75bace0dd12b9753
+
+pkgname = vdrift
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6a1a523ec314
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# $Id: PKGBUILD 228104 2017-05-15 15:08:35Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
+# Contributor: Lone_Wolf lonewolf@xs4all.nl
+
+pkgname=vdrift
+pkgver=2014.10.20
+pkgrel=9
+pkgdesc="Open source driving simulation made with drift racing in mind"
+arch=('i686' 'x86_64')
+url="http://vdrift.net/"
+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)
+sha512sums=('5f6afbb4bdc273455f6bf4e3eba6e3b702d96fbe3c7b5068cee0c114d5de28b82ceed44ee891f59e9bfe194f0c597f464a13aadf7f34b204630ec54df282e4ee'
+ '4f77497aa3d1b9299028fa58fec2a42ca47b2dd5f132581d408bad7b7ca77b76f2b6c5fb89b4ac4e72b546c4e993addf55445c49b3f5f00a75bace0dd12b9753')
+
+prepare() {
+ cd vdrift
+ # Fix build with GCC 6 (Fedora)
+ patch -p1 -i ../vdrift-gcc6.patch
+}
+
+build() {
+ cd vdrift
+
+ # build and install
+ scons $MAKEFLAGS \
+ "destdir"="$pkgdir" \
+ "release"=1 \
+ "force_feedback"=1 \
+ "prefix"=/usr \
+ "datadir"=share/$pkgname/ \
+ "extbullet"=1
+}
+
+package() {
+ cd vdrift
+
+ scons install
+
+ # install .desktop file
+ install -Dm644 $pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
+ sed -i '1 s/^\xef\xbb\xbf//' "$pkgdir"/usr/share/applications/$pkgname.desktop # remove BOM (WHY IS THERE?)
+
+ # install icons
+ install -Dm644 data/textures/icons/vdrift-16x16.png "$pkgdir"/usr/share/icons/hicolor/16x16/apps/vdrift.png
+ install -Dm644 data/textures/icons/vdrift-32x32.png "$pkgdir"/usr/share/icons/hicolor/32x32/apps/vdrift.png
+ install -Dm644 data/textures/icons/vdrift-64x64.png "$pkgdir"/usr/share/icons/hicolor/64x64/apps/vdrift.png
+ install -Dm644 data/textures/icons/vdrift-64x64.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
+}
+# vim: sw=2:ts=2 et:
diff --git a/vdrift-gcc6.patch b/vdrift-gcc6.patch
new file mode 100644
index 000000000000..0c846fdb6e5b
--- /dev/null
+++ b/vdrift-gcc6.patch
@@ -0,0 +1,12 @@
+diff -up ./src/graphics/model_obj.cpp.gcc6 ./src/graphics/model_obj.cpp
+--- ./src/graphics/model_obj.cpp.gcc6 2016-02-09 19:02:50.282554264 -0500
++++ ./src/graphics/model_obj.cpp 2016-02-09 19:03:10.566308088 -0500
+@@ -221,7 +221,7 @@ bool ModelObj::Save(const std::string &
+ std::ofstream f(strFileName.c_str());
+ if (!f)
+ {
+- error_output << "Error opening file for writing: " << error_output << endl;
++ error_output << "Error opening file for writing: " << strFileName << endl;
+ return false;
+ }
+