mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
added recipes for simutrans and simutrans_pak64
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
From 63efd2c2a2d1c45b8abdfbc0f4d76701dd2929c5 Mon Sep 17 00:00:00 2001
|
||||
From: none <user@shredder>
|
||||
Date: Fri, 29 May 2015 08:17:51 +0200
|
||||
Subject: adjust Makefile for Haiku x86_64 and edit configure.sh script to
|
||||
search for pthread in order to enable multithreading in Haiku
|
||||
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 0677ef0..90640ee 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -57,8 +57,7 @@ else
|
||||
else
|
||||
# Haiku (needs to activate the GCC 4x)
|
||||
ifeq ($(OSTYPE),haiku)
|
||||
- setarch x86
|
||||
- LIBS += -lnetwork -lbe -llocale
|
||||
+ LIBS += -lnetwork -lbe
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -118,7 +117,9 @@ ifneq ($(MULTI_THREAD),)
|
||||
#use lpthreadGC2d for debug alternatively
|
||||
LDFLAGS += -lpthreadGC2
|
||||
else
|
||||
- LDFLAGS += -lpthread
|
||||
+ ifneq ($(OSTYPE),haiku)
|
||||
+ LDFLAGS += -lpthread
|
||||
+ endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
diff --git a/configure.sh b/configure.sh
|
||||
index 918935f..9ddd40d 100644
|
||||
--- a/configure.sh
|
||||
+++ b/configure.sh
|
||||
@@ -4221,13 +4221,12 @@ fi
|
||||
|
||||
|
||||
# optional (but highly recommended) multithreading
|
||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_destroy in -lpthread" >&5
|
||||
-$as_echo_n "checking for pthread_mutex_destroy in -lpthread... " >&6; }
|
||||
-if ${ac_cv_lib_pthread_pthread_mutex_destroy+:} false; then :
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_destroy" >&5
|
||||
+$as_echo_n "checking for library containing pthread_mutex_destroy... " >&6; }
|
||||
+if ${ac_cv_search_pthread_mutex_destroy+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
- ac_check_lib_save_LIBS=$LIBS
|
||||
-LIBS="-lpthread $LIBS"
|
||||
+ ac_func_search_save_LIBS=$LIBS
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
diff --git a/simsys.cc b/simsys.cc
|
||||
index 49a1e26..9764f9e 100644
|
||||
--- a/simsys.cc
|
||||
+++ b/simsys.cc
|
||||
@@ -7,7 +7,9 @@
|
||||
#ifdef __HAIKU__
|
||||
#include <Message.h>
|
||||
#include <LocaleRoster.h>
|
||||
+#include <SupportDefs.h>
|
||||
#define NO_UINT32_TYPES
|
||||
+#define NO_UINT64_TYPES
|
||||
#endif
|
||||
|
||||
#include "macros.h"
|
||||
diff --git a/simtypes.h b/simtypes.h
|
||||
index b4ab8d2..b6cd4b2 100644
|
||||
--- a/simtypes.h
|
||||
+++ b/simtypes.h
|
||||
@@ -131,7 +131,9 @@ typedef unsigned long uint32;
|
||||
#endif
|
||||
#endif
|
||||
typedef signed long long sint64;
|
||||
+#ifndef NO_UINT64_TYPES
|
||||
typedef unsigned long long uint64;
|
||||
+#endif
|
||||
#ifdef _MSC_VER
|
||||
# define GCC_PACKED
|
||||
# define GCC_ALIGN(a)
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
From 03547db5cb4f0ee90d5fa739eabbc182c4445772 Mon Sep 17 00:00:00 2001
|
||||
From: none <user@shredder>
|
||||
Date: Fri, 29 May 2015 08:17:51 +0200
|
||||
Subject: adjust Makefile for Haiku x86_64 and prepare configure.ac for
|
||||
enabling multithread in Haiku
|
||||
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index aa0d57b..1df85ca 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -53,8 +53,7 @@ else
|
||||
else
|
||||
# Haiku (needs to activate the GCC 4x)
|
||||
ifeq ($(OSTYPE),haiku)
|
||||
- setarch x86
|
||||
- LIBS += -lnetwork -lbe -llocale
|
||||
+ LIBS += -lnetwork -lbe
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -114,7 +113,9 @@ ifneq ($(MULTI_THREAD),)
|
||||
#use lpthreadGC2d for debug alternatively
|
||||
LDFLAGS += -lpthreadGC2
|
||||
else
|
||||
- LDFLAGS += -lpthread
|
||||
+ ifneq ($(OSTYPE),haiku)
|
||||
+ LDFLAGS += -lpthread
|
||||
+ endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 85d5afd..d1e9b83 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -16,7 +16,7 @@ AC_CHECK_LIB(bz2, BZ2_bzReadOpen, [], [AC_MSG_WARN([Error, libbz2 is missing!])]
|
||||
AC_CHECK_LIB(freetype2, load_FT_font, [AC_SUBST(freetype2, '-DUSE_FREETYPE')], [AC_SUBST(freetype2, '')] )
|
||||
|
||||
# optional (but highly recommended) multithreading
|
||||
-AC_CHECK_LIB(pthread, pthread_mutex_destroy, [AC_SUBST(multithread, 1)], [AC_SUBST(multithread, 0)] )
|
||||
+AC_SEARCH_LIBS(pthread_mutex_destroy, pthread, [AC_SUBST(multithread, 1)], [AC_SUBST(multithread, 0)] )
|
||||
|
||||
# find OS and backend by libs ...
|
||||
AC_CHECK_LIB(SDL2, SDL_GetRenderDriverInfo)
|
||||
diff --git a/simsys.cc b/simsys.cc
|
||||
index e4dc228..2ef7bac 100644
|
||||
--- a/simsys.cc
|
||||
+++ b/simsys.cc
|
||||
@@ -7,7 +7,9 @@
|
||||
#ifdef __HAIKU__
|
||||
#include <Message.h>
|
||||
#include <LocaleRoster.h>
|
||||
+#include <SupportDefs.h>
|
||||
#define NO_UINT32_TYPES
|
||||
+#define NO_UINT64_TYPES
|
||||
#endif
|
||||
|
||||
#include "macros.h"
|
||||
diff --git a/simtypes.h b/simtypes.h
|
||||
index cedbbec..912e95d 100644
|
||||
--- a/simtypes.h
|
||||
+++ b/simtypes.h
|
||||
@@ -131,7 +131,9 @@ typedef unsigned long uint32;
|
||||
#endif
|
||||
#endif
|
||||
typedef signed long long sint64;
|
||||
+#ifndef NO_UINT64_TYPES
|
||||
typedef unsigned long long uint64;
|
||||
+#endif
|
||||
#ifdef _MSC_VER
|
||||
# define GCC_PACKED
|
||||
# define GCC_ALIGN(a)
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
79
games-simulation/simutrans/simutrans-120.0.1.recipe
Normal file
79
games-simulation/simutrans/simutrans-120.0.1.recipe
Normal file
@@ -0,0 +1,79 @@
|
||||
SUMMARY="Transport simulator"
|
||||
DESCRIPTION="Simutrans is an open-source transportation simulation game \
|
||||
available for Windows, Mac, Linux and BeOS. Your goal is to establish a \
|
||||
successful transport company and build the necessary infrastructure to \
|
||||
transport passengers, mail and goods between cities, factories and \
|
||||
touristic attractions by land, air and water."
|
||||
HOMEPAGE="http://www.simutrans.com"
|
||||
SRC_URI="http://sourceforge.net/projects/simutrans/files/simutrans/120-0-1/simutrans-src-120-0-1.zip"
|
||||
CHECKSUM_SHA256="010a6e3765891e1821364e54f6bcdfb2911b627ffca3acae8350e06e53113683"
|
||||
SRC_FILENAME="simutrans-$portVersion.zip"
|
||||
SOURCE_DIR=""
|
||||
COPYRIGHT=" 1997-2004 Hj. Malthaner
|
||||
2005-2014 The Simutrans Team"
|
||||
LICENSE="Artistic"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="?x86 x86_64"
|
||||
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||
# for a different secondary architecture.
|
||||
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||
fi
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
PATCHES="simutrans-$portVersion.patchset"
|
||||
PROVIDES="
|
||||
simutrans$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libsdl$secondaryArchSuffix
|
||||
lib:libsdl_mixer$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
lib:libpng$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
simutrans_pakset == $portVersion
|
||||
timgmsoundfont
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libsdl$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:libpng$secondaryArchSuffix
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:git
|
||||
cmd:svn
|
||||
cmd:make
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:strip$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
non-packaged/$relativeAppsDir/simutrans/config directory keep-old
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
chmod +x configure.sh
|
||||
runConfigure ./configure.sh
|
||||
make $jobArgs
|
||||
strip sim
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
fixPkgconfig
|
||||
cp sim simutrans/simutrans
|
||||
mkdir -p $appsDir/simutrans
|
||||
mkdir -p $prefix/non-packaged/$relativeAppsDir/simutrans/config
|
||||
cp -r simutrans $appsDir/
|
||||
mv $appsDir/simutrans/config \
|
||||
$prefix/non-packaged/$relativeAppsDir/simutrans/
|
||||
ln -s $prefix/non-packaged/$relativeAppsDir/simutrans/config \
|
||||
$appsDir/simutrans/config
|
||||
|
||||
addAppDeskbarSymlink $appsDir/simutrans/simutrans "Simutrans"
|
||||
}
|
||||
88
games-simulation/simutrans/simutrans-nightly.recipe
Normal file
88
games-simulation/simutrans/simutrans-nightly.recipe
Normal file
@@ -0,0 +1,88 @@
|
||||
SUMMARY="Transport simulator"
|
||||
DESCRIPTION="Simutrans is an open-source transportation simulation game \
|
||||
available for Windows, Mac, Linux and BeOS. Your goal is to establish a \
|
||||
successful transport company and build the necessary infrastructure to \
|
||||
transport passengers, mail and goods between cities, factories and \
|
||||
touristic attractions by land, air and water.
|
||||
Nightly builds are versions only for debugging and testing. They may contain \
|
||||
changes which make your savegames unreadable by any official version, or \
|
||||
bugs that will destroy your game, or not even run. They are for bug testing \
|
||||
only."
|
||||
HOMEPAGE="http://www.simutrans.com"
|
||||
SRC_URI="svn://tron.yamagi.org/simutrans/simutrans/trunk \
|
||||
--username=anon --password="
|
||||
SRC_FILENAME="simutrans-$portVersion"
|
||||
SOURCE_DIR="trunk"
|
||||
COPYRIGHT=" 1997-2004 Hj. Malthaner
|
||||
2005-2015 The Simutrans Team"
|
||||
LICENSE="Artistic"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="?x86 x86_64"
|
||||
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||
# for a different secondary architecture.
|
||||
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||
fi
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
PATCHES="simutrans-$portVersion.patchset"
|
||||
PROVIDES="
|
||||
simutrans$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libsdl$secondaryArchSuffix
|
||||
lib:libsdl_mixer$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
lib:libpng$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
simutrans_pakset >= 120.0.1
|
||||
timgmsoundfont
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libsdl$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:libpng$secondaryArchSuffix
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:git
|
||||
cmd:svn
|
||||
cmd:curl
|
||||
cmd:autoreconf
|
||||
cmd:aclocal
|
||||
cmd:make
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:strip$secondaryArchSuffix
|
||||
cmd:sdl_config$secondaryArchSuffix
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
non-packaged/$relativeAppsDir/simutrans/config directory keep-old
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autoreconf configure.ac
|
||||
runConfigure ./configure
|
||||
./get_lang_files.sh
|
||||
make $jobArgs
|
||||
strip sim
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
fixPkgconfig
|
||||
cp sim simutrans/simutrans
|
||||
mkdir -p $appsDir/simutrans
|
||||
mkdir -p $prefix/non-packaged/$relativeAppsDir/simutrans/config
|
||||
cp -r simutrans $appsDir/
|
||||
mv $appsDir/simutrans/config \
|
||||
$prefix/non-packaged/$relativeAppsDir/simutrans/
|
||||
ln -s $prefix/non-packaged/$relativeAppsDir/simutrans/config \
|
||||
$appsDir/simutrans/config
|
||||
|
||||
addAppDeskbarSymlink $appsDir/simutrans/simutrans "Simutrans"
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
SUMMARY="Pakset for Simutrans"
|
||||
DESCRIPTION="
|
||||
A 'pakset' is the data set that Simutrans needs to run: it contains all \
|
||||
the data for the graphics of individual items (vehicles, roads, railways, \
|
||||
buildings, etc.) and all of the balancing information (such as prices, \
|
||||
speeds, capacities and so forth) necessary to make the game \
|
||||
complete.
|
||||
Pak64 is the main and a base set for Simutrans developed along with \
|
||||
Simutrans executable. It always contains the most recent features. It is \
|
||||
neatly painted pixel by pixel with motherly care. On the other hand it \
|
||||
might look too tiny on high resolution displays. Many artists contributed \
|
||||
to this pak set, from the 8 bit age on."
|
||||
HOMEPAGE="http://www.simutrans.com"
|
||||
SRC_URI="http://sourceforge.net/projects/simutrans/files/pak64/120-0/simupak64-120-0-1.zip"
|
||||
CHECKSUM_SHA256="02a709dfa4b0c22e0b463ebcbd9684548356de1c61566cff9c127a79990dbb78"
|
||||
SRC_FILENAME="simupak_64-$portVersion.zip"
|
||||
SOURCE_DIR=""
|
||||
COPYRIGHT=" 1997-2004 Hj. Malthaner
|
||||
2005-2014 The Simutrans Team"
|
||||
LICENSE="Artistic"
|
||||
REVISION="1"
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
simutrans_pak64 = $portVersion
|
||||
simutrans_pakset = $portVersion
|
||||
"
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
non-packaged/$relativeAppsDir/simutrans/pak/config directory keep-old
|
||||
"
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/simutrans
|
||||
mkdir -p $prefix/non-packaged/$relativeAppsDir/simutrans/pak/config
|
||||
cp -r simutrans $appsDir/
|
||||
mv $appsDir/simutrans/pak/config \
|
||||
$prefix/non-packaged/$relativeAppsDir/simutrans/pak/
|
||||
ln -s $prefix/non-packaged/$relativeAppsDir/simutrans/pak/config \
|
||||
$appsDir/simutrans/pak/config
|
||||
}
|
||||
Reference in New Issue
Block a user