summaryrefslogtreecommitdiff
path: root/community-testing/torcs
diff options
context:
space:
mode:
Diffstat (limited to 'community-testing/torcs')
-rw-r--r--community-testing/torcs/PKGBUILD36
-rw-r--r--community-testing/torcs/torcs-gcc.patch74
-rw-r--r--community-testing/torcs/torcs.desktop9
-rw-r--r--community-testing/torcs/torcs.sh2
4 files changed, 121 insertions, 0 deletions
diff --git a/community-testing/torcs/PKGBUILD b/community-testing/torcs/PKGBUILD
new file mode 100644
index 000000000..e81cc5d25
--- /dev/null
+++ b/community-testing/torcs/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 77306 2012-10-08 15:41:06Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Shahar Weiss <sweiss4@gmx.net>
+
+pkgname=torcs
+pkgver=1.3.3
+pkgrel=2
+pkgdesc="A 3D racing cars simulator using OpenGL"
+url="http://torcs.sourceforge.net"
+license=("GPL")
+arch=('i686' 'x86_64')
+depends=('freeglut' 'libpng' 'freealut' 'libxi' 'libxmu' 'libxrandr' 'libvorbis' 'glu')
+makedepends=('plib')
+options=('!makeflags')
+source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-${pkgver/_/-}.tar.bz2
+ torcs.desktop
+ torcs-gcc.patch)
+md5sums=('0319c996dac4480f1182c03d2331b14a'
+ '328e419e9f985c3e7b69924fe299330d'
+ '5ae7e903df37300d3b8744328c756bff')
+
+build() {
+ cd $srcdir/$pkgname-${pkgver/_/-}
+ unset LDFLAGS
+ ./configure --prefix=/usr --x-includes=/usr/include --x-libraries=/usr/lib
+ make
+}
+
+package() {
+ depends=(${depends[@]} "torcs-data=$pkgver")
+ cd $srcdir/$pkgname-${pkgver/_/-}
+ make DESTDIR=${pkgdir} install
+ install -D -m644 Ticon.png ${pkgdir}/usr/share/pixmaps/torcs.png
+ install -D -m644 ../torcs.desktop ${pkgdir}/usr/share/applications/torcs.desktop
+ find ${pkgdir} -type d -exec chmod 755 {} \;
+}
diff --git a/community-testing/torcs/torcs-gcc.patch b/community-testing/torcs/torcs-gcc.patch
new file mode 100644
index 000000000..fcc5604e7
--- /dev/null
+++ b/community-testing/torcs/torcs-gcc.patch
@@ -0,0 +1,74 @@
+diff -aur src.old/drivers/olethros/Trajectory.cpp src/drivers/olethros/Trajectory.cpp
+--- src.old/drivers/olethros/Trajectory.cpp 2008-04-06 22:21:31.000000000 +0200
++++ src/drivers/olethros/Trajectory.cpp 2008-04-06 22:28:52.000000000 +0200
+@@ -10,8 +10,10 @@
+ ***************************************************************************/
+ #include <cstdio>
+ #include <cstdlib>
++#include <cstring>
+ #include <cmath>
+ #include <cassert>
++#include <ctime>
+ #include <list>
+ #include <vector>
+ #include "Trajectory.h"
+diff -aur src.old/modules/simu/simuv2/SOLID-2.0/src/BBoxTree.cpp src/modules/simu/simuv2/SOLID-2.0/src/BBoxTree.cpp
+--- src.old/modules/simu/simuv2/SOLID-2.0/src/BBoxTree.cpp 2008-04-06 22:21:31.000000000 +0200
++++ src/modules/simu/simuv2/SOLID-2.0/src/BBoxTree.cpp 2008-04-06 22:22:57.000000000 +0200
+@@ -32,7 +32,7 @@
+ #include "Transform.h"
+
+ #include <algorithm>
+-#include <new.h>
++#include <new>
+
+ class BBoxCompAxis {
+ public:
+diff -aur src.old/modules/simu/simuv2/SOLID-2.0/src/Complex.cpp src/modules/simu/simuv2/SOLID-2.0/src/Complex.cpp
+--- src.old/modules/simu/simuv2/SOLID-2.0/src/Complex.cpp 2008-04-06 22:21:31.000000000 +0200
++++ src/modules/simu/simuv2/SOLID-2.0/src/Complex.cpp 2008-04-06 22:23:11.000000000 +0200
+@@ -32,7 +32,7 @@
+ #include "Transform.h"
+ #include "BBoxTree.h"
+
+-#include <new.h>
++#include <new>
+
+ BBoxInternal *free_node;
+
+diff -aur src.old/modules/simu/simuv2/SOLID-2.0/src/Endpoint.cpp src/modules/simu/simuv2/SOLID-2.0/src/Endpoint.cpp
+--- src.old/modules/simu/simuv2/SOLID-2.0/src/Endpoint.cpp 2008-04-06 22:21:31.000000000 +0200
++++ src/modules/simu/simuv2/SOLID-2.0/src/Endpoint.cpp 2008-04-06 22:22:29.000000000 +0200
+@@ -32,7 +32,7 @@
+ #include "Object.h"
+ #include "Encounter.h"
+
+-#include <new.h>
++#include <new>
+
+ void addPair(ObjectPtr object1, ObjectPtr object2);
+ void removePair(ObjectPtr object1, ObjectPtr object2);
+diff -aur src.old/modules/simu/simuv2/SOLID-2.0/src/Object.cpp src/modules/simu/simuv2/SOLID-2.0/src/Object.cpp
+--- src.old/modules/simu/simuv2/SOLID-2.0/src/Object.cpp 2008-04-06 22:21:31.000000000 +0200
++++ src/modules/simu/simuv2/SOLID-2.0/src/Object.cpp 2008-04-06 22:22:40.000000000 +0200
+@@ -33,7 +33,7 @@
+ #include "Convex.h"
+ #include "Complex.h"
+
+-#include <new.h>
++#include <new>
+
+ Object::Object(DtObjectRef obj, ShapePtr shape) :
+ ref(obj),
+diff -aur src.old/modules/simu/simuv2/SOLID-2.0/src/Polyhedron.cpp src/modules/simu/simuv2/SOLID-2.0/src/Polyhedron.cpp
+--- src.old/modules/simu/simuv2/SOLID-2.0/src/Polyhedron.cpp 2008-04-06 22:21:31.000000000 +0200
++++ src/modules/simu/simuv2/SOLID-2.0/src/Polyhedron.cpp 2008-04-06 22:22:12.000000000 +0200
+@@ -37,7 +37,7 @@
+ }
+
+ #include <vector>
+-#include <new.h>
++#include <new>
+
+ typedef vector<unsigned int> IndexBuf;
+
diff --git a/community-testing/torcs/torcs.desktop b/community-testing/torcs/torcs.desktop
new file mode 100644
index 000000000..03d1ba010
--- /dev/null
+++ b/community-testing/torcs/torcs.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=TORCS
+Comment=The Open Racing Car Simulator
+Exec=torcs
+Icon=torcs.png
+Terminal=false
+Type=Application
+Encoding=UTF-8
+Categories=Application;Game;
diff --git a/community-testing/torcs/torcs.sh b/community-testing/torcs/torcs.sh
new file mode 100644
index 000000000..0f1b4fe8d
--- /dev/null
+++ b/community-testing/torcs/torcs.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+export PATH=$PATH:/opt/torcs/bin