pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
openjkdf2: import OpenJKDF2-0.9.0 as wip/openjkdf2
Module Name: pkgsrc-wip
Committed By: Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By: yhardy
Date: Sun Jun 18 13:48:08 2023 +0200
Changeset: a331671f71e7c8c66a33d34a9a3f7c3e62e1002c
Modified Files:
Makefile
Added Files:
openjkdf2/DESCR
openjkdf2/Makefile
openjkdf2/PLIST
openjkdf2/distinfo
openjkdf2/patches/patch-CMakeLists.txt
openjkdf2/patches/patch-cmake__modules_config__platform__deps.cmake
openjkdf2/patches/patch-cmake__modules_precompile__globals.cmake
openjkdf2/patches/patch-cmake__modules_version.cmake
openjkdf2/patches/patch-src_jk.h
Log Message:
openjkdf2: import OpenJKDF2-0.9.0 as wip/openjkdf2
OpenJKDF2 is a function-by-function reimplementation of the game
engine for "Dark Forces 2" in C.
OpenJKDF2 does *not* include any original game assets; a valid copy
of JKDF2 is *required*
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a331671f71e7c8c66a33d34a9a3f7c3e62e1002c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
openjkdf2/DESCR | 5 +
openjkdf2/Makefile | 53 ++++++++
openjkdf2/PLIST | 2 +
openjkdf2/distinfo | 10 ++
openjkdf2/patches/patch-CMakeLists.txt | 107 ++++++++++++++++
...tch-cmake__modules_config__platform__deps.cmake | 139 +++++++++++++++++++++
.../patch-cmake__modules_precompile__globals.cmake | 29 +++++
.../patches/patch-cmake__modules_version.cmake | 25 ++++
openjkdf2/patches/patch-src_jk.h | 12 ++
10 files changed, 383 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index bb82ad2799..d632d0bea0 100644
--- a/Makefile
+++ b/Makefile
@@ -2702,6 +2702,7 @@ SUBDIR+= openfodder-data
SUBDIR+= openfortivpn
SUBDIR+= opengrok
SUBDIR+= openjdk8-openjfx-hg
+SUBDIR+= openjkdf2
SUBDIR+= openlogos
SUBDIR+= openmp
SUBDIR+= opennurbs
diff --git a/openjkdf2/DESCR b/openjkdf2/DESCR
new file mode 100644
index 0000000000..bb9189be81
--- /dev/null
+++ b/openjkdf2/DESCR
@@ -0,0 +1,5 @@
+OpenJKDF2 is a function-by-function reimplementation of the game
+engine for "Dark Forces 2" in C.
+
+OpenJKDF2 does *not* include any original game assets; a valid copy
+of JKDF2 is *required*
diff --git a/openjkdf2/Makefile b/openjkdf2/Makefile
new file mode 100644
index 0000000000..d105213350
--- /dev/null
+++ b/openjkdf2/Makefile
@@ -0,0 +1,53 @@
+# $NetBSD$
+
+GITHUB_TAG= v${PKGVERSION_NOREV}
+DISTNAME= OpenJKDF2-0.9.0
+CATEGORIES= games
+MASTER_SITES= ${MASTER_SITE_GITHUB:=shinyquagsire23/}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/shinyquagsire23/OpenJKDF2/
+COMMENT= Cross-platform reimplementation of the Dark Forces 2 game engine
+#LICENSE= # TODO: (see mk/license.mk)
+
+USE_TOOLS+= pkg-config
+USE_LANGUAGES= c c++
+
+.include "../../lang/python/pyversion.mk"
+BUILD_DEPENDS+= ${PYPKGPREFIX}-cogapp-[0-9]*:../../devel/py-cogapp
+
+CMAKE_ARGS+= -DPLAT_PKGSRC:BOOL=TRUE
+CMAKE_ARGS+= -DPLAT_PKGSRC64:BOOL=FALSE
+CMAKE_ARGS+= -DPYVERSSUFFIX=${PYVERSSUFFIX}
+
+.for platform in ${LP64PLATFORMS}
+. if ${MACHINE_PLATFORM:M${platform}}
+CMAKE_ARGS+= -DPLAT_PKGSRC64:BOOL=TRUE
+. endif
+.endfor
+
+PKGCONFIG_OVERRIDE+= 3rdparty/json/cmake/pkg-config.pc.in
+
+DL_AUTO_VARS= yes
+
+INSTALLATION_DIRS+= bin
+INSTALL_TARGET= preinstall
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${CMAKE_BUILD_DIR}/openjkdf2 ${DESTDIR}${PREFIX}/bin
+
+.include "../../audio/SDL2_mixer/buildlink3.mk"
+.include "../../audio/openal-soft/buildlink3.mk"
+.include "../../audio/freealut/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../devel/libexecinfo/buildlink3.mk"
+.include "../../devel/physfs/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/freeglut/buildlink3.mk"
+.include "../../graphics/glew/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../www/curl/buildlink3.mk"
+.include "../../x11/gtk3/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/openjkdf2/PLIST b/openjkdf2/PLIST
new file mode 100644
index 0000000000..aea08027d4
--- /dev/null
+++ b/openjkdf2/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+bin/openjkdf2
diff --git a/openjkdf2/distinfo b/openjkdf2/distinfo
new file mode 100644
index 0000000000..0f87a0474e
--- /dev/null
+++ b/openjkdf2/distinfo
@@ -0,0 +1,10 @@
+$NetBSD$
+
+BLAKE2s (OpenJKDF2-0.9.0.tar.gz) = 1735b8ea81e78d5ed0ba4bd0da0e0da532f6ba81a6c03bea16f09d0641d99acf
+SHA512 (OpenJKDF2-0.9.0.tar.gz) = ec811efdbf2b4921b1dd54db999eb8c1e61c83dbab64c4d4f08b880763f497f310cedd953323d6d7efa086dc805db1653ca76502c874438b4e5fe0dbe959674f
+Size (OpenJKDF2-0.9.0.tar.gz) = 22839937 bytes
+SHA1 (patch-CMakeLists.txt) = 865ba339b1d3e56c629fcd688910ba0d322d7f54
+SHA1 (patch-cmake__modules_config__platform__deps.cmake) = 7b2a7c8da9a94ae800d1f760023ee008de89e8c8
+SHA1 (patch-cmake__modules_precompile__globals.cmake) = b814ddadf736a991f3b68f74c3ad1b7b740bd417
+SHA1 (patch-cmake__modules_version.cmake) = fef21be451065a62382a4970149fa4bdfdea17a8
+SHA1 (patch-src_jk.h) = 5e1182ebe845cf23521e698acbea3e44a0438260
diff --git a/openjkdf2/patches/patch-CMakeLists.txt b/openjkdf2/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..35052697b5
--- /dev/null
+++ b/openjkdf2/patches/patch-CMakeLists.txt
@@ -0,0 +1,107 @@
+$NetBSD$
+
+* Defining _XOPEN_SOURCE means that some dirent.h definitions are omitted,
+ but they are used by the engine. So omit the definition.
+* Use the pkgsrc libraries instead of compiling 3rd party sources.
+
+--- CMakeLists.txt.orig 2023-06-16 02:36:07.000000000 +0000
++++ CMakeLists.txt
+@@ -31,11 +31,12 @@ set(PLAT_WASM FALSE CACHE BOOL "Emscript
+ set(PLAT_HOOKS FALSE CACHE BOOL "Hook DLL target")
+ set(PLAT_MSVC FALSE CACHE BOOL "Windows 64-bit MSVC")
+ set(PLAT_ANDROID_ARM64 FALSE CACHE BOOL "Android AArch64")
++set(PLAT_PKGSRC FALSE CACHE BOOL "Target pkgsrc")
+ set(PLAT_AUTO FALSE CACHE BOOL "Target the host OS")
+
+ # Set PLAT_AUTO if a platform isn't specifically selected
+ if(NOT PLAT_LINUX_32 AND NOT PLAT_LINUX_64 AND NOT PLAT_MACOS AND NOT PLAT_MACOS_X86_64 AND NOT PLAT_MINGW_X86_64 AND NOT PLAT_WASM AND NOT PLAT_HOOKS)
+- set(PLAT_AUTO TRUE)
++# set(PLAT_AUTO TRUE)
+ endif()
+
+ # Internal targets: Stuff like OpenGL vs D3D, OpenAL vs null sound, etc
+@@ -105,7 +106,7 @@ if(PLAT_LINUX_32)
+ message( STATUS "Targeting Linux 32-bit" )
+ set(BIN_NAME "openjkdf2")
+
+- add_definitions(-D_XOPEN_SOURCE=500)
++# add_definitions(-D_XOPEN_SOURCE=500)
+ add_definitions(-D_DEFAULT_SOURCE)
+
+ set(TARGET_USE_PHYSFS TRUE)
+@@ -135,7 +136,7 @@ elseif(PLAT_LINUX_64)
+ set(BIN_NAME "openjkdf2")
+
+ add_definitions(-DARCH_64BIT)
+- add_definitions(-D_XOPEN_SOURCE=500)
++# add_definitions(-D_XOPEN_SOURCE=500)
+ add_definitions(-D_DEFAULT_SOURCE)
+
+ set(TARGET_USE_PHYSFS TRUE)
+@@ -365,6 +366,37 @@ elseif(PLAT_MSVC)
+ set(TARGET_COMPILE_FREEGLUT TRUE)
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /std:c11")
++elseif(PLAT_PKGSRC)
++ message( STATUS "Targeting pkgsrc" )
++ set(BIN_NAME "openjkdf2")
++
++ add_compile_definitions(SDL2_RENDER)
++ add_compile_definitions(STDSOUND_OPENAL)
++ if(PLAT_PKGSRC64)
++ add_definitions(-DARCH_64BIT)
++ endif()
++# add_definitions(-D_XOPEN_SOURCE=500)
++ add_definitions(-D_DEFAULT_SOURCE)
++ add_definitions(-DLINUX)
++ add_definitions(-DPLATFORM_LINUX)
++ add_definitions(-DPLATFORM_NO_CACERT_BLOB)
++
++ set(TARGET_USE_PHYSFS TRUE)
++ set(TARGET_USE_LIBSMACKER TRUE)
++ set(TARGET_USE_LIBSMUSHER TRUE)
++ set(TARGET_USE_SDL2 TRUE)
++ set(TARGET_USE_OPENGL TRUE)
++ set(TARGET_USE_OPENAL TRUE)
++ set(TARGET_POSIX TRUE)
++ set(TARGET_PKGSRC TRUE)
++ set(TARGET_NO_BLOBS TRUE)
++ set(TARGET_CAN_JKGM TRUE)
++ set(OPENJKDF2_NO_ASAN TRUE)
++
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -std=c11 -fshort-wchar -Wno-implicit-function-declaration -Wno-unused-variable -Wno-parentheses ")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fshort-wchar -Wno-implicit-function-declaration -Wno-unused-variable -Wno-parentheses ")
++ add_link_options(-fshort-wchar)
++
+ endif()
+
+ if(NOT CMAKE_BUILD_TYPE)
+@@ -373,7 +405,7 @@ endif()
+
+ # CMake module paths
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules")
+-if(TARGET_LINUX OR TARGET_MACOS OR PLAT_MSVC OR TARGET_ANDROID)
++if(TARGET_LINUX OR TARGET_MACOS OR PLAT_MSVC OR TARGET_ANDROID OR TARGET_PKGSRC)
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules_linux")
+ endif()
+
+@@ -478,7 +510,7 @@ if(TARGET_MACOS)
+ endif()
+ endif()
+
+-if(TARGET_LINUX)
++if(TARGET_LINUX OR TARGET_PKGSRC)
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
+ include_directories(${GTK3_INCLUDE_DIRS})
+@@ -727,6 +759,10 @@ elseif(TARGET_MACOS)
+ # macOS post-build packaging
+ #
+ include(cmake_modules/postcompile_macos.cmake)
++elseif(TARGET_PKGSRC)
++ target_link_libraries(${BIN_NAME} PRIVATE -lm -lpng -lz -lSDL2 -lSDL2_mixer -lGL -lGLEW -lopenal)
++ target_link_libraries(${BIN_NAME} PRIVATE nlohmann_json::nlohmann_json)
++ target_link_libraries(${BIN_NAME} PRIVATE ${GTK3_LIBRARIES})
+ else()
+ message(FATAL_ERROR "Unknown target! Cannot continue.")
+ endif()
diff --git a/openjkdf2/patches/patch-cmake__modules_config__platform__deps.cmake b/openjkdf2/patches/patch-cmake__modules_config__platform__deps.cmake
new file mode 100644
index 0000000000..661e0b75ad
--- /dev/null
+++ b/openjkdf2/patches/patch-cmake__modules_config__platform__deps.cmake
@@ -0,0 +1,139 @@
+$NetBSD$
+
+* Use the pkgsrc libraries instead of compiling 3rd party sources.
+
+--- cmake_modules/config_platform_deps.cmake.orig 2023-06-16 02:36:07.000000000 +0000
++++ cmake_modules/config_platform_deps.cmake
+@@ -16,7 +16,7 @@ if(TARGET_USE_CURL)
+ CURL_STATICLIB
+ )
+
+- if(TARGET_LINUX)
++ if(TARGET_LINUX OR TARGET_PKGSRC)
+ # Linux can just use the package manager version of libcurl, yay
+ add_definitions(-DPLATFORM_CURL)
+ else()
+@@ -44,12 +44,18 @@ if(DEBUG_QOL_CHEATS)
+ add_definitions(-DDEBUG_QOL_CHEATS)
+ endif()
+
++if(NOT TARGET_PKGSRC) # use pkgsrc GLUT
++
+ find_package(GLUT)
+ if(NOT FreeGLUT_FOUND OR CMAKE_CROSSCOMPILING)
+ message(STATUS "Going to build “FreeGLUT 3.4.0” from Git module")
+ include(build_freeglut)
+ endif()
+
++endif() # use pkgsrc GLUT
++
++if(NOT TARGET_PKGSRC) # use pkgsrc GLEW
++
+ set(GLEW_USE_STATIC_LIBS TRUE)
+ find_package(GLEW 2.2.0)
+ if((NOT GLEW_FOUND OR CMAKE_CROSSCOMPILING) AND NOT PLAT_WASM)
+@@ -57,20 +63,29 @@ if((NOT GLEW_FOUND OR CMAKE_CROSSCOMPILI
+ include(build_glew)
+ endif()
+
++endif() # use pkgsrc GLEW
++
+ if (NOT TARGET_USE_BASICSOCKETS AND NOT TARGET_USE_GAMENETWORKINGSOCKETS)
+ set(TARGET_USE_NOSOCKETS TRUE)
+ endif()
+
++if(NOT TARGET_PKGSRC) # use pkgsrc zlib
+
+ message(STATUS "Going to build “zlib 1.2.13” from Git module")
+ include(build_zlib)
+
++endif() # use pkgsrc zlib
++
++if(NOT TARGET_PKGSRC) # use pkgsrc physfs
++
+ if(TARGET_USE_PHYSFS)
+ message(STATUS "Going to build “PhysFS 3.2.0” from Git module")
+ include(build_physfs)
+ add_compile_definitions(PLATFORM_PHYSFS)
+ endif()
+
++endif() # use pkgsrc physfs
++
+ if(TARGET_USE_GAMENETWORKINGSOCKETS)
+ set(PROTOBUF_DEPENDS ZLIB_${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
+ set(PROTOBUF_BUILD_PROTOC_BINARIES TRUE)
+@@ -120,9 +135,13 @@ if(TARGET_USE_NOSOCKETS AND NOT TARGET_H
+ add_definitions(-DPLATFORM_NOSOCKETS)
+ endif()
+
++if(NOT TARGET_PKGSRC) # use pkgsrc libpng
++
+ message(STATUS "Going to build “libpng 1.6.39” from Git module")
+ include(build_libpng)
+
++endif() # use pkgsrc libpng
++
+ if(TARGET_USE_LIBSMACKER)
+ list(APPEND SOURCE_FILES ${PROJECT_SOURCE_DIR}/src/external/libsmacker/smacker.c ${PROJECT_SOURCE_DIR}/src/external/libsmacker/smk_bitstream.c ${PROJECT_SOURCE_DIR}/src/external/libsmacker/smk_hufftree.c)
+ endif()
+@@ -131,8 +150,10 @@ if(TARGET_USE_LIBSMUSHER)
+ list(APPEND SOURCE_FILES ${PROJECT_SOURCE_DIR}/src/external/libsmusher/src/smush.c ${PROJECT_SOURCE_DIR}/src/external/libsmusher/src/codec48.c)
+ endif()
+
++if(NOT TARGET_PKGSRC) # use pkgsrc SDL2
++
+ # Build SDL2 from sources (n/a for WASM)
+-if(TARGET_USE_SDL2 AND NOT PLAT_WASM)
++if(TARGET_USE_SDL2 AND NOT PLAT_WASM AND NOT PLAT_PKGSRC)
+ message(STATUS "Going to build “SDL 2.26.5” from Git module")
+ include(build_sdl)
+
+@@ -142,6 +163,8 @@ if(TARGET_USE_SDL2 AND NOT PLAT_WASM)
+ endif()
+ endif()
+
++endif() # use pkgsrc SDL2
++
+ # SDL2 Platform/
+ if(TARGET_USE_SDL2)
+ file(GLOB TARGET_SDL2_SRCS ${PROJECT_SOURCE_DIR}/src/Platform/SDL2/*.c)
+@@ -157,6 +180,8 @@ if(TARGET_USE_OPENGL)
+ list(APPEND SOURCE_FILES ${TARGET_GL_CPP_SRCS})
+ endif()
+
++if(NOT TARGET_PKGSRC) # use pkgsrc openAL
++
+ if(TARGET_USE_OPENAL AND NOT PLAT_WASM)
+ #find_package(OpenAL 1.23.1)
+ if(NOT OPENAL_FOUND)
+@@ -168,6 +193,8 @@ else()
+ add_compile_definitions(STDSOUND_NULL)
+ endif()
+
++endif() # use pkgsrc openAL
++
+ if(TARGET_USE_D3D)
+ file(GLOB TARGET_D3D_SRCS ${PROJECT_SOURCE_DIR}/src/Platform/D3D/*.c)
+ list(APPEND SOURCE_FILES ${TARGET_D3D_SRCS})
+@@ -180,7 +207,7 @@ if(TARGET_POSIX)
+ add_definitions(-DPLATFORM_POSIX)
+ endif()
+
+-if(TARGET_LINUX)
++if(TARGET_LINUX OR TARGET_PKGSRC)
+ list(APPEND SOURCE_FILES ${PROJECT_SOURCE_DIR}/src/external/nativefiledialog-extended/nfd_gtk.cpp)
+
+ add_definitions(-DLINUX)
+@@ -203,6 +230,12 @@ if(TARGET_WASM)
+ add_definitions(-DLINUX)
+ endif()
+
++if(TARGET_PKGSRC)
++ add_definitions(-DLINUX)
++ add_definitions(-DPLATFORM_LINUX)
++ add_definitions(-DPLATFORM_NO_CACERT_BLOB)
++endif()
++
+ if(TARGET_CAN_JKGM)
+ add_definitions(-DTARGET_CAN_JKGM)
+ endif()
diff --git a/openjkdf2/patches/patch-cmake__modules_precompile__globals.cmake b/openjkdf2/patches/patch-cmake__modules_precompile__globals.cmake
new file mode 100644
index 0000000000..d32ff9d5ec
--- /dev/null
+++ b/openjkdf2/patches/patch-cmake__modules_precompile__globals.cmake
@@ -0,0 +1,29 @@
+$NetBSD$
+
+* Use the correct "cog" command.
+
+--- cmake_modules/precompile_globals.cmake.orig 2023-06-09 06:59:18.000000000 +0000
++++ cmake_modules/precompile_globals.cmake
+@@ -8,13 +8,13 @@ list(APPEND SOURCE_FILES ${GLOBALS_C})
+ # All of our pre-build steps
+ add_custom_command(
+ OUTPUT ${GLOBALS_C}
+- COMMAND cog -d -D symbols_fpath="${SYMBOLS_FILE}" -D project_root="${PROJECT_SOURCE_DIR}" -o ${GLOBALS_C} ${GLOBALS_C_COG}
++ COMMAND cog-${PYVERSSUFFIX} -d -D symbols_fpath="${SYMBOLS_FILE}" -D project_root="${PROJECT_SOURCE_DIR}" -o ${GLOBALS_C} ${GLOBALS_C_COG}
+ DEPENDS ${SYMBOLS_FILE} ${GLOBALS_C_COG} ${GLOBALS_H} ${PROJECT_SOURCE_DIR}/resource/shaders/default_f.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/default_v.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/menu_f.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/menu_v.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/texfbo_f.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/texfbo_v.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/blur_f.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/blur_v.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/ssao_f.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/ssao_v.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/ssao_mix_f.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/ssao_mix_v.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/ui_f.glsl ${PROJECT_SOURCE_DIR}/resource/shaders/ui_v.glsl ${PROJECT_SOURCE_DIR}/resource/ssl/cacert.pem ${PROJECT_SOURCE_DIR}/resource/ui/openjkdf2.uni ${PROJECT_SOURCE_DIR}/resource/ui/openjkdf2_i8n.uni
+ )
+
+ add_custom_command(
+ OUTPUT ${GLOBALS_H}
+- COMMAND cog -d -D symbols_fpath="${SYMBOLS_FILE}" -D project_root="${PROJECT_SOURCE_DIR}" -o ${GLOBALS_H} ${GLOBALS_H_COG}
++ COMMAND cog-${PYVERSSUFFIX} -d -D symbols_fpath="${SYMBOLS_FILE}" -D project_root="${PROJECT_SOURCE_DIR}" -o ${GLOBALS_H} ${GLOBALS_H_COG}
+ DEPENDS ${SYMBOLS_FILE} ${GLOBALS_H_COG}
+ )
+
+@@ -22,4 +22,4 @@ add_custom_command(
+ PRE_BUILD
+ OUTPUT ${BIN_NAME}
+ DEPENDS ${GLOBALS_C} ${GLOBALS_H}
+-)
+\ No newline at end of file
++)
diff --git a/openjkdf2/patches/patch-cmake__modules_version.cmake b/openjkdf2/patches/patch-cmake__modules_version.cmake
new file mode 100644
index 0000000000..66859aac13
--- /dev/null
+++ b/openjkdf2/patches/patch-cmake__modules_version.cmake
@@ -0,0 +1,25 @@
+$NetBSD$
+
+* Don't use git.
+
+--- cmake_modules/version.cmake.orig 2023-06-16 02:36:07.000000000 +0000
++++ cmake_modules/version.cmake
+@@ -1,4 +1,9 @@
+ set(OPENJKDF2_PROJECT_VERSION 0.9.0.0)
++set(OPENJKDF2_RELEASE_COMMIT ${OPENJKDF2_PROJECT_VERSION})
++set(OPENJKDF2_RELEASE_COMMIT_SHORT ${OPENJKDF2_PROJECT_VERSION})
++
++if(FALSE)
++
+ find_package(Git)
+ execute_process(
+ COMMAND git log -1 --format=%H
+@@ -9,4 +14,6 @@ execute_process(
+ COMMAND git rev-parse --short=8 HEAD
+ OUTPUT_VARIABLE OPENJKDF2_RELEASE_COMMIT_SHORT
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+-)
+\ No newline at end of file
++)
++
++endif()
diff --git a/openjkdf2/patches/patch-src_jk.h b/openjkdf2/patches/patch-src_jk.h
new file mode 100644
index 0000000000..be6726d4e2
--- /dev/null
+++ b/openjkdf2/patches/patch-src_jk.h
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- src/jk.h.orig 2023-06-16 02:36:07.000000000 +0000
++++ src/jk.h
+@@ -8,6 +8,7 @@ extern "C" {
+ #include "engine_config.h"
+ #include "types.h"
+ #include <stdio.h>
++#include <string.h>
+
+ #ifdef ARCH_WASM
+ #include <string.h>
Home |
Main Index |
Thread Index |
Old Index