From 1112d2a27d92dfd0898791c384eb5fe1a22be7c2 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Sun, 26 May 2019 14:28:12 +0200 Subject: [PATCH] speed-dreams: bump version, fix libpng16 reference (#3869) --- .../patches/speed_dreams-2.0.0.patchset | 56 +++++- .../patches/speed_dreams-2.2.2.patchset | 184 ++++++++++++++++++ .../speed-dreams/speed_dreams-2.0.0.recipe | 33 ++-- .../speed-dreams/speed_dreams-2.2.2.recipe | 77 ++++++++ 4 files changed, 326 insertions(+), 24 deletions(-) create mode 100644 games-sports/speed-dreams/patches/speed_dreams-2.2.2.patchset create mode 100644 games-sports/speed-dreams/speed_dreams-2.2.2.recipe diff --git a/games-sports/speed-dreams/patches/speed_dreams-2.0.0.patchset b/games-sports/speed-dreams/patches/speed_dreams-2.0.0.patchset index f211145d4..2aea123b0 100644 --- a/games-sports/speed-dreams/patches/speed_dreams-2.0.0.patchset +++ b/games-sports/speed-dreams/patches/speed_dreams-2.0.0.patchset @@ -1,4 +1,4 @@ -From 6d2b5532404c192832d2164eac0fc571af9c9b33 Mon Sep 17 00:00:00 2001 +From f902e34fd74091fcd8034065583c0c6594f36505 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 24 Jan 2016 14:37:04 +0100 Subject: Haiku fixes @@ -50,10 +50,10 @@ index 28cbc42..820bab1 100644 IF(UNIX) SD_INSTALL_FILES(LIB lib TARGETS tgfclient) -- -2.7.0 +2.21.0 -From a10bc460b15c85fb4dca46b58314d93e5794cfb5 Mon Sep 17 00:00:00 2001 +From d727ec6643748f8c8e741bdebf25cf5bf5c01e59 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 24 Jan 2016 16:09:57 +0100 Subject: Disable code unsupported on Haiku. @@ -80,10 +80,10 @@ index 042eb39..0c3adfb 100644 bool linuxSetThreadAffinity(int nCPUId) -- -2.7.0 +2.21.0 -From a642d83163efdcf233c7bb044d183cf91c3662fd Mon Sep 17 00:00:00 2001 +From 37544f6d9664b6a9bae832693fcbc94c7ccc004c Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 24 Jan 2016 16:20:36 +0100 Subject: isnan vs std::isnan. @@ -146,10 +146,10 @@ index 0c39a83..c12adbf 100644 tCar *SimCarTable = 0; -- -2.7.0 +2.21.0 -From e8f9258df870e75165c3b5c82c9049b7880132bf Mon Sep 17 00:00:00 2001 +From da7263addb7fb0aa0cb91de260315428f1cc022a Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 24 Jan 2016 16:22:54 +0100 Subject: Do not link against dl @@ -188,5 +188,45 @@ index 3518f93..e65a43e 100644 GET_TARGET_PROPERTY(XMLVERSION_BUILDLOC xmlversion LOCATION) FILE(WRITE ${CMAKE_BINARY_DIR}/xmlversion_loc.txt ${XMLVERSION_BUILDLOC}) -- -2.7.0 +2.21.0 + + +From 3d16186e9b8536caa42964a608d4f6a58e9a6332 Mon Sep 17 00:00:00 2001 +From: begasus +Date: Sat, 25 May 2019 15:38:21 +0200 +Subject: Haiku fixes (from next version) + + +diff --git a/src/libs/tgf/params.cpp b/src/libs/tgf/params.cpp +index 0b7ce17..82c7953 100644 +--- a/src/libs/tgf/params.cpp ++++ b/src/libs/tgf/params.cpp +@@ -3355,7 +3355,7 @@ static char const* GfParmMakePathKey( char const* path, va_list arg, char const + if( lastSlash != NULL && key ) + { + *key = lastSlash + 1; +- lastSlash = '\0'; ++ lastSlash = (char*)'\0'; + } + else if( key ) + { +diff --git a/src/libs/tgfclient/guitexture.cpp b/src/libs/tgfclient/guitexture.cpp +index f795275..e9e0b55 100644 +--- a/src/libs/tgfclient/guitexture.cpp ++++ b/src/libs/tgfclient/guitexture.cpp +@@ -392,10 +392,10 @@ GfTexReadImageFromJPEG(const char *filename, float screen_gamma, int *pWidth, in + // Initialize the JPEG image decompressor for 24 bit RGB output. + jpeg_create_decompress(&cinfo); + jpeg_stdio_src(&cinfo, infile); +- (void)jpeg_read_header(&cinfo, TRUE); ++ (void)jpeg_read_header(&cinfo, (boolean)TRUE); + + cinfo.out_color_space = JCS_RGB; +- cinfo.quantize_colors = FALSE; ++ cinfo.quantize_colors = (boolean)FALSE; + jpeg_calc_output_dimensions(&cinfo); + + // Load and check image dimensions. +-- +2.21.0 diff --git a/games-sports/speed-dreams/patches/speed_dreams-2.2.2.patchset b/games-sports/speed-dreams/patches/speed_dreams-2.2.2.patchset new file mode 100644 index 000000000..134c2e557 --- /dev/null +++ b/games-sports/speed-dreams/patches/speed_dreams-2.2.2.patchset @@ -0,0 +1,184 @@ +From 2a3ec865e036f6e937651f8d9de58de1a927745b Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 24 Jan 2016 14:37:04 +0100 +Subject: Fix search paths for plib and SDL2 + + +diff --git a/cmake/FindPLIB.cmake b/cmake/FindPLIB.cmake +index 63b43da..1681b8c 100644 +--- a/cmake/FindPLIB.cmake ++++ b/cmake/FindPLIB.cmake +@@ -16,7 +16,7 @@ IF(NOT APPLE OR OPTION_USE_MACPORTS) + FIND_PATH(PLIB_PLIBINCLUDE_DIR plib/ssg.h + HINTS ENV PLIB_DIR + PATH_SUFFIXES +- Headers include/plib include ++ Headers include/plib include develop/headers/plib develop/headers/x86/plib + PATHS + #Additional MacOS Paths + ~/Library/Frameworks/plib.framework +@@ -24,6 +24,7 @@ IF(NOT APPLE OR OPTION_USE_MACPORTS) + /System/Library/Frameworks/plib.framework # Tiger + + /usr /usr/local ++ /system + DOC "Location of plib") + ENDIF(NOT APPLE OR OPTION_USE_MACPORTS) + +diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake +index bc72d64..9c05691 100644 +--- a/cmake/FindSDL2.cmake ++++ b/cmake/FindSDL2.cmake +@@ -14,6 +14,7 @@ SET(SDL2_SEARCH_PATHS + /Library/Frameworks + /usr/local + /usr ++/system + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave +@@ -23,7 +24,7 @@ SET(SDL2_SEARCH_PATHS + FIND_PATH(SDL2_INCLUDE_DIR SDL.h + HINTS + $ENV{SDL2DIR} +-PATH_SUFFIXES include/SDL2 include ++PATH_SUFFIXES include/SDL2 include develop/headers/SDL2 develop/headers/x86/SDL2 + PATHS ${SDL2_SEARCH_PATHS} + ) + +-- +2.21.0 + + +From 2989e48a739b6731f328de98a1d8b8b108ed89d1 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 24 Jan 2016 14:37:04 +0100 +Subject: Haiku fix + + +diff --git a/src/libs/tgfclient/CMakeLists.txt b/src/libs/tgfclient/CMakeLists.txt +index 77b7a1d..1cabf1f 100644 +--- a/src/libs/tgfclient/CMakeLists.txt ++++ b/src/libs/tgfclient/CMakeLists.txt +@@ -111,12 +111,12 @@ IF(WIN32) + TARGET_LINK_LIBRARIES(tgfclient winmm) + ENDIF(WIN32) + +-IF(UNIX) ++IF(UNIX AND NOT HAIKU) + ADD_X11_LIBRARY(tgfclient) + IF(OPTION_XRANDR) + ADD_XRANDR_LIBRARY(tgfclient) + ENDIF(OPTION_XRANDR) +-ENDIF(UNIX) ++ENDIF(UNIX AND NOT HAIKU) + + IF(UNIX) + SD_INSTALL_FILES(LIB lib TARGETS tgfclient) +-- +2.21.0 + + +From 2f821f24ddd2978c3a51376d670b6150b57c5b42 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 24 Jan 2016 16:09:57 +0100 +Subject: Disable code unsupported on Haiku. + + +diff --git a/src/libs/tgf/linuxspec.cpp b/src/libs/tgf/linuxspec.cpp +index 12d663e..420f019 100644 +--- a/src/libs/tgf/linuxspec.cpp ++++ b/src/libs/tgf/linuxspec.cpp +@@ -653,7 +653,7 @@ unsigned linuxGetNumberOfCPUs() + } + + // Linux, Solaris, AIX +-#elif defined(linux) || defined(__linux__) || defined(USE_MACPORTS) ++#elif defined(linux) || defined(__linux__) || defined(USE_MACPORTS) || !defined(__HAIKU__) + + nCPUs = (unsigned)sysconf(_SC_NPROCESSORS_ONLN); + +@@ -692,7 +692,7 @@ unsigned linuxGetNumberOfCPUs() + * Remarks + * + */ +-#if !defined(USE_MACPORTS) ++#if !defined(USE_MACPORTS) && !defined(__HAIKU__) + std::string cpuSet2String(const cpu_set_t* pCPUSet) + { + std::ostringstream ossCPUSet; +@@ -711,7 +711,7 @@ bool + linuxSetThreadAffinity(int nCPUId) + { + // MacOS X, FreeBSD, OpenBSD, NetBSD, etc ... +-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) ++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || !defined(__HAIKU__) + + GfLogWarning("Thread affinity not yet implemented on Mac OS X or BSD.\n"); + // TODO. +-- +2.21.0 + + +From 3d71280d87ae7dbf3b70ed5969766abaf80c8b07 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 24 Jan 2016 16:20:36 +0100 +Subject: Use namespace std + + +diff --git a/src/modules/simu/simuv2.1/simu.cpp b/src/modules/simu/simuv2.1/simu.cpp +index cac11d7..9c4377f 100644 +--- a/src/modules/simu/simuv2.1/simu.cpp ++++ b/src/modules/simu/simuv2.1/simu.cpp +@@ -28,6 +28,7 @@ + + #include "sim.h" + ++using namespace std; + + tCar *SimCarTable = 0; + +-- +2.21.0 + + +From a72f2a177696ec2dbdd4143f93ffef37b043c297 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 24 Jan 2016 16:22:54 +0100 +Subject: Do not link against dl + + +diff --git a/src/tools/nfsperf/CMakeLists.txt b/src/tools/nfsperf/CMakeLists.txt +index 0a2a6b6..d9fc80e 100644 +--- a/src/tools/nfsperf/CMakeLists.txt ++++ b/src/tools/nfsperf/CMakeLists.txt +@@ -16,9 +16,9 @@ SD_ADD_EXECUTABLE(${_TARGET_NAME} ${NFSPERF_SOURCES}) + + ADD_SDLIB_LIBRARY(${_TARGET_NAME} portability tgf txml) # txml ignored if OPTION_3RDPARTY_EXPAT + +-IF(UNIX) ++IF(UNIX AND NOT HAIKU) + TARGET_LINK_LIBRARIES(${_TARGET_NAME} dl) +-ENDIF(UNIX) ++ENDIF(UNIX AND NOT HAIKU) + + IF(UNIX) + SD_INSTALL_FILES(MAN man6 PREFIX ${SOURCE_DIR}/doc/man FILES ${_TARGET_NAME}.6) +diff --git a/src/tools/xmlversion/CMakeLists.txt b/src/tools/xmlversion/CMakeLists.txt +index ac20c95..1efcd7a 100644 +--- a/src/tools/xmlversion/CMakeLists.txt ++++ b/src/tools/xmlversion/CMakeLists.txt +@@ -23,8 +23,8 @@ ELSE(CMAKE_SKIP_RPATH OR CMAKE_SKIP_BUILD_RPATH) + ADD_SDLIB_LIBRARY(xmlversion portability tgf txml) + ENDIF(CMAKE_SKIP_RPATH OR CMAKE_SKIP_BUILD_RPATH) + +-IF(UNIX) ++IF(UNIX AND NOT HAIKU) + TARGET_LINK_LIBRARIES(xmlversion dl) +-ENDIF(UNIX) ++ENDIF(UNIX AND NOT HAIKU) + + # Note: we don't install xmlversion, as it's a only a build-time tool. +-- +2.21.0 + diff --git a/games-sports/speed-dreams/speed_dreams-2.0.0.recipe b/games-sports/speed-dreams/speed_dreams-2.0.0.recipe index edf1d5c0f..bb05bb05d 100644 --- a/games-sports/speed-dreams/speed_dreams-2.0.0.recipe +++ b/games-sports/speed-dreams/speed_dreams-2.0.0.recipe @@ -7,7 +7,7 @@ constantly improving visual and physics realism." HOMEPAGE="http://www.speed-dreams.org/" COPYRIGHT="2009 Jean-Philippe Meuret" LICENSE="GNU GPL v2" -REVISION="1" +REVISION="2" SOURCE_URI="http://sourceforge.net/projects/speed-dreams/files/2.0.0/speed-dreams-src-base-2.0.0-r4687.tar.xz" CHECKSUM_SHA256="86d219caf26a9523345b2cc5fdb3d5daa1f7e272d409dc237ce5e2f0b37ae606" SOURCE_DIR="" @@ -15,48 +15,49 @@ SOURCE_URI_2="http://sourceforge.net/projects/speed-dreams/files/2.0.0/speed-dre CHECKSUM_SHA256_2="1f01189b9af4bce3ed9de3e7fc16ca7bfa65f17b4c2ed3d3881537e880a0351c" PATCHES="speed_dreams-$portVersion.patchset" -ARCHITECTURES="!x86_gcc2" -SECONDARY_ARCHITECTURES="x86" +ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="?x86" PROVIDES=" speed_dreams$secondaryArchSuffix = $portVersion -" + " REQUIRES=" haiku$secondaryArchSuffix lib:libenet$secondaryArchSuffix - lib:libglu$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libGLU$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix lib:libopenal$secondaryArchSuffix - lib:libplibnet$secondaryArchSuffix - lib:libpng$secondaryArchSuffix - lib:libsdl$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libSDL_1.2$secondaryArchSuffix lib:libz$secondaryArchSuffix -" + " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libenet$secondaryArchSuffix - devel:libglu$secondaryArchSuffix + devel:libGL$secondaryArchSuffix + devel:libGLU$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix devel:libopenal$secondaryArchSuffix devel:libplibnet$secondaryArchSuffix devel:libpng$secondaryArchSuffix - devel:libsdl$secondaryArchSuffix + devel:libSDL$secondaryArchSuffix devel:libz$secondaryArchSuffix -" + " BUILD_PREREQUIRES=" cmd:cmake cmd:gcc$secondaryArchSuffix cmd:make -" + " BUILD() { # Apply the "partial build" patch cp -r ../sources-2/* . - mkdir -p build - cd build - cmake .. -Wno-dev -DSD_LOCALDIR=~/config/settings/speed-dreams -DCMAKE_INSTALL_PREFIX=$appsDir + mkdir -p build && cd build + cmake .. -Wno-dev -DCMAKE_INSTALL_PREFIX=$appsDir/SpeedDreams \ + -DSD_LOCALDIR=~/config/settings/speed-dreams make $jobArgs } diff --git a/games-sports/speed-dreams/speed_dreams-2.2.2.recipe b/games-sports/speed-dreams/speed_dreams-2.2.2.recipe new file mode 100644 index 000000000..d9f956a73 --- /dev/null +++ b/games-sports/speed-dreams/speed_dreams-2.2.2.recipe @@ -0,0 +1,77 @@ +SUMMARY="Open Motorsport Simulator" +DESCRIPTION="Speed Dreams is a 3d cross-platform, open source motorsport simulation and racing game. + +Speed Dreams is a fork of the open racing car simulator Torcs, aiming to implement exciting new \ +features, cars, tracks and AI opponents to make a more enjoyable game for the player, as well as \ +constantly improving visual and physics realism." +HOMEPAGE="http://www.speed-dreams.org/" +COPYRIGHT="2009-2018 Jean-Philippe Meuret" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="https://sourceforge.net/projects/speed-dreams/files/$portVersion/speed-dreams-src-base-$portVersion-r6553.tar.xz" +CHECKSUM_SHA256="32aa55c17f8dafc1c54fb0d0b7b993d2688d431899cfc5db9eeece148c6887d0" +SOURCE_DIR="" +PATCHES="speed_dreams-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="?x86" + +PROVIDES=" + speed_dreams$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libcurl$secondaryArchSuffix + lib:libenet$secondaryArchSuffix + lib:libexpat$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libGLU$secondaryArchSuffix + lib:libjpeg$secondaryArchSuffix + lib:libogg$secondaryArchSuffix + lib:libopenal$secondaryArchSuffix + lib:libpng16$secondaryArchSuffix + lib:libSDL2_2.0$secondaryArchSuffix + lib:libvorbis$secondaryArchSuffix + lib:libvorbisfile$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcurl$secondaryArchSuffix + devel:libenet$secondaryArchSuffix + devel:libexpat$secondaryArchSuffix + devel:libGL$secondaryArchSuffix + devel:libGLU$secondaryArchSuffix + devel:libjpeg$secondaryArchSuffix + devel:libogg$secondaryArchSuffix + devel:libopenal$secondaryArchSuffix + devel:libplibnet$secondaryArchSuffix + devel:libpng$secondaryArchSuffix + devel:libSDL2$secondaryArchSuffix + devel:libvorbis$secondaryArchSuffix + devel:libvorbisfile$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + mkdir -p build && cd build + + cmake .. -Wno-dev -DCMAKE_INSTALL_PREFIX=$appsDir/SpeedDreams \ + -DSD_LOCALDIR=~/config/settings/speed-dreams \ + -DOPTION_OSGGRAPH:BOOL=false + make $jobArgs +} + +INSTALL() +{ + cd build + make install +}