1 |
commit: f61d1cc3832f22c056cf3d647ac165d06b2da2f2 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 3 07:41:03 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 3 07:41:03 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f61d1cc3 |
7 |
|
8 |
games-engines/devilutionx: Added missing patch |
9 |
|
10 |
Package-Manager: Portage-2.3.75, Repoman-2.3.17 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
...ilutionx-facebookincubator_find_libsodium.patch | 88 ++++++++++++++++++++++ |
14 |
1 file changed, 88 insertions(+) |
15 |
|
16 |
diff --git a/games-engines/devilutionx/files/devilutionx-facebookincubator_find_libsodium.patch b/games-engines/devilutionx/files/devilutionx-facebookincubator_find_libsodium.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..e81de974c4d |
19 |
--- /dev/null |
20 |
+++ b/games-engines/devilutionx/files/devilutionx-facebookincubator_find_libsodium.patch |
21 |
@@ -0,0 +1,88 @@ |
22 |
+From 1f7f5bf3dccee957e23bdf4d976883b155d5e81a Mon Sep 17 00:00:00 2001 |
23 |
+From: Anders Jenbo <anders@×××××.dk> |
24 |
+Date: Tue, 23 Jul 2019 21:34:08 +0200 |
25 |
+Subject: [PATCH] Use facebookincubator findflindsodium cmake helper |
26 |
+ |
27 |
+https://github.com/facebookincubator/fizz/blob/master/fizz/cmake/FindSodium.cmake |
28 |
+--- |
29 |
+ CMake/Findsodium.cmake | 34 ++++++++++++++++++++-------------- |
30 |
+ 1 file changed, 20 insertions(+), 14 deletions(-) |
31 |
+ |
32 |
+diff --git a/CMake/Findsodium.cmake b/CMake/Findsodium.cmake |
33 |
+index 0667920c..c664ccbe 100644 |
34 |
+--- a/CMake/Findsodium.cmake |
35 |
++++ b/CMake/Findsodium.cmake |
36 |
+@@ -55,22 +55,22 @@ if (UNIX) |
37 |
+ endif() |
38 |
+ |
39 |
+ if(sodium_USE_STATIC_LIBS) |
40 |
+- if (sodium_PKG_STATIC_LIBRARIES) |
41 |
+- foreach(_libname ${sodium_PKG_STATIC_LIBRARIES}) |
42 |
+- if (NOT _libname MATCHES "^lib.*\\.a$") # ignore strings already ending with .a |
43 |
+- list(INSERT sodium_PKG_STATIC_LIBRARIES 0 "lib${_libname}.a") |
44 |
+- endif() |
45 |
+- endforeach() |
46 |
+- list(REMOVE_DUPLICATES sodium_PKG_STATIC_LIBRARIES) |
47 |
+- else() |
48 |
+- # if pkgconfig for libsodium doesn't provide |
49 |
+- # static lib info, then override PKG_STATIC here.. |
50 |
++ foreach(_libname ${sodium_PKG_STATIC_LIBRARIES}) |
51 |
++ if (NOT _libname MATCHES "^lib.*\\.a$") # ignore strings already ending with .a |
52 |
++ list(INSERT sodium_PKG_STATIC_LIBRARIES 0 "lib${_libname}.a") |
53 |
++ endif() |
54 |
++ endforeach() |
55 |
++ list(REMOVE_DUPLICATES sodium_PKG_STATIC_LIBRARIES) |
56 |
++ |
57 |
++ # if pkgconfig for libsodium doesn't provide |
58 |
++ # static lib info, then override PKG_STATIC here.. |
59 |
++ if (NOT sodium_PKG_STATIC_FOUND) |
60 |
+ set(sodium_PKG_STATIC_LIBRARIES libsodium.a) |
61 |
+ endif() |
62 |
+ |
63 |
+ set(XPREFIX sodium_PKG_STATIC) |
64 |
+ else() |
65 |
+- if (sodium_PKG_LIBRARIES STREQUAL "") |
66 |
++ if (NOT sodium_PKG_FOUND) |
67 |
+ set(sodium_PKG_LIBRARIES sodium) |
68 |
+ endif() |
69 |
+ |
70 |
+@@ -101,7 +101,7 @@ elseif (WIN32) |
71 |
+ |
72 |
+ if (MSVC) |
73 |
+ # detect target architecture |
74 |
+- file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arch.c" [=[ |
75 |
++ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arch.cpp" [=[ |
76 |
+ #if defined _M_IX86 |
77 |
+ #error ARCH_VALUE x86_32 |
78 |
+ #elif defined _M_X64 |
79 |
+@@ -109,7 +109,7 @@ elseif (WIN32) |
80 |
+ #endif |
81 |
+ #error ARCH_VALUE unknown |
82 |
+ ]=]) |
83 |
+- try_compile(_UNUSED_VAR "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/arch.c" |
84 |
++ try_compile(_UNUSED_VAR "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/arch.cpp" |
85 |
+ OUTPUT_VARIABLE _COMPILATION_LOG |
86 |
+ ) |
87 |
+ string(REGEX REPLACE ".*ARCH_VALUE ([a-zA-Z0-9_]+).*" "\\1" _TARGET_ARCH "${_COMPILATION_LOG}") |
88 |
+@@ -224,7 +224,8 @@ endif() |
89 |
+ |
90 |
+ # communicate results |
91 |
+ include(FindPackageHandleStandardArgs) |
92 |
+-find_package_handle_standard_args(sodium |
93 |
++find_package_handle_standard_args( |
94 |
++ Sodium # The name must be either uppercase or match the filename case. |
95 |
+ REQUIRED_VARS |
96 |
+ sodium_LIBRARY_RELEASE |
97 |
+ sodium_LIBRARY_DEBUG |
98 |
+@@ -233,6 +234,11 @@ find_package_handle_standard_args(sodium |
99 |
+ sodium_VERSION |
100 |
+ ) |
101 |
+ |
102 |
++if(Sodium_FOUND) |
103 |
++ set(sodium_LIBRARIES |
104 |
++ optimized ${sodium_LIBRARY_RELEASE} debug ${sodium_LIBRARY_DEBUG}) |
105 |
++endif() |
106 |
++ |
107 |
+ # mark file paths as advanced |
108 |
+ mark_as_advanced(sodium_INCLUDE_DIR) |
109 |
+ mark_as_advanced(sodium_LIBRARY_DEBUG) |