git: 4749f09e1932 - main - games/jaggedalliance2: Add files directory to unbreak build
Neel Chauhan
nc at FreeBSD.org
Tue Jun 1 22:27:43 UTC 2021
The branch main has been updated by nc:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4749f09e19323c42ebcf55bc0518c781f4f04574
commit 4749f09e19323c42ebcf55bc0518c781f4f04574
Author: Neel Chauhan <nc at FreeBSD.org>
AuthorDate: 2021-06-01 22:27:27 +0000
Commit: Neel Chauhan <nc at FreeBSD.org>
CommitDate: 2021-06-01 22:27:54 +0000
games/jaggedalliance2: Add files directory to unbreak build
---
games/jaggedalliance2/files/patch-CMakeLists.txt | 11 ++++++++
.../patch-dependencies_lib-lua_CMakeLists.txt | 31 ++++++++++++++++++++++
.../patch-dependencies_lib-sol2_CMakeLists.txt | 23 ++++++++++++++++
.../files/patch-rust_stracciatella_Cargo.toml | 25 +++++++++++++++++
.../patch-rust_stracciatella__c__api_Cargo.toml | 12 +++++++++
5 files changed, 102 insertions(+)
diff --git a/games/jaggedalliance2/files/patch-CMakeLists.txt b/games/jaggedalliance2/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..12e77e686e0b
--- /dev/null
+++ b/games/jaggedalliance2/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig 2021-04-23 09:23:24 UTC
++++ CMakeLists.txt
+@@ -94,6 +94,8 @@ option(WITH_MAEMO "Build with right click mapped to F4
+ option(BUILD_LAUNCHER "Build the ja2 launcher application" ON)
+ option(WITH_EDITOR_SLF "Include the latest free editor.slf" OFF)
+ option(WITH_RUST_BINARIES "Include rust binaries in build" ON)
++# @see LOCAL_LUA_LIB in dependencies/lib-lua/CMakeLists.txt
++# @see LOCAL_SOL_LIB in dependencies/lib-sol2/CMakeLists.txt
+ set(WITH_CUSTOM_LOCALE "" CACHE STRING "Set a custom locale at the start, leave empty to disable")
+
+ if(MSVC)
diff --git a/games/jaggedalliance2/files/patch-dependencies_lib-lua_CMakeLists.txt b/games/jaggedalliance2/files/patch-dependencies_lib-lua_CMakeLists.txt
new file mode 100644
index 000000000000..a11cdcdf6bdb
--- /dev/null
+++ b/games/jaggedalliance2/files/patch-dependencies_lib-lua_CMakeLists.txt
@@ -0,0 +1,31 @@
+--- dependencies/lib-lua/CMakeLists.txt.orig 2021-04-23 09:23:24 UTC
++++ dependencies/lib-lua/CMakeLists.txt
+@@ -1,4 +1,21 @@
+ # \file dependencies/lib-lua/CMakeLists.txt
++
++option(LOCAL_LUA_LIB "Download and build Lua instead of searching the system" ON)
++if (NOT LOCAL_LUA_LIB)
++ message(STATUS "Using system Lua")
++ find_package(Lua "5.3" REQUIRED)
++ if (NOT LUA_FOUND)
++ message(FATAL_ERROR "Lua 5.3 not found")
++ endif()
++
++ set(LUA_INCLUDE_DIRS "${LUA_INCLUDE_DIR}" PARENT_SCOPE)
++
++ add_library(lua INTERFACE)
++ target_link_libraries(lua INTERFACE "${LUA_LIBRARY}")
++
++ return()
++endif()
++
+ message(STATUS "<lua>")
+
+ CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
+@@ -31,4 +48,4 @@ LIST(REMOVE_ITEM LUA_SRC
+ "${SRC_DIR}/src/luac.c")
+
+ ADD_LIBRARY(lua ${LUA_SRC})
+-message(STATUS "</lua>")
+\ No newline at end of file
++message(STATUS "</lua>")
diff --git a/games/jaggedalliance2/files/patch-dependencies_lib-sol2_CMakeLists.txt b/games/jaggedalliance2/files/patch-dependencies_lib-sol2_CMakeLists.txt
new file mode 100644
index 000000000000..7550fec8d552
--- /dev/null
+++ b/games/jaggedalliance2/files/patch-dependencies_lib-sol2_CMakeLists.txt
@@ -0,0 +1,23 @@
+--- dependencies/lib-sol2/CMakeLists.txt.orig 2021-04-23 09:23:24 UTC
++++ dependencies/lib-sol2/CMakeLists.txt
+@@ -1,5 +1,20 @@
+ # \file dependencies/lib-sol2/CMakeLists.txt
+
++option(LOCAL_SOL_LIB "Download and build Sol2 instead of searching the system" ON)
++if (NOT LOCAL_SOL_LIB)
++ message(STATUS "Using system Sol2")
++ find_package(sol2 "3.2.2"
++ REQUIRED
++ PATH_SUFFIXES lib/cmake/sol2 # path to sol2-config.cmake
++ )
++ if (NOT sol2_FOUND)
++ message(FATAL_ERROR "Sol2 not found")
++ endif()
++
++ set(SOL_INCLUDE_DIR "${SOL2_INCLUDE_DIRS}" PARENT_SCOPE)
++ return()
++endif()
++
+ message(STATUS "<sol2>")
+
+ # create getter
diff --git a/games/jaggedalliance2/files/patch-rust_stracciatella_Cargo.toml b/games/jaggedalliance2/files/patch-rust_stracciatella_Cargo.toml
new file mode 100644
index 000000000000..409f893f5289
--- /dev/null
+++ b/games/jaggedalliance2/files/patch-rust_stracciatella_Cargo.toml
@@ -0,0 +1,25 @@
+--- rust/stracciatella/Cargo.toml.orig 2021-04-23 09:23:24 UTC
++++ rust/stracciatella/Cargo.toml
+@@ -33,22 +33,6 @@ tempfile = "3.0"
+ [target.'cfg(not(target_os = "android"))'.dependencies.simplelog]
+ version = "0.6"
+
+-[target.'cfg(windows)'.dependencies.winapi]
+-# @see stracciatella::fs::free_space
+-version = "0.3"
+-features = ["std", "fileapi"]
+-
+-[target.'cfg(target_os = "android")'.dependencies.android_logger]
+-version = "0.9"
+-[target.'cfg(target_os = "android")'.dependencies.lazy_static]
+-version = "1.4"
+-[target.'cfg(target_os = "android")'.dependencies.jni]
+-version = "0.14"
+-[target.'cfg(target_os = "android")'.dependencies.ndk]
+-git = "https://github.com/selaux/android-ndk-rs"
+-[target.'cfg(target_os = "android")'.dependencies.ndk-sys]
+-git = "https://github.com/selaux/android-ndk-rs"
+-
+ [dev-dependencies]
+ regex = "1.0"
+
diff --git a/games/jaggedalliance2/files/patch-rust_stracciatella__c__api_Cargo.toml b/games/jaggedalliance2/files/patch-rust_stracciatella__c__api_Cargo.toml
new file mode 100644
index 000000000000..ed8cdd433a14
--- /dev/null
+++ b/games/jaggedalliance2/files/patch-rust_stracciatella__c__api_Cargo.toml
@@ -0,0 +1,12 @@
+--- rust/stracciatella_c_api/Cargo.toml.orig 2021-05-26 18:07:59 UTC
++++ rust/stracciatella_c_api/Cargo.toml
+@@ -15,9 +15,6 @@ libc = "0.2"
+ log = "0.4"
+ stracciatella = { path = "../stracciatella" }
+
+-[target.'cfg(target_os = "android")'.dependencies.jni]
+-version = "0.14"
+-
+ [dev-dependencies]
+ tempfile = "3.0"
+
More information about the dev-commits-ports-all
mailing list