From b5305d8bc813afcc0caf98e316a35e51e1de4fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Wed, 22 Nov 2017 11:46:51 +0100 Subject: [PATCH] Add recipe for Previous 1.8 svn (NeXT emulator) TODO: Warning: POLICY WARNING: Invalid top-level package entry "share" Warning: POLICY WARNING: no matching provides "cmd:rev_1.0_v41.bin_x86" for "bin/Rev_1.0_v41.BIN-x86" Warning: POLICY WARNING: no matching provides "cmd:rev_2.5_v66.bin_x86" for "bin/Rev_2.5_v66.BIN-x86" Warning: POLICY WARNING: no matching provides "cmd:rev_3.3_v74.bin_x86" for "bin/Rev_3.3_v74.BIN-x86" Warning: POLICY WARNING: no matching provides "cmd:dimension_eeprom.bin_x86" for "bin/dimension_eeprom.bin-x86" Warning: POLICY WARNING: no matching provides "cmd:hatariui_x86" for "bin/hatariui-x86" --- .../patches/previous-1.8~svn.patchset | 111 ++++++++++++++++++ .../previous/previous-1.8~svn.recipe | 61 ++++++++++ 2 files changed, 172 insertions(+) create mode 100644 app-emulation/previous/patches/previous-1.8~svn.patchset create mode 100644 app-emulation/previous/previous-1.8~svn.recipe diff --git a/app-emulation/previous/patches/previous-1.8~svn.patchset b/app-emulation/previous/patches/previous-1.8~svn.patchset new file mode 100644 index 000000000..3aeaf0316 --- /dev/null +++ b/app-emulation/previous/patches/previous-1.8~svn.patchset @@ -0,0 +1,111 @@ +From 7c7827b8c58760d24973bfc9782d6cf58f0c792d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Wed, 22 Nov 2017 11:02:24 +0100 +Subject: [PATCH 1/3] Haiku: CMake: fix search paths + +--- + cmake/FindSDL2.cmake | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake +index fc2ee31..d32bed1 100644 +--- a/cmake/FindSDL2.cmake ++++ b/cmake/FindSDL2.cmake +@@ -74,12 +74,13 @@ SET(SDL2_SEARCH_PATHS + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt ++ /system/develop # Haiku + ) + + FIND_PATH(SDL2_INCLUDE_DIR SDL_scancode.h + HINTS + $ENV{SDL2DIR} +- PATH_SUFFIXES include/SDL2 include ++ PATH_SUFFIXES include/SDL2 include headers/x86/SDL2 headers/SDL2 headers + PATHS ${SDL2_SEARCH_PATHS} + ) + +@@ -87,7 +88,7 @@ FIND_LIBRARY(SDL2_LIBRARY_TEMP + NAMES SDL2 + HINTS + $ENV{SDL2DIR} +- PATH_SUFFIXES lib64 lib ++ PATH_SUFFIXES lib64 lib/x86 lib + PATHS ${SDL2_SEARCH_PATHS} + ) + +@@ -101,7 +102,7 @@ IF(NOT SDL2_BUILDING_LIBRARY) + NAMES SDL2main + HINTS + $ENV{SDL2DIR} +- PATH_SUFFIXES lib64 lib ++ PATH_SUFFIXES lib64 lib/x86 lib + PATHS ${SDL2_SEARCH_PATHS} + ) + ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework") +-- +2.15.0 + + +From 0e3c6924d5b225393a70ccde7ce59d9446d2f135 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Wed, 22 Nov 2017 11:02:50 +0100 +Subject: [PATCH 2/3] Haiku: CMake: link with libnetwork + +--- + src/CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 2401099..0f6ccf2 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -124,6 +124,11 @@ if(WIN32) + target_link_libraries(Previous ws2_32 Iphlpapi) + endif(WIN32) + ++if(HAIKU) ++ # Needed for socket() on Haiku ++ target_link_libraries(Previous network) ++endif(HAIKU) ++ + if(ENABLE_OSX_BUNDLE) + install(TARGETS Previous BUNDLE DESTINATION /Applications) + else() +-- +2.15.0 + + +From ea28cdb3f93736d1408d46aea8dba7a844dc3f9b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Wed, 22 Nov 2017 11:03:18 +0100 +Subject: [PATCH 3/3] Haiku: use existing uint* types from SupportDefs.h or + things break + +--- + src/slirp/slirp.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/slirp/slirp.h b/src/slirp/slirp.h +index 8496ce6..22da7a2 100755 +--- a/src/slirp/slirp.h ++++ b/src/slirp/slirp.h +@@ -92,10 +92,14 @@ typedef unsigned char u_int8_t; + # endif + #endif /* NEED_TYPEDEFS */ + ++#ifdef __HAIKU__ ++#include ++#else + /* Basilisk II types glue */ + typedef u_int8_t uint8; + typedef u_int16_t uint16; + typedef u_int32_t uint32; ++#endif + + #ifdef HAVE_UNISTD_H + # include +-- +2.15.0 + diff --git a/app-emulation/previous/previous-1.8~svn.recipe b/app-emulation/previous/previous-1.8~svn.recipe new file mode 100644 index 000000000..06f8729bf --- /dev/null +++ b/app-emulation/previous/previous-1.8~svn.recipe @@ -0,0 +1,61 @@ +SUMMARY="A NeXT emulator" +DESCRIPTION=" +Previous is a Next computer hardware emulator. \ +It aims to emulate a Next Cube or a Next Station with all its peripheral. +" +HOMEPAGE="http://previous.alternative-system.com/" +SOURCE_URI="svn://svn.code.sf.net/p/previous/code/trunk#844" +REVISION="1" +#CHECKSUM_MD5="" +COPYRIGHT="2001-2017 Andreas Grabher" +LICENSE="GNU GPL v2" +PATCHES="previous-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + previous = $portVersion + app:Previous = $portVersion + cmd:previous = $portVersion + " +REQUIRES=" + haiku${secondaryArchSuffix} + lib:libpng16$secondaryArchSuffix + lib:libreadline$secondaryArchSuffix + lib:libsdl2$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libpng16$secondaryArchSuffix + devel:libreadline$secondaryArchSuffix + devel:libsdl2$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoconf + cmd:cmake + cmd:make + cmd:python + cmd:gcc${secondaryArchSuffix} + cmd:sdl2_config${secondaryArchSuffix} + " + +BUILD() +{ + mkdir -p build + cd build + cmake -DCMAKE_INSTALL_PREFIX=$prefix -DBINDIR=$binDir -DDATADIR=$dataDir/previous -DMANDIR=$manDir/man1 -DDOCDIR=$docDir/previous .. + make +} + +INSTALL() +{ + cd build + make install + mv $binDir/Previous $prefix/bin/ + mimeset $prefix/bin/Previous + addAppDeskbarSymlink /bin/Previous Previous +}