diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2022-05-17 21:21:11 +0430 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-05-19 20:17:10 +0430 |
commit | 37857a629d5b0210c424ff74d2b2b47d87b629a4 (patch) | |
tree | cd02194c85cd9326e0281f5af164419ef8fe948f /Ports/milkytracker | |
parent | e1a5f63e1ae838386fe838716092d82ec20cf189 (diff) | |
download | serenity-37857a629d5b0210c424ff74d2b2b47d87b629a4.zip |
Ports: Update milkytracker's patches to use git patches
Diffstat (limited to 'Ports/milkytracker')
-rw-r--r-- | Ports/milkytracker/patches/0001-Include-strings.h.patch | 24 | ||||
-rw-r--r-- | Ports/milkytracker/patches/0002-Remove-OpenGL.patch (renamed from Ports/milkytracker/patches/RemoveOpenGL.patch) | 26 | ||||
-rw-r--r-- | Ports/milkytracker/patches/0003-Set-C-standard-to-C-20-and-remove-some-unnecessary-s.patch | 37 | ||||
-rw-r--r-- | Ports/milkytracker/patches/0004-Link-against-the-needed-serenity-libraries.patch | 24 | ||||
-rw-r--r-- | Ports/milkytracker/patches/0005-Replace-tmpnam-with-mkstemp.patch | 25 | ||||
-rw-r--r-- | Ports/milkytracker/patches/IncludeStringsInBasicTypes.patch | 10 | ||||
-rw-r--r-- | Ports/milkytracker/patches/ReadMe.md | 27 | ||||
-rw-r--r-- | Ports/milkytracker/patches/SetCXXStandardAndExcludeSubdirs.patch | 22 | ||||
-rw-r--r-- | Ports/milkytracker/patches/SetTrackerLinks.patch | 11 | ||||
-rw-r--r-- | Ports/milkytracker/patches/TmpnamToMkstemp.patch | 11 |
10 files changed, 157 insertions, 60 deletions
diff --git a/Ports/milkytracker/patches/0001-Include-strings.h.patch b/Ports/milkytracker/patches/0001-Include-strings.h.patch new file mode 100644 index 0000000000..8c0858cbe6 --- /dev/null +++ b/Ports/milkytracker/patches/0001-Include-strings.h.patch @@ -0,0 +1,24 @@ +From c91a634240ee82739c68dc49aad2bd1b6916fedd Mon Sep 17 00:00:00 2001 +From: "jake.westrip" <jake.westrip@lonsec.com.au> +Date: Tue, 27 Apr 2021 18:34:53 +1000 +Subject: [PATCH 1/5] Include strings.h + +--- + src/ppui/BasicTypes.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/ppui/BasicTypes.h b/src/ppui/BasicTypes.h +index 20eba8b..e353345 100644 +--- a/src/ppui/BasicTypes.h ++++ b/src/ppui/BasicTypes.h +@@ -30,6 +30,7 @@ typedef signed short pp_int16; + typedef unsigned int pp_uint32; + typedef signed int pp_int32; + ++#include <strings.h> + #include "ScanCodes.h" + + #if defined(WIN32) || defined(_WIN32_WCE) +-- +2.36.1 + diff --git a/Ports/milkytracker/patches/RemoveOpenGL.patch b/Ports/milkytracker/patches/0002-Remove-OpenGL.patch index 7a018ff3b8..e4b87d705d 100644 --- a/Ports/milkytracker/patches/RemoveOpenGL.patch +++ b/Ports/milkytracker/patches/0002-Remove-OpenGL.patch @@ -1,5 +1,16 @@ ---- MilkyTracker-1.03.00/src/ppui/sdl/DisplayDevice_SDL.cpp 2021-04-27 15:17:42.529000000 +1000 -+++ MilkyTracker-1.03.00/src/ppui/sdl/DisplayDevice_SDL.cpp 2021-04-27 15:17:42.529000000 +1000 +From f02afb523d34a56d8da426cee6fb56d3f57b4882 Mon Sep 17 00:00:00 2001 +From: "jake.westrip" <jake.westrip@lonsec.com.au> +Date: Tue, 27 Apr 2021 18:34:53 +1000 +Subject: [PATCH 2/5] Remove OpenGL + +--- + src/ppui/sdl/DisplayDevice_SDL.cpp | 42 ++---------------------------- + 1 file changed, 2 insertions(+), 40 deletions(-) + +diff --git a/src/ppui/sdl/DisplayDevice_SDL.cpp b/src/ppui/sdl/DisplayDevice_SDL.cpp +index a4b966c..7ecedc7 100644 +--- a/src/ppui/sdl/DisplayDevice_SDL.cpp ++++ b/src/ppui/sdl/DisplayDevice_SDL.cpp @@ -26,30 +26,8 @@ SDL_Window* PPDisplayDevice::CreateWindow(pp_int32& w, pp_int32& h, pp_int32& bpp, Uint32 flags) { @@ -32,7 +43,7 @@ if (theWindow == NULL) { -@@ -59,7 +37,7 @@ +@@ -59,7 +37,7 @@ SDL_Window* PPDisplayDevice::CreateWindow(pp_int32& w, pp_int32& h, pp_int32& bp w = getDefaultWidth(); h = getDefaultHeight(); @@ -41,7 +52,7 @@ if (theWindow == NULL) { -@@ -69,21 +47,6 @@ +@@ -69,21 +47,6 @@ SDL_Window* PPDisplayDevice::CreateWindow(pp_int32& w, pp_int32& h, pp_int32& bp } } @@ -63,11 +74,14 @@ // Prevent window from being resized below minimum SDL_SetWindowMinimumSize(theWindow, w, h); fprintf(stderr, "SDL: Minimum window size set to %dx%d.\n", w, h); -@@ -105,7 +68,6 @@ +@@ -105,7 +68,6 @@ PPDisplayDevice::PPDisplayDevice(pp_int32 width, bFullScreen = fullScreen; - drv_index = -1; initMousePointers(); - }
\ No newline at end of file + } +-- +2.36.1 + diff --git a/Ports/milkytracker/patches/0003-Set-C-standard-to-C-20-and-remove-some-unnecessary-s.patch b/Ports/milkytracker/patches/0003-Set-C-standard-to-C-20-and-remove-some-unnecessary-s.patch new file mode 100644 index 0000000000..048dc1b0cb --- /dev/null +++ b/Ports/milkytracker/patches/0003-Set-C-standard-to-C-20-and-remove-some-unnecessary-s.patch @@ -0,0 +1,37 @@ +From 5db35a017501fd2e8975d931d77591fdd8d40ed7 Mon Sep 17 00:00:00 2001 +From: "jake.westrip" <jake.westrip@lonsec.com.au> +Date: Tue, 27 Apr 2021 18:34:53 +1000 +Subject: [PATCH 3/5] Set C++ standard to C++20 and remove some unnecessary + subdirectories + +--- + CMakeLists.txt | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4bdecf1..a64b843 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,8 +22,8 @@ + cmake_minimum_required(VERSION 3.10) + project(MilkyTracker) + +-# Set C++ standard to C++98 +-set(CMAKE_CXX_STANDARD 98) ++# Set C++ standard to C++20 ++set(CMAKE_CXX_STANDARD 20) + set(CMAKE_CXX_EXTENSIONS OFF) + + # Enable IDE solution folders +@@ -220,8 +220,6 @@ if(APPLE) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${SUFFIXES_ORIG}) + endif() + +-add_subdirectory(docs) +-add_subdirectory(resources/music) + add_subdirectory(src/compression) + add_subdirectory(src/fx) + add_subdirectory(src/milkyplay) +-- +2.36.1 + diff --git a/Ports/milkytracker/patches/0004-Link-against-the-needed-serenity-libraries.patch b/Ports/milkytracker/patches/0004-Link-against-the-needed-serenity-libraries.patch new file mode 100644 index 0000000000..d72263e11d --- /dev/null +++ b/Ports/milkytracker/patches/0004-Link-against-the-needed-serenity-libraries.patch @@ -0,0 +1,24 @@ +From 356ec6ffc3184d83e28ba6ad6c4667ac67b6d074 Mon Sep 17 00:00:00 2001 +From: "jake.westrip" <jake.westrip@lonsec.com.au> +Date: Wed, 28 Apr 2021 21:19:03 +1000 +Subject: [PATCH 4/5] Link against the needed serenity libraries + +--- + src/tracker/CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/tracker/CMakeLists.txt b/src/tracker/CMakeLists.txt +index f4243a0..02f67c0 100644 +--- a/src/tracker/CMakeLists.txt ++++ b/src/tracker/CMakeLists.txt +@@ -374,4 +374,7 @@ else() + set(INSTALL_DEST ${CMAKE_INSTALL_BINDIR}) + endif() + ++target_link_libraries(tracker -lSDL2 -lgui -lipc -lm) ++set(INSTALL_DEST bin) ++ + install(TARGETS tracker DESTINATION ${INSTALL_DEST}) +-- +2.36.1 + diff --git a/Ports/milkytracker/patches/0005-Replace-tmpnam-with-mkstemp.patch b/Ports/milkytracker/patches/0005-Replace-tmpnam-with-mkstemp.patch new file mode 100644 index 0000000000..2661a8eed0 --- /dev/null +++ b/Ports/milkytracker/patches/0005-Replace-tmpnam-with-mkstemp.patch @@ -0,0 +1,25 @@ +From 8938812509ede61e6f50b65ebba94b8809eb0cf5 Mon Sep 17 00:00:00 2001 +From: "jake.westrip" <jake.westrip@lonsec.com.au> +Date: Tue, 27 Apr 2021 18:34:53 +1000 +Subject: [PATCH 5/5] Replace tmpnam with mkstemp + +--- + src/ppui/osinterface/posix/PPSystem_POSIX.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ppui/osinterface/posix/PPSystem_POSIX.cpp b/src/ppui/osinterface/posix/PPSystem_POSIX.cpp +index 9b84cfe..03b22b4 100644 +--- a/src/ppui/osinterface/posix/PPSystem_POSIX.cpp ++++ b/src/ppui/osinterface/posix/PPSystem_POSIX.cpp +@@ -67,7 +67,7 @@ const SYSCHAR* System::getTempFileName() + // instead of a file name. + #pragma clang diagnostic push + #pragma GCC diagnostic ignored "-Wdeprecated-declarations" +- if ((tmpnam(buffer) == NULL)) ++ if ((mkstemp(buffer) == NULL)) + #pragma clang diagnostic pop + { + // should not be the case, if it is the case, create something that +-- +2.36.1 + diff --git a/Ports/milkytracker/patches/IncludeStringsInBasicTypes.patch b/Ports/milkytracker/patches/IncludeStringsInBasicTypes.patch deleted file mode 100644 index db26e01d66..0000000000 --- a/Ports/milkytracker/patches/IncludeStringsInBasicTypes.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- MilkyTracker-1.03.00/src/ppui/BasicTypes.h 2021-04-27 15:17:42.529000000 +1000 -+++ MilkyTracker-1.03.00/src/ppui/BasicTypes.h 2021-04-27 15:17:42.529000000 +1000 -@@ -30,6 +30,7 @@ - typedef unsigned int pp_uint32; - typedef signed int pp_int32; - -+#include <strings.h> - #include "ScanCodes.h" - - #if defined(WIN32) || defined(_WIN32_WCE)
\ No newline at end of file diff --git a/Ports/milkytracker/patches/ReadMe.md b/Ports/milkytracker/patches/ReadMe.md new file mode 100644 index 0000000000..eb478a576d --- /dev/null +++ b/Ports/milkytracker/patches/ReadMe.md @@ -0,0 +1,27 @@ +# Patches for milkytracker on SerenityOS + +## `0001-Include-strings.h.patch` + +Include strings.h + + +## `0002-Remove-OpenGL.patch` + +Remove OpenGL + + +## `0003-Set-C-standard-to-C-20-and-remove-some-unnecessary-s.patch` + +Set C++ standard to C++20 and remove some unnecessary subdirectories + + +## `0004-Link-against-the-needed-serenity-libraries.patch` + +Link against the needed serenity libraries + + +## `0005-Replace-tmpnam-with-mkstemp.patch` + +Replace tmpnam with mkstemp + + diff --git a/Ports/milkytracker/patches/SetCXXStandardAndExcludeSubdirs.patch b/Ports/milkytracker/patches/SetCXXStandardAndExcludeSubdirs.patch deleted file mode 100644 index f202dae653..0000000000 --- a/Ports/milkytracker/patches/SetCXXStandardAndExcludeSubdirs.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- MilkyTracker-1.03.00/CMakeLists.txt 2021-04-27 15:17:42.529000000 +1000 -+++ MilkyTracker-1.03.00/CMakeLists.txt 2021-04-27 15:17:50.388987606 +1000 -@@ -22,8 +22,8 @@ - cmake_minimum_required(VERSION 3.10) - project(MilkyTracker) - --# Set C++ standard to C++98 --set(CMAKE_CXX_STANDARD 98) -+# Set C++ standard to C++20 -+set(CMAKE_CXX_STANDARD 20) - set(CMAKE_CXX_EXTENSIONS OFF) - - # Enable IDE solution folders -@@ -220,8 +220,6 @@ - set(CMAKE_FIND_LIBRARY_SUFFIXES ${SUFFIXES_ORIG}) - endif() - --add_subdirectory(docs) --add_subdirectory(resources/music) - add_subdirectory(src/compression) - add_subdirectory(src/fx) - add_subdirectory(src/milkyplay) diff --git a/Ports/milkytracker/patches/SetTrackerLinks.patch b/Ports/milkytracker/patches/SetTrackerLinks.patch deleted file mode 100644 index be7ef6566d..0000000000 --- a/Ports/milkytracker/patches/SetTrackerLinks.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- MilkyTracker-1.03.00/src/tracker/CMakeLists.txt 2021-04-27 15:17:42.529000000 +1000 -+++ MilkyTracker-1.03.00/src/tracker/CMakeLists.txt 2021-04-27 15:17:42.529000000 +1000 -@@ -374,4 +375,7 @@ - set(INSTALL_DEST ${CMAKE_INSTALL_BINDIR}) - endif() - -+target_link_libraries(tracker -lSDL2 -lgui -lipc -lm) -+set(INSTALL_DEST bin) -+ - install(TARGETS tracker DESTINATION ${INSTALL_DEST}) -
\ No newline at end of file diff --git a/Ports/milkytracker/patches/TmpnamToMkstemp.patch b/Ports/milkytracker/patches/TmpnamToMkstemp.patch deleted file mode 100644 index 024a7ee92b..0000000000 --- a/Ports/milkytracker/patches/TmpnamToMkstemp.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- MilkyTracker-1.03.00/src/ppui/osinterface/posix/PPSystem_POSIX.cpp 2021-04-27 15:17:42.529000000 +1000 -+++ MilkyTracker-1.03.00/src/ppui/osinterface/posix/PPSystem_POSIX.cpp 2021-04-27 15:17:42.529000000 +1000 -@@ -67,7 +69,7 @@ - // instead of a file name. - #pragma clang diagnostic push - #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -- if ((tmpnam(buffer) == NULL)) -+ if ((mkstemp(buffer) == NULL)) - #pragma clang diagnostic pop - { - // should not be the case, if it is the case, create something that
\ No newline at end of file |