From 20579afd8b00db1979268f2c376a1156cfb2919d Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Tue, 7 May 2024 00:03:45 +1000 Subject: [PATCH] Furnace: bump version, enable recipe --- ...-0.6.1~git.recipe => furnace-0.6.3.recipe} | 37 +++++--- .../furnace/patches/furnace-0.6.3.patchset | 89 +++++++++++++++++++ 2 files changed, 113 insertions(+), 13 deletions(-) rename media-sound/furnace/{furnace-0.6.1~git.recipe => furnace-0.6.3.recipe} (86%) create mode 100644 media-sound/furnace/patches/furnace-0.6.3.patchset diff --git a/media-sound/furnace/furnace-0.6.1~git.recipe b/media-sound/furnace/furnace-0.6.3.recipe similarity index 86% rename from media-sound/furnace/furnace-0.6.1~git.recipe rename to media-sound/furnace/furnace-0.6.3.recipe index 43b18b812..0109c230a 100644 --- a/media-sound/furnace/furnace-0.6.1~git.recipe +++ b/media-sound/furnace/furnace-0.6.3.recipe @@ -99,23 +99,20 @@ Additional features: Open-source under GPLv2 or later." HOMEPAGE="https://github.com/tildearrow/furnace" -COPYRIGHT="2021-2022 tildearrow and contributors" +COPYRIGHT="2021-2024 tildearrow and contributors" LICENSE="GNU GPL v2" REVISION="1" -srcGitRev="173e9b0df9590536e25b3126c17663cd1b08ffe7" -SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz" -CHECKSUM_SHA256="bcc10f4b4f4e111557bb444d8434be4dfeccb066f34e3ab1abe1d4a2d9394f76" -SOURCE_DIR="furnace-$srcGitRev" +SOURCE_URI="https://github.com/tildearrow/furnace/archive/refs/tags/v$portVersion.tar.gz" +CHECKSUM_SHA256="bc28647c2175fc4e0c831d2d3f814c37828bb525af42897e5337f0e6c4168ffb" +SOURCE_DIR="furnace-$portVersion" srcGitRev2="ef7a217154badc3b99978ac481b268c8aab67bd8" SOURCE_URI_2="https://github.com/superctr/adpcm/archive/$srcGitRev2.tar.gz" CHECKSUM_SHA256_2="46da29342d2968ff222ba00e07c646e038b76af2e6c86de037c653059a056251" -srcGitRev3="64704a443f8f6c1906ba26297092ea70fa1d45d7" -SOURCE_URI_3="https://github.com/nukeykt/Nuked-OPN2/archive/$srcGitRev3.tar.gz" -CHECKSUM_SHA256_3="109d461d811cb223bfd55ab41068882573e3886f798eeb27d09f4d3ecefe94f5" +PATCHES="furnace-$portVersion.patchset" ADDITIONAL_FILES="furnace.rdef.in" -ARCHITECTURES="?all !x86_gcc2" -SECONDARY_ARCHITECTURES="?x86" +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" PROVIDES=" furnace$secondaryArchSuffix = $portVersion @@ -124,7 +121,10 @@ PROVIDES=" REQUIRES=" haiku$secondaryArchSuffix lib:libfftw3$secondaryArchSuffix + lib:libfreetype$secondaryArchSuffix lib:libfmt$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libportaudio$secondaryArchSuffix lib:librtmidi$secondaryArchSuffix lib:libSDL2_2.0$secondaryArchSuffix lib:libsndfile$secondaryArchSuffix @@ -134,7 +134,10 @@ REQUIRES=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libfftw3$secondaryArchSuffix + devel:libfreetype$secondaryArchSuffix devel:libfmt$secondaryArchSuffix + devel:libGL$secondaryArchSuffix + devel:libportaudio$secondaryArchSuffix devel:librtmidi$secondaryArchSuffix devel:libSDL2_2.0$secondaryArchSuffix devel:libsndfile$secondaryArchSuffix @@ -150,17 +153,25 @@ BUILD_PREREQUIRES=" BUILD() { cp -rf $sourceDir2/adpcm-$srcGitRev2/* $sourceDir/extern/adpcm/ - cp -rf $sourceDir3/Nuked-OPN2-$srcGitRev3/* $sourceDir/extern/Nuked-OPN2/ cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \ $cmakeDirArgs \ -DCMAKE_INSTALL_BINDIR=$appsDir \ - -DSYSTEM_LIBSNDFILE=ON \ + -DBUILD_GUI=ON \ -DSYSTEM_FFTW=ON \ -DSYSTEM_FMT=ON \ + -DSYSTEM_FREETYPE=ON \ + -DSYSTEM_LIBSNDFILE=ON \ + -DSYSTEM_PORTAUDIO=ON \ -DSYSTEM_RTMIDI=ON \ -DSYSTEM_SDL2=ON \ - -DSYSTEM_ZLIB=ON + -DSYSTEM_ZLIB=ON \ + -DUSE_FREETYPE=ON \ + -DUSE_RTMIDI=ON \ + -DUSE_SDL2=ON \ + -DUSE_SNDFILE=ON \ + -DWITH_PORTAUDIO=ON \ + -DWITH_RENDER_SDL=ON make -C build $jobArgs } diff --git a/media-sound/furnace/patches/furnace-0.6.3.patchset b/media-sound/furnace/patches/furnace-0.6.3.patchset new file mode 100644 index 000000000..71c971fb3 --- /dev/null +++ b/media-sound/furnace/patches/furnace-0.6.3.patchset @@ -0,0 +1,89 @@ +From 9acf9fc7d783c31a3b395dad12991586d8411f54 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 6 May 2024 23:58:20 +1000 +Subject: Fix for Haiku + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index df850c4..e891a0a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1080,6 +1080,8 @@ if (WIN32) + elseif (APPLE) + find_library(COCOA Cocoa REQUIRED) + list(APPEND DEPENDENCIES_LIBRARIES ${COCOA}) ++elseif (HAIKU) ++ list(APPEND DEPENDENCIES_LIBRARIES network) + else() + list(APPEND DEPENDENCIES_LIBRARIES dl) + endif() +diff --git a/extern/imgui_patched/backends/imgui_impl_opengl3_loader.h b/extern/imgui_patched/backends/imgui_impl_opengl3_loader.h +index 7ca72e3..1fd86a7 100644 +--- a/extern/imgui_patched/backends/imgui_impl_opengl3_loader.h ++++ b/extern/imgui_patched/backends/imgui_impl_opengl3_loader.h +@@ -669,7 +669,9 @@ static int open_libgl(void) + libgl = dlopen("libGL.so.1", RTLD_LAZY | RTLD_LOCAL); + if (!libgl) + return GL3W_ERROR_LIBRARY_OPEN; ++#ifndef __HAIKU__ + *(void **)(&glx_get_proc_address) = dlsym(libgl, "glXGetProcAddressARB"); ++#endif + return GL3W_OK; + } + +@@ -678,8 +680,10 @@ static void close_libgl(void) { dlclose(libgl); } + static GL3WglProc get_proc(const char *proc) + { + GL3WglProc res; ++#ifndef __HAIKU__ + res = glx_get_proc_address((const GLubyte *)proc); + if (!res) ++#endif + *(void **)(&res) = dlsym(libgl, proc); + return res; + } +diff --git a/src/gui/tutorial.cpp b/src/gui/tutorial.cpp +index 690cff7..3013614 100644 +--- a/src/gui/tutorial.cpp ++++ b/src/gui/tutorial.cpp +@@ -29,6 +29,7 @@ + #include "../utfutils.h" + #else + #include ++#include + #endif + + enum FurnaceCVObjectTypes { +@@ -583,13 +584,15 @@ void FurnaceGUI::initRandomDemoSong() { + if (de==NULL) break; + if (strcmp(de->d_name,".")==0) continue; + if (strcmp(de->d_name,"..")==0) continue; +- if (de->d_type==DT_DIR) { ++ struct stat info; ++ stat(de->d_name, &info); ++ if (S_ISDIR(info.st_mode)) { + String newPath=demoPath; + newPath+=DIR_SEPARATOR_STR; + newPath+=de->d_name; + logW("adding subdir %s",newPath); + subDirs.push_back(newPath); +- } else if (de->d_type==DT_REG && strstr(de->d_name,".fur")!=NULL) { ++ } else if (S_ISREG(info.st_mode) && strstr(de->d_name,".fur")!=NULL) { + String newPath=demoPath; + newPath+=DIR_SEPARATOR_STR; + newPath+=de->d_name; +@@ -625,7 +628,10 @@ void FurnaceGUI::initRandomDemoSong() { + if (de1==NULL) break; + if (strcmp(de1->d_name,".")==0) continue; + if (strcmp(de1->d_name,"..")==0) continue; +- if (de1->d_type==DT_REG && strstr(de1->d_name,".fur")!=NULL) { ++ ++ struct stat info; ++ stat(de1->d_name, &info); ++ if (S_ISREG(info.st_mode) && strstr(de1->d_name,".fur")!=NULL) { + String newPath=i; + newPath+=DIR_SEPARATOR_STR; + newPath+=de1->d_name; +-- +2.43.2 +