summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-04-09 22:16:47 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-04-09 22:16:47 +0000
commitac6286193fce63da1d1da1a7cc9dad47b79a2459 (patch)
tree6f5b3218fef5888478de80b6e8cd86a3c9984d83 /games
parentHexalate is a color matching game. The goal of the game is to rotate (diff)
Rigs of Rods (also known as RoR), is a truck, car, airplane and
boat simulator. You can drive, fly or sail in total freedom in an open environment. What makes RoR different to most simulators is its unique soft-body physics: vehicles chassis and wheels are simulated in real-time as flexible objects, giving the simulation an extremely accurate behavior, while allowing the vehicles to be simply specified by their structural composition, as a network of interconnected nodes (forming the chassis and the wheels). Crashing into walls or terrain can permanently deform a vehicle in a realistic manner. In addition to its unique soft-body physics, RoR also features an advanced flight model based on blade element theory, allowing the accurate simulation of any airplane, base on their physical dimensions and wing airfoils. It also features an accurate buoyancy model based on elemental pressure gradients, enabling boats with complex hulls to move realistically in the swell. WWW: http://www.rigsofrods.com/
Notes
Notes: svn path=/head/; revision=231956
Diffstat (limited to 'games')
-rw-r--r--games/Makefile1
-rw-r--r--games/rigsofrods/Makefile103
-rw-r--r--games/rigsofrods/distinfo6
-rw-r--r--games/rigsofrods/files/RoR.sh.in19
-rw-r--r--games/rigsofrods/files/patch-CMakeLists.txt19
-rw-r--r--games/rigsofrods/files/patch-configurator-CMakeLists.txt26
-rw-r--r--games/rigsofrods/files/patch-configurator-source-configurator.cpp31
-rw-r--r--games/rigsofrods/files/patch-dependencies-CMakeLists.txt21
-rw-r--r--games/rigsofrods/files/patch-dependencies-mygui-CMakeLists.txt14
-rw-r--r--games/rigsofrods/files/patch-dependencies-ogrenew-OgreMain-CMakeLists.txt11
-rw-r--r--games/rigsofrods/files/patch-dependencies-ogrenew-OgreMain-include-OgreAxisAlignedBox.h13
-rw-r--r--games/rigsofrods/files/patch-dependencies-ogrenew-RenderSystems-GL-CMakeLists.txt31
-rw-r--r--games/rigsofrods/files/patch-main-CMakeLists.txt68
-rw-r--r--games/rigsofrods/files/patch-main-source-Beam.cpp10
-rw-r--r--games/rigsofrods/files/patch-main-source-InputEngine.cpp35
-rw-r--r--games/rigsofrods/files/patch-main-source-Settings.cpp22
-rw-r--r--games/rigsofrods/files/rorconfig.sh.in16
-rw-r--r--games/rigsofrods/pkg-descr17
-rw-r--r--games/rigsofrods/pkg-message13
-rw-r--r--games/rigsofrods/pkg-plist229
20 files changed, 705 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index 4527025ecf34..a02f534afaab 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -722,6 +722,7 @@
SUBDIR += race
SUBDIR += reminiscence
SUBDIR += rfksay
+ SUBDIR += rgsofrods
SUBDIR += ri-li
SUBDIR += robocode
SUBDIR += robotfindskitten
diff --git a/games/rigsofrods/Makefile b/games/rigsofrods/Makefile
new file mode 100644
index 000000000000..eb44cb367e40
--- /dev/null
+++ b/games/rigsofrods/Makefile
@@ -0,0 +1,103 @@
+# New ports collection makefile for: rigsofrods
+# Date created: 05 Mar 2009
+# Whom: Dmitry Marakasov <amdmi3@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= rigsofrods
+PORTVERSION= 0.36.1
+CATEGORIES= games
+# I've trimmed source tarball by around 10x and bundled rorserver
+MASTER_SITES= SF:contents \
+ http://mirror.amdmi3.ru:game
+DISTFILES= ${PORTNAME}-source-${PORTVERSION}-trimmed${EXTRACT_SUFX}:game \
+ ${PORTNAME}-contents-${PORTVERSION}.zip:contents
+EXTRACT_ONLY= ${PORTNAME}-source-${PORTVERSION}-trimmed${EXTRACT_SUFX}
+
+MAINTAINER= amdmi3@FreeBSD.org
+COMMENT= Truck, car, airplane and boat simulator with advanced physics
+
+LIB_DEPENDS= openal.0:${PORTSDIR}/audio/openal \
+ zzip.13:${PORTSDIR}/devel/zziplib \
+ freetype.9:${PORTSDIR}/print/freetype2 \
+ CEGUIBase.3:${PORTSDIR}/graphics/cegui \
+ freeimage:${PORTSDIR}/graphics/freeimage
+BUILD_DEPENDS= ${LOCALBASE}/lib/libOIS.so:${PORTSDIR}/devel/ois \
+ unzip:${PORTSDIR}/archivers/unzip
+RUN_DEPENDS= ${LOCALBASE}/lib/libOIS.so:${PORTSDIR}/devel/ois \
+ xset:${PORTSDIR}/x11/xset
+
+USE_XORG= x11 xt xaw sm ice xext
+WRKSRC= ${WRKDIR}/${PORTVERSION}/build
+USE_WX= 2.6+
+WX_UNICODE= yes
+MAKE_JOBS_SAFE= yes
+
+USE_CMAKE= yes
+# CG unavailable for FreeBSD; paged also requires CG
+CMAKE_ARGS= -DROR_BUILD_HYDRAX=TRUE \
+ -DROR_BUILD_PAGED=FALSE \
+ -DROR_BUILD_LUASCRIPT=TRUE \
+ -DROR_BUILD_CONFIGURATOR=TRUE \
+ -DOGRE_BUILD_PLUGIN_CG=FALSE \
+ -DLOCALBASE="${LOCALBASE}" \
+ -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}"
+CMAKE_USE_PTHREAD= yes
+
+PORTDOCS= *
+
+SUB_FILES= RoR.sh rorconfig.sh
+
+LIB_FILES= dependencies/ogrenew/OgreMain/libOgreMain.so.1 \
+ dependencies/ogrenew/PlugIns/OctreeSceneManager/Plugin_OctreeSceneManager.so \
+ dependencies/ogrenew/PlugIns/ParticleFX/Plugin_ParticleFX.so \
+ dependencies/ogrenew/RenderSystems/GL/RenderSystem_GL.so \
+ dependencies/Caelum-2006-11-09/libcaelum.so \
+ dependencies/mygui/libmygui.so \
+ dependencies/mysocketw/libmysocketw.so
+
+post-extract:
+ @${RM} -rf ${WRKSRC}/dependencies/ogrenew/Dependencies
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|; \
+ s|%%PREFIX%%|${PREFIX}|' \
+ ${WRKSRC}/main/source/Settings.cpp \
+ ${WRKSRC}/configurator/source/configurator.cpp
+
+do-install:
+# libs
+ ${MKDIR} ${PREFIX}/lib/${PORTNAME}
+.for f in ${LIB_FILES}
+ ${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/lib/${PORTNAME}
+.endfor
+
+# binaries
+ ${MKDIR} ${PREFIX}/libexec/${PORTNAME}
+ ${INSTALL_PROGRAM} ${WRKSRC}/main/RoR ${PREFIX}/libexec/${PORTNAME}
+ ${INSTALL_PROGRAM} ${WRKSRC}/configurator/rorconfig ${PREFIX}/libexec/${PORTNAME}
+
+# data
+ ${MKDIR} ${DATADIR}
+ ${SED} -e '/Plugin_CgProgramManager/ s|^|#|' \
+ < ${WRKSRC}/bin/release/linux/plugins.cfg \
+ > ${DATADIR}/plugins.cfg
+ unzip -qq -o -d ${DATADIR} ${DISTDIR}/${PORTNAME}-contents-${PORTVERSION}.zip \
+ languages/\* resources/\* skeleton/\* streams/\*
+
+# wrappers
+ ${INSTALL_SCRIPT} ${WRKDIR}/RoR.sh ${PREFIX}/bin/RoR
+ ${INSTALL_SCRIPT} ${WRKDIR}/rorconfig.sh ${PREFIX}/bin/rorconfig
+
+#docs
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ unzip -qq -o -d ${DOCSDIR} ${DISTDIR}/${PORTNAME}-contents-${PORTVERSION}.zip \
+ \*.pdf
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/games/rigsofrods/distinfo b/games/rigsofrods/distinfo
new file mode 100644
index 000000000000..df22dc9b02db
--- /dev/null
+++ b/games/rigsofrods/distinfo
@@ -0,0 +1,6 @@
+MD5 (rigsofrods-source-0.36.1-trimmed.tar.gz) = ae4d305535c780c271da375b2fd42f5c
+SHA256 (rigsofrods-source-0.36.1-trimmed.tar.gz) = 4a923bfd652bd8398aa2f21022fe72a083905d1ee7696bf10e3b781478d9b7ed
+SIZE (rigsofrods-source-0.36.1-trimmed.tar.gz) = 21781314
+MD5 (rigsofrods-contents-0.36.1.zip) = bfa066124b7e8ca48bc0dce45149c886
+SHA256 (rigsofrods-contents-0.36.1.zip) = c3fe969f67cea9a8b2750271fe2b03f6f522dda9f07bc1a47cb9dda8e95c09e9
+SIZE (rigsofrods-contents-0.36.1.zip) = 122490754
diff --git a/games/rigsofrods/files/RoR.sh.in b/games/rigsofrods/files/RoR.sh.in
new file mode 100644
index 000000000000..1b36d310b6be
--- /dev/null
+++ b/games/rigsofrods/files/RoR.sh.in
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+RORDIR=%%PREFIX%%/lib/rigsofrods
+DOTDIR=$HOME/.RigsOfRods
+
+if [ ! -e "$DOTDIR" ]; then
+ echo "Populating $DOTDIR..."
+ cd %%DATADIR%%/skeleton && find . -type d -exec mkdir -p "$DOTDIR/{}" \;
+ cd %%DATADIR%%/skeleton && find . -type f -exec cp -n {} "$DOTDIR/{}" \;
+fi
+
+LD_LIBRARY_PATH=$RORDIR:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH
+
+cd $RORDIR
+%%PREFIX%%/libexec/rigsofrods/RoR "$@"
+
+# re-enable key repeat (which is disabled by RoR for some reason)
+xset r
diff --git a/games/rigsofrods/files/patch-CMakeLists.txt b/games/rigsofrods/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..8568c1382702
--- /dev/null
+++ b/games/rigsofrods/files/patch-CMakeLists.txt
@@ -0,0 +1,19 @@
+--- CMakeLists.txt.orig 2009-02-22 20:59:55.000000000 +0300
++++ CMakeLists.txt 2009-03-05 04:01:24.000000000 +0300
+@@ -3,11 +3,11 @@
+ project(RoR)
+
+ #detup the default build mode
+-IF(NOT CMAKE_BUILD_TYPE)
+- SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
+- "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
+- FORCE)
+-ENDIF(NOT CMAKE_BUILD_TYPE)
++#IF(NOT CMAKE_BUILD_TYPE)
++# SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
++# "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
++# FORCE)
++#ENDIF(NOT CMAKE_BUILD_TYPE)
+
+ # setup path for cmake add-ons
+ SET(RoR_Dependencies_CMAKE_DIR "${RoR_SOURCE_DIR}/dependencies/cmake")
diff --git a/games/rigsofrods/files/patch-configurator-CMakeLists.txt b/games/rigsofrods/files/patch-configurator-CMakeLists.txt
new file mode 100644
index 000000000000..7f5ca51b8264
--- /dev/null
+++ b/games/rigsofrods/files/patch-configurator-CMakeLists.txt
@@ -0,0 +1,26 @@
+--- configurator/CMakeLists.txt.orig 2009-02-22 20:59:55.000000000 +0300
++++ configurator/CMakeLists.txt 2009-03-07 03:57:31.000000000 +0300
+@@ -22,9 +22,12 @@
+ link_directories (${wxWidgets_LIB_DIR})
+ include_directories (${RoR_Dependencies_SOURCE_DIR}/rorserver-sf/source)
+ include_directories (${RoR_Dependencies_SOURCE_DIR}/ogrenew/OgreMain/include)
+- include_directories (${RoR_Dependencies_SOURCE_DIR}/ogrenew/Dependencies/include)
+- include_directories (${RoR_Dependencies_SOURCE_DIR}/OIS-HEAD/ois/includes)
++ # include_directories (${RoR_Dependencies_SOURCE_DIR}/ogrenew/Dependencies/include)
++ # include_directories (${RoR_Dependencies_SOURCE_DIR}/OIS-HEAD/ois/includes)
+ include_directories (${RoR_Main_SOURCE_DIR}/source)
++ include_directories (${LOCALBASE}/include/OIS)
++
++ add_definitions("-D\"strnlen(a,b)=strlen(a)\"")
+
+ SET(config_source ${config_source} ${RoR_SOURCE_DIR}/main/source/InputEngine.cpp)
+
+@@ -43,7 +46,7 @@
+
+ add_executable(rorconfig ${config_source} ${config_headers} ${config_res})
+ TARGET_LINK_LIBRARIES(rorconfig ${wxWidgets_LIBRARIES} )
+- target_link_libraries(rorconfig OgreMain ois)
++ target_link_libraries(rorconfig OgreMain ${LOCALBASE}/lib/libOIS.so)
+
+ IF(WIN32)
+ SET_TARGET_PROPERTIES(rorconfig PROPERTIES COMPILE_FLAGS "")
diff --git a/games/rigsofrods/files/patch-configurator-source-configurator.cpp b/games/rigsofrods/files/patch-configurator-source-configurator.cpp
new file mode 100644
index 000000000000..5bf3db1d82fb
--- /dev/null
+++ b/games/rigsofrods/files/patch-configurator-source-configurator.cpp
@@ -0,0 +1,31 @@
+--- configurator/source/configurator.cpp.orig 2009-02-22 20:59:55.000000000 +0300
++++ configurator/source/configurator.cpp 2009-04-09 07:25:25.000000000 +0400
+@@ -1109,17 +1109,12 @@
+ char procpath[256];
+ char user_path[1024];
+ char program_path[1024];
+- sprintf(procpath, "/proc/%d/exe", pid);
+- int ch = readlink(procpath,program_path,240);
+- if (ch != -1)
+- {
+- program_path[ch] = 0;
+- } else return false;
++ strcpy(program_path, "%%DATADIR%%/");
+ ProgramPath=wxFileName(wxString(conv(program_path))).GetPath();
+ //user path is easy
+ strncpy(user_path, getenv ("HOME"), 240);
+ wxFileName tfn=wxFileName(conv(user_path), wxEmptyString);
+- tfn.AppendDir(_T("RigsOfRods"));
++ tfn.AppendDir(_T(".RigsOfRods"));
+ UserPath=tfn.GetPath();
+ #endif
+ #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+@@ -2692,7 +2687,7 @@
+ CreateProcess(NULL, wpath, NULL, NULL, false, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi);
+ #endif
+ #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
+- execl("./RoR.bin", "", (char *) 0);
++ execl("%%PREFIX%%/bin/RoR", "", (char *) 0);
+ #endif
+ #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+ FSRef ref;
diff --git a/games/rigsofrods/files/patch-dependencies-CMakeLists.txt b/games/rigsofrods/files/patch-dependencies-CMakeLists.txt
new file mode 100644
index 000000000000..53c2fbfe7662
--- /dev/null
+++ b/games/rigsofrods/files/patch-dependencies-CMakeLists.txt
@@ -0,0 +1,21 @@
+--- dependencies/CMakeLists.txt.orig 2009-02-22 20:59:55.000000000 +0300
++++ dependencies/CMakeLists.txt 2009-03-05 03:49:28.000000000 +0300
+@@ -6,9 +6,9 @@
+ endif(ROR_BUILD_LUASCRIPT)
+
+ add_subdirectory("mysocketw")
+-add_subdirectory("OIS-HEAD")
++#add_subdirectory("OIS-HEAD")
+ #add_subdirectory("openal-soft-1.5.304")
+-add_subdirectory("openal-soft-1.6.372")
++#add_subdirectory("openal-soft-1.6.372")
+
+ set(OGRE_SET_DISABLE_FREEIMAGE 1)
+ add_subdirectory("ogrenew")
+@@ -34,4 +34,4 @@
+ add_subdirectory("raknet")
+ endif(ROR_BUILD_NEWNET)
+
+-add_subdirectory("mygui")
+\ No newline at end of file
++add_subdirectory("mygui")
diff --git a/games/rigsofrods/files/patch-dependencies-mygui-CMakeLists.txt b/games/rigsofrods/files/patch-dependencies-mygui-CMakeLists.txt
new file mode 100644
index 000000000000..28cb009312a6
--- /dev/null
+++ b/games/rigsofrods/files/patch-dependencies-mygui-CMakeLists.txt
@@ -0,0 +1,14 @@
+--- dependencies/mygui/CMakeLists.txt.orig 2009-02-22 20:59:55.000000000 +0300
++++ dependencies/mygui/CMakeLists.txt 2009-03-05 05:39:37.000000000 +0300
+@@ -4,8 +4,9 @@
+ include_directories (include)
+
+ include_directories (${RoR_Dependencies_SOURCE_DIR}/ogrenew/OgreMain/include)
+-include_directories (${RoR_Dependencies_SOURCE_DIR}/ogrenew/Dependencies/include) # for freetype
+-include_directories (${RoR_Dependencies_SOURCE_DIR}/OIS-HEAD/ois/includes)
++include_directories (${LOCALBASE}/include/freetype2)
++include_directories (${LOCALBASE}/include/OIS)
++include_directories (${LOCALBASE}/include)
+
+ # -DHYDRAX_LIB will give us the correct dllspec export setting
+ add_definitions("-D_USRDLL -DMYGUI_BUILD")
diff --git a/games/rigsofrods/files/patch-dependencies-ogrenew-OgreMain-CMakeLists.txt b/games/rigsofrods/files/patch-dependencies-ogrenew-OgreMain-CMakeLists.txt
new file mode 100644
index 000000000000..fdee2df2b828
--- /dev/null
+++ b/games/rigsofrods/files/patch-dependencies-ogrenew-OgreMain-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- dependencies/ogrenew/OgreMain/CMakeLists.txt.orig 2009-02-22 20:59:55.000000000 +0300
++++ dependencies/ogrenew/OgreMain/CMakeLists.txt 2009-03-05 05:36:44.000000000 +0300
+@@ -449,7 +449,7 @@
+ set(PLATFORM_LIBS ${X11_LIBRARIES} ${X11_Xt_LIB} ${XAW_LIBRARY})
+ set(PLATFORM_HEADER_INSTALL "GLX")
+
+- set(FREEIMAGE_INCLUDE_DIR ${FREEIMAGE_INCLUDE_DIR} /usr/include/freetype2)
++ set(FREEIMAGE_INCLUDE_DIR ${FREEIMAGE_INCLUDE_DIR} ${LOCALBASE}/include/freetype2)
+ elseif (APPLE)
+ include_directories("include/OSX")
+ endif(WIN32)
diff --git a/games/rigsofrods/files/patch-dependencies-ogrenew-OgreMain-include-OgreAxisAlignedBox.h b/games/rigsofrods/files/patch-dependencies-ogrenew-OgreMain-include-OgreAxisAlignedBox.h
new file mode 100644
index 000000000000..2561f354cd3c
--- /dev/null
+++ b/games/rigsofrods/files/patch-dependencies-ogrenew-OgreMain-include-OgreAxisAlignedBox.h
@@ -0,0 +1,13 @@
+--- dependencies/ogrenew/OgreMain/include/OgreAxisAlignedBox.h.orig 2009-02-22 20:59:55.000000000 +0300
++++ dependencies/ogrenew/OgreMain/include/OgreAxisAlignedBox.h 2009-04-08 05:57:39.000000000 +0400
+@@ -235,8 +235,8 @@
+ */
+ inline void setExtents( const Vector3& min, const Vector3& max )
+ {
+- assert( (min.x <= max.x && min.y <= max.y && min.z <= max.z) &&
+- "The minimum corner of the box must be less than or equal to maximum corner" );
++// assert( (min.x <= max.x && min.y <= max.y && min.z <= max.z) &&
++// "The minimum corner of the box must be less than or equal to maximum corner" );
+
+ mExtent = EXTENT_FINITE;
+ mMinimum = min;
diff --git a/games/rigsofrods/files/patch-dependencies-ogrenew-RenderSystems-GL-CMakeLists.txt b/games/rigsofrods/files/patch-dependencies-ogrenew-RenderSystems-GL-CMakeLists.txt
new file mode 100644
index 000000000000..2ba581700064
--- /dev/null
+++ b/games/rigsofrods/files/patch-dependencies-ogrenew-RenderSystems-GL-CMakeLists.txt
@@ -0,0 +1,31 @@
+--- dependencies/ogrenew/RenderSystems/GL/CMakeLists.txt.orig 2009-02-22 20:59:55.000000000 +0300
++++ dependencies/ogrenew/RenderSystems/GL/CMakeLists.txt 2009-03-05 04:57:40.000000000 +0300
+@@ -157,16 +157,19 @@
+ src/GLX/OgreGLXWindow.cpp
+ src/GLX/OgreGLXUtils.cpp
+ )
+- include_directories(src/GLX include/GLX)
++ include_directories(BEFORE src/GLX include/GLX)
+ elseif (APPLE)
+ endif ()
+
+
+-include_directories(
++include_directories(BEFORE
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/GLSL/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/atifs/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/nvparse
++)
++
++include_directories(
+ ${OPENGL_INCLUDE_DIR}
+ )
+
+@@ -188,4 +191,4 @@
+ RUNTIME DESTINATION ${BIN_DIR}
+ LIBRARY DESTINATION ${BIN_DIR}
+ ARCHIVE DESTINATION ${LIB_DIR})
+-
+\ No newline at end of file
++
diff --git a/games/rigsofrods/files/patch-main-CMakeLists.txt b/games/rigsofrods/files/patch-main-CMakeLists.txt
new file mode 100644
index 000000000000..792e0782bf7e
--- /dev/null
+++ b/games/rigsofrods/files/patch-main-CMakeLists.txt
@@ -0,0 +1,68 @@
+--- main/CMakeLists.txt.orig 2009-02-22 20:59:55.000000000 +0300
++++ main/CMakeLists.txt 2009-03-06 03:01:23.000000000 +0300
+@@ -12,12 +12,13 @@
+ include_directories (${RoR_Dependencies_SOURCE_DIR}/Caelum-2006-11-09/include)
+ endif(CAELUM_BUILD_NEW)
+
+-include_directories (${RoR_Dependencies_SOURCE_DIR}/openal-soft-1.6.372/include/AL)
+-include_directories (${RoR_Dependencies_SOURCE_DIR}/openal-soft-1.6.372/include)
+-include_directories (${RoR_Dependencies_SOURCE_DIR}/OIS-HEAD/ois/includes)
+ include_directories (${RoR_Dependencies_SOURCE_DIR}/moFileReader/include)
+ include_directories (${RoR_Dependencies_SOURCE_DIR}/rorserver-sf/source)
+ include_directories (${RoR_Dependencies_SOURCE_DIR}/mygui/include)
++include_directories (${LOCALBASE}/include/OIS)
++include_directories (${LOCALBASE}/include/AL)
++
++add_definitions("-D\"strnlen(a,b)=strlen(a)\"")
+
+ IF(WIN32)
+ add_definitions("-D_CRT_SECURE_NO_WARNINGS")
+@@ -98,7 +99,7 @@
+ add_executable(RoR ${ror_src} source/icon.rc)
+
+ # add dependencies
+-add_dependencies(RoR OgreMain caelum mysocketw ois mygui mofilereader)
++add_dependencies(RoR OgreMain caelum mysocketw mygui mofilereader)
+
+ # optional features
+ if(ROR_BUILD_HYDRAX)
+@@ -132,7 +133,6 @@
+ caelum
+ mysocketw
+ OgreMain
+- ois
+ mygui
+ mofilereader
+ )
+@@ -152,9 +152,8 @@
+
+ target_link_libraries(RoR openal32)
+ ELSEIF(UNIX)
+- SET_TARGET_PROPERTIES(RoR PROPERTIES COMPILE_FLAGS "-msse2 -msse2 -mmmx -msse -msse3 -mssse3 -m3dnow")
++ SET_TARGET_PROPERTIES(RoR PROPERTIES COMPILE_FLAGS "-msse2 -msse2 -mmmx -msse -msse3 -m3dnow")
+ SET_TARGET_PROPERTIES(RoR PROPERTIES LINK_FLAGS "")
+- target_link_libraries(RoR openal)
+ ELSEIF(APPLE)
+ ENDIF(WIN32)
+
+@@ -191,12 +190,14 @@
+ ELSEIF(UNIX)
+ target_link_libraries(RoR
+ # /usr/lib/libossp-uuid_dce.so
+- /usr/lib/libzzip.so
+- /usr/lib/libfreetype.so
+- /usr/lib/libX11.so
+- /usr/lib/libXt.so
+-
+- /usr/lib/libXaw.so
++ ${LOCALBASE}/lib/libzzip.so
++ ${LOCALBASE}/lib/libfreetype.so
++ ${LOCALBASE}/lib/libX11.so
++ ${LOCALBASE}/lib/libXt.so
++
++ ${LOCALBASE}/lib/libXaw.so
++ ${LOCALBASE}/lib/libOIS.so
++ ${LOCALBASE}/lib/libopenal.so
+ )
+ ELSEIF(APPLE)
+ ENDIF(WIN32)
diff --git a/games/rigsofrods/files/patch-main-source-Beam.cpp b/games/rigsofrods/files/patch-main-source-Beam.cpp
new file mode 100644
index 000000000000..e12ab89b74af
--- /dev/null
+++ b/games/rigsofrods/files/patch-main-source-Beam.cpp
@@ -0,0 +1,10 @@
+--- main/source/Beam.cpp.orig 2009-02-22 20:59:55.000000000 +0300
++++ main/source/Beam.cpp 2009-03-07 17:36:32.000000000 +0300
+@@ -293,6 +293,7 @@
+
+ }
+ #endif
++ skidNode = 0;
+
+ collisions=icollisions;
+
diff --git a/games/rigsofrods/files/patch-main-source-InputEngine.cpp b/games/rigsofrods/files/patch-main-source-InputEngine.cpp
new file mode 100644
index 000000000000..54f6515f0658
--- /dev/null
+++ b/games/rigsofrods/files/patch-main-source-InputEngine.cpp
@@ -0,0 +1,35 @@
+--- main/source/InputEngine.cpp.orig 2009-02-22 20:59:55.000000000 +0300
++++ main/source/InputEngine.cpp 2009-03-06 02:56:37.000000000 +0300
+@@ -46,10 +46,10 @@
+ #define OIS_DYNAMIC_LIB
+ #include <OIS.h>
+
+-#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
+-#include <X11/Xlib.h>
+-#include <linux/LinuxMouse.h>
+-#endif
++//#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
++//#include <X11/Xlib.h>
++//#include <linux/LinuxMouse.h>
++//#endif
+
+ using namespace std;
+ using namespace Ogre;
+@@ -204,7 +204,7 @@
+ if((enable && lastmode == 0) || (!enable && lastmode == 1) || (lastmode == -1))
+ {
+ LogManager::getSingleton().logMessage("*** mouse grab: " + StringConverter::toString(enable));
+- ((LinuxMouse *)mMouse)->grab(enable);
++ //((LinuxMouse *)mMouse)->grab(enable);
+ lastmode = enable?1:0;
+ }
+ #endif
+@@ -218,7 +218,7 @@
+ #if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
+ if((visible && mode == 0) || (!visible && mode == 1) || mode == -1)
+ {
+- ((LinuxMouse *)mMouse)->hide(visible);
++ //((LinuxMouse *)mMouse)->hide(visible);
+ mode = visible?1:0;
+ }
+ #endif
diff --git a/games/rigsofrods/files/patch-main-source-Settings.cpp b/games/rigsofrods/files/patch-main-source-Settings.cpp
new file mode 100644
index 000000000000..50c6c9a5a671
--- /dev/null
+++ b/games/rigsofrods/files/patch-main-source-Settings.cpp
@@ -0,0 +1,22 @@
+--- main/source/Settings.cpp.orig 2009-02-22 20:59:55.000000000 +0300
++++ main/source/Settings.cpp 2009-04-09 07:24:33.000000000 +0400
+@@ -123,17 +123,10 @@
+ //true program path is impossible to get from POSIX functions
+ //lets hack!
+ pid_t pid = getpid();
+- char procpath[256];
+- sprintf(procpath, "/proc/%d/exe", pid);
+- int ch = readlink(procpath,program_path,240);
+- if (ch != -1)
+- {
+- program_path[ch] = 0;
+- path_descend(program_path);
+- } else return false;
++ strcpy(program_path, "%%DATADIR%%/");
+ //user path is easy
+ strncpy(user_path, getenv ("HOME"), 240);
+- sprintf(user_path, "%s/RigsOfRods/", user_path);
++ sprintf(user_path, "%s/.RigsOfRods/", user_path);
+ #elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+ //found this code, will look later
+ std::string path = "./";
diff --git a/games/rigsofrods/files/rorconfig.sh.in b/games/rigsofrods/files/rorconfig.sh.in
new file mode 100644
index 000000000000..0ad09b1033f4
--- /dev/null
+++ b/games/rigsofrods/files/rorconfig.sh.in
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+RORDIR=%%PREFIX%%/lib/rigsofrods
+DOTDIR=$HOME/.RigsOfRods
+
+if [ ! -e "$DOTDIR" ]; then
+ echo "Populating $DOTDIR..."
+ cd %%DATADIR%%/skeleton && find . -type d -exec mkdir -p "$DOTDIR/{}" \;
+ cd %%DATADIR%%/skeleton && find . -type f -exec cp -n {} "$DOTDIR/{}" \;
+fi
+
+LD_LIBRARY_PATH=$RORDIR:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH
+
+cd $RORDIR
+exec %%PREFIX%%/libexec/rigsofrods/rorconfig "$@"
diff --git a/games/rigsofrods/pkg-descr b/games/rigsofrods/pkg-descr
new file mode 100644
index 000000000000..fe72406d5177
--- /dev/null
+++ b/games/rigsofrods/pkg-descr
@@ -0,0 +1,17 @@
+Rigs of Rods (also known as RoR), is a truck, car, airplane and
+boat simulator. You can drive, fly or sail in total freedom in an
+open environment. What makes RoR different to most simulators is
+its unique soft-body physics: vehicles chassis and wheels are
+simulated in real-time as flexible objects, giving the simulation
+an extremely accurate behavior, while allowing the vehicles to be
+simply specified by their structural composition, as a network of
+interconnected nodes (forming the chassis and the wheels). Crashing
+into walls or terrain can permanently deform a vehicle in a realistic
+manner. In addition to its unique soft-body physics, RoR also
+features an advanced flight model based on blade element theory,
+allowing the accurate simulation of any airplane, base on their
+physical dimensions and wing airfoils. It also features an accurate
+buoyancy model based on elemental pressure gradients, enabling boats
+with complex hulls to move realistically in the swell.
+
+WWW: http://www.rigsofrods.com/
diff --git a/games/rigsofrods/pkg-message b/games/rigsofrods/pkg-message
new file mode 100644
index 000000000000..e4e8ddeb3417
--- /dev/null
+++ b/games/rigsofrods/pkg-message
@@ -0,0 +1,13 @@
+==========================================================================
+
+Note that RoR was built without CgProgramManager ogre3d plugin
+(which is not avialable for FreeBSD because it depends on proprietary
+NVidia CG Toolkit), which means that some visual effects will either
+not work or will prevent game from running. You can always run
+rorconfig and disable them.
+
+Also note that there's some sound problems still unresolved.
+
+Don't forget to run rorconfig before running the game.
+
+==========================================================================
diff --git a/games/rigsofrods/pkg-plist b/games/rigsofrods/pkg-plist
new file mode 100644
index 000000000000..6e7f99df5303
--- /dev/null
+++ b/games/rigsofrods/pkg-plist
@@ -0,0 +1,229 @@
+bin/RoR
+bin/rorconfig
+lib/rigsofrods/Plugin_OctreeSceneManager.so
+lib/rigsofrods/Plugin_ParticleFX.so
+lib/rigsofrods/RenderSystem_GL.so
+lib/rigsofrods/libOgreMain.so.1
+lib/rigsofrods/libcaelum.so
+lib/rigsofrods/libmygui.so
+lib/rigsofrods/libmysocketw.so
+libexec/rigsofrods/RoR
+libexec/rigsofrods/rorconfig
+%%DATADIR%%/languages/ar/codes.txt
+%%DATADIR%%/languages/ar/ror.mo
+%%DATADIR%%/languages/ar/ror.po
+%%DATADIR%%/languages/bg/codes.txt
+%%DATADIR%%/languages/bg/ror.mo
+%%DATADIR%%/languages/bg/ror.po
+%%DATADIR%%/languages/bn/codes.txt
+%%DATADIR%%/languages/bn/ror.mo
+%%DATADIR%%/languages/bn/ror.po
+%%DATADIR%%/languages/cs/codes.txt
+%%DATADIR%%/languages/cs/ror.mo
+%%DATADIR%%/languages/cs/ror.po
+%%DATADIR%%/languages/da/codes.txt
+%%DATADIR%%/languages/da/ror.mo
+%%DATADIR%%/languages/da/ror.po
+%%DATADIR%%/languages/de/codes.txt
+%%DATADIR%%/languages/de/ror.mo
+%%DATADIR%%/languages/de/ror.po
+%%DATADIR%%/languages/el/codes.txt
+%%DATADIR%%/languages/el/ror.mo
+%%DATADIR%%/languages/el/ror.po
+%%DATADIR%%/languages/en/codes.txt
+%%DATADIR%%/languages/en/ror.mo
+%%DATADIR%%/languages/en/ror.po
+%%DATADIR%%/languages/es/codes.txt
+%%DATADIR%%/languages/es/ror.mo
+%%DATADIR%%/languages/es/ror.po
+%%DATADIR%%/languages/et/codes.txt
+%%DATADIR%%/languages/et/ror.mo
+%%DATADIR%%/languages/et/ror.po
+%%DATADIR%%/languages/fi/codes.txt
+%%DATADIR%%/languages/fi/ror.mo
+%%DATADIR%%/languages/fi/ror.po
+%%DATADIR%%/languages/fr/codes.txt
+%%DATADIR%%/languages/fr/ror.mo
+%%DATADIR%%/languages/fr/ror.po
+%%DATADIR%%/languages/hi/codes.txt
+%%DATADIR%%/languages/hi/ror.mo
+%%DATADIR%%/languages/hi/ror.po
+%%DATADIR%%/languages/hu/codes.txt
+%%DATADIR%%/languages/hu/ror.mo
+%%DATADIR%%/languages/hu/ror.po
+%%DATADIR%%/languages/id/codes.txt
+%%DATADIR%%/languages/id/ror.mo
+%%DATADIR%%/languages/id/ror.po
+%%DATADIR%%/languages/is/codes.txt
+%%DATADIR%%/languages/is/ror.mo
+%%DATADIR%%/languages/is/ror.po
+%%DATADIR%%/languages/it/codes.txt
+%%DATADIR%%/languages/it/ror.mo
+%%DATADIR%%/languages/it/ror.po
+%%DATADIR%%/languages/ja/codes.txt
+%%DATADIR%%/languages/ja/ror.po
+%%DATADIR%%/languages/la/codes.txt
+%%DATADIR%%/languages/la/ror.mo
+%%DATADIR%%/languages/la/ror.po
+%%DATADIR%%/languages/lt/codes.txt
+%%DATADIR%%/languages/lt/ror.mo
+%%DATADIR%%/languages/lt/ror.po
+%%DATADIR%%/languages/nl/codes.txt
+%%DATADIR%%/languages/nl/ror.mo
+%%DATADIR%%/languages/nl/ror.po
+%%DATADIR%%/languages/nn/codes.txt
+%%DATADIR%%/languages/nn/ror.mo
+%%DATADIR%%/languages/nn/ror.po
+%%DATADIR%%/languages/pl/codes.txt
+%%DATADIR%%/languages/pl/ror.mo
+%%DATADIR%%/languages/pl/ror.po
+%%DATADIR%%/languages/pt/codes.txt
+%%DATADIR%%/languages/pt/ror.mo
+%%DATADIR%%/languages/pt/ror.po
+%%DATADIR%%/languages/ro/codes.txt
+%%DATADIR%%/languages/ro/ror.mo
+%%DATADIR%%/languages/ro/ror.po
+%%DATADIR%%/languages/ru/codes.txt
+%%DATADIR%%/languages/ru/ror.mo
+%%DATADIR%%/languages/ru/ror.po
+%%DATADIR%%/languages/sk/codes.txt
+%%DATADIR%%/languages/sk/ror.mo
+%%DATADIR%%/languages/sk/ror.po
+%%DATADIR%%/languages/sl/codes.txt
+%%DATADIR%%/languages/sl/ror.mo
+%%DATADIR%%/languages/sl/ror.po
+%%DATADIR%%/languages/sv/codes.txt
+%%DATADIR%%/languages/sv/ror.mo
+%%DATADIR%%/languages/sv/ror.po
+%%DATADIR%%/languages/tr/codes.txt
+%%DATADIR%%/languages/tr/ror.mo
+%%DATADIR%%/languages/tr/ror.po
+%%DATADIR%%/languages/ur/codes.txt
+%%DATADIR%%/languages/ur/ror.mo
+%%DATADIR%%/languages/ur/ror.po
+%%DATADIR%%/languages/zh/codes.txt
+%%DATADIR%%/languages/zh/ror.mo
+%%DATADIR%%/languages/zh/ror.po
+%%DATADIR%%/plugins.cfg
+%%DATADIR%%/resources/OgreCore.zip
+%%DATADIR%%/resources/airfoils.zip
+%%DATADIR%%/resources/hydrax.zip
+%%DATADIR%%/resources/materials.zip
+%%DATADIR%%/resources/meshes.zip
+%%DATADIR%%/resources/mygui.zip
+%%DATADIR%%/resources/overlays.zip
+%%DATADIR%%/resources/paged.zip
+%%DATADIR%%/resources/particles.zip
+%%DATADIR%%/resources/scripts.zip
+%%DATADIR%%/resources/sounds.zip
+%%DATADIR%%/resources/textures.zip
+%%DATADIR%%/skeleton/config/RoR.cfg
+%%DATADIR%%/skeleton/config/categories.cfg
+%%DATADIR%%/skeleton/config/editor.cfg
+%%DATADIR%%/skeleton/config/ground_models.cfg
+%%DATADIR%%/skeleton/config/input.map
+%%DATADIR%%/skeleton/config/inputevents.cfg
+%%DATADIR%%/skeleton/config/ogre.cfg
+%%DATADIR%%/skeleton/config/wavefield.cfg
+%%DATADIR%%/streams/final/terrains/BajaTrack.zip
+%%DATADIR%%/streams/final/terrains/BakersRanch.zip
+%%DATADIR%%/streams/final/terrains/Flatmap.zip
+%%DATADIR%%/streams/final/terrains/aspen.zip
+%%DATADIR%%/streams/final/terrains/bajarama.zip
+%%DATADIR%%/streams/final/terrains/f1track.zip
+%%DATADIR%%/streams/final/terrains/grenoble.zip
+%%DATADIR%%/streams/final/terrains/island.zip
+%%DATADIR%%/streams/final/terrains/nhelens.zip
+%%DATADIR%%/streams/final/terrains/smallisland.zip
+%%DATADIR%%/streams/final/vehicles/1stGenDodges.zip
+%%DATADIR%%/streams/final/vehicles/767.zip
+%%DATADIR%%/streams/final/vehicles/AST1Xplanetowtruck.zip
+%%DATADIR%%/streams/final/vehicles/An-12.zip
+%%DATADIR%%/streams/final/vehicles/An225.zip
+%%DATADIR%%/streams/final/vehicles/BobcatS130.zip
+%%DATADIR%%/streams/final/vehicles/C1boat.zip
+%%DATADIR%%/streams/final/vehicles/Chemicaltrailer.zip
+%%DATADIR%%/streams/final/vehicles/ChevyS10.zip
+%%DATADIR%%/streams/final/vehicles/Dodge1500.zip
+%%DATADIR%%/streams/final/vehicles/DryVanTrailer.zip
+%%DATADIR%%/streams/final/vehicles/HouseBoat.zip
+%%DATADIR%%/streams/final/vehicles/Lexus.zip
+%%DATADIR%%/streams/final/vehicles/MANTGX.zip
+%%DATADIR%%/streams/final/vehicles/MTVR.zip
+%%DATADIR%%/streams/final/vehicles/Mig-25.zip
+%%DATADIR%%/streams/final/vehicles/P51.zip
+%%DATADIR%%/streams/final/vehicles/Panther.zip
+%%DATADIR%%/streams/final/vehicles/SprinterVans.zip
+%%DATADIR%%/streams/final/vehicles/agora.zip
+%%DATADIR%%/streams/final/vehicles/ampliroll.zip
+%%DATADIR%%/streams/final/vehicles/concorde.zip
+%%DATADIR%%/streams/final/vehicles/cranedaf.zip
+%%DATADIR%%/streams/final/vehicles/dafsemi.zip
+%%DATADIR%%/streams/final/vehicles/dakardaf.zip
+%%DATADIR%%/streams/final/vehicles/dodgecharger.zip
+%%DATADIR%%/streams/final/vehicles/dodgepolice.zip
+%%DATADIR%%/streams/final/vehicles/dodgeviper.zip
+%%DATADIR%%/streams/final/vehicles/hilux.zip
+%%DATADIR%%/streams/final/vehicles/jerseybarrier.zip
+%%DATADIR%%/streams/final/vehicles/k100.zip
+%%DATADIR%%/streams/final/vehicles/kerax.zip
+%%DATADIR%%/streams/final/vehicles/liebherr.zip
+%%DATADIR%%/streams/final/vehicles/meanmachines.zip
+%%DATADIR%%/streams/final/vehicles/renaultcrane.zip
+%%DATADIR%%/streams/final/vehicles/scaniawreckers.zip
+%%DATADIR%%/streams/final/vehicles/skiploader.zip
+%%DATADIR%%/streams/final/vehicles/smit.zip
+%%DATADIR%%/streams/final/vehicles/tatra813.zip
+%%DATADIR%%/streams/final/vehicles/travelgo.zip
+%%DATADIR%%/streams/final/vehicles/turbotwin.zip
+%%DATADIR%%/streams/final/vehicles/twinotter.zip
+%%DATADIR%%/streams/final/vehicles/wahoo.zip
+@dirrm %%DATADIR%%/streams/final/vehicles
+@dirrm %%DATADIR%%/streams/final/terrains
+@dirrm %%DATADIR%%/streams/final
+@dirrm %%DATADIR%%/streams
+@dirrm %%DATADIR%%/skeleton/vehicles
+@dirrm %%DATADIR%%/skeleton/terrains
+@dirrm %%DATADIR%%/skeleton/packs
+@dirrm %%DATADIR%%/skeleton/logs
+@dirrm %%DATADIR%%/skeleton/config
+@dirrm %%DATADIR%%/skeleton/cache
+@dirrm %%DATADIR%%/skeleton
+@dirrm %%DATADIR%%/resources
+@dirrm %%DATADIR%%/languages/zh
+@dirrm %%DATADIR%%/languages/ur
+@dirrm %%DATADIR%%/languages/tr
+@dirrm %%DATADIR%%/languages/sv
+@dirrm %%DATADIR%%/languages/sl
+@dirrm %%DATADIR%%/languages/sk
+@dirrm %%DATADIR%%/languages/ru
+@dirrm %%DATADIR%%/languages/ro
+@dirrm %%DATADIR%%/languages/pt
+@dirrm %%DATADIR%%/languages/pl
+@dirrm %%DATADIR%%/languages/nn
+@dirrm %%DATADIR%%/languages/nl
+@dirrm %%DATADIR%%/languages/lt
+@dirrm %%DATADIR%%/languages/la
+@dirrm %%DATADIR%%/languages/ja
+@dirrm %%DATADIR%%/languages/it
+@dirrm %%DATADIR%%/languages/is
+@dirrm %%DATADIR%%/languages/id
+@dirrm %%DATADIR%%/languages/hu
+@dirrm %%DATADIR%%/languages/hi
+@dirrm %%DATADIR%%/languages/fr
+@dirrm %%DATADIR%%/languages/fi
+@dirrm %%DATADIR%%/languages/et
+@dirrm %%DATADIR%%/languages/es
+@dirrm %%DATADIR%%/languages/en
+@dirrm %%DATADIR%%/languages/el
+@dirrm %%DATADIR%%/languages/de
+@dirrm %%DATADIR%%/languages/da
+@dirrm %%DATADIR%%/languages/cs
+@dirrm %%DATADIR%%/languages/bn
+@dirrm %%DATADIR%%/languages/bg
+@dirrm %%DATADIR%%/languages/ar
+@dirrm %%DATADIR%%/languages
+@dirrm %%DATADIR%%
+@dirrm libexec/rigsofrods
+@dirrm libexec
+@dirrm lib/rigsofrods