public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-engines/devilutionx/files/
Date: Tue,  3 Sep 2019 07:41:09 +0000 (UTC)	[thread overview]
Message-ID: <1567496463.f61d1cc3832f22c056cf3d647ac165d06b2da2f2.polynomial-c@gentoo> (raw)

commit:     f61d1cc3832f22c056cf3d647ac165d06b2da2f2
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  3 07:41:03 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Sep  3 07:41:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f61d1cc3

games-engines/devilutionx: Added missing patch

Package-Manager: Portage-2.3.75, Repoman-2.3.17
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 ...ilutionx-facebookincubator_find_libsodium.patch | 88 ++++++++++++++++++++++
 1 file changed, 88 insertions(+)

diff --git a/games-engines/devilutionx/files/devilutionx-facebookincubator_find_libsodium.patch b/games-engines/devilutionx/files/devilutionx-facebookincubator_find_libsodium.patch
new file mode 100644
index 00000000000..e81de974c4d
--- /dev/null
+++ b/games-engines/devilutionx/files/devilutionx-facebookincubator_find_libsodium.patch
@@ -0,0 +1,88 @@
+From 1f7f5bf3dccee957e23bdf4d976883b155d5e81a Mon Sep 17 00:00:00 2001
+From: Anders Jenbo <anders@jenbo.dk>
+Date: Tue, 23 Jul 2019 21:34:08 +0200
+Subject: [PATCH] Use facebookincubator findflindsodium cmake helper
+
+https://github.com/facebookincubator/fizz/blob/master/fizz/cmake/FindSodium.cmake
+---
+ CMake/Findsodium.cmake | 34 ++++++++++++++++++++--------------
+ 1 file changed, 20 insertions(+), 14 deletions(-)
+
+diff --git a/CMake/Findsodium.cmake b/CMake/Findsodium.cmake
+index 0667920c..c664ccbe 100644
+--- a/CMake/Findsodium.cmake
++++ b/CMake/Findsodium.cmake
+@@ -55,22 +55,22 @@ if (UNIX)
+     endif()
+ 
+     if(sodium_USE_STATIC_LIBS)
+-        if (sodium_PKG_STATIC_LIBRARIES)
+-            foreach(_libname ${sodium_PKG_STATIC_LIBRARIES})
+-                if (NOT _libname MATCHES "^lib.*\\.a$") # ignore strings already ending with .a
+-                    list(INSERT sodium_PKG_STATIC_LIBRARIES 0 "lib${_libname}.a")
+-                endif()
+-            endforeach()
+-            list(REMOVE_DUPLICATES sodium_PKG_STATIC_LIBRARIES)
+-        else()
+-            # if pkgconfig for libsodium doesn't provide
+-            # static lib info, then override PKG_STATIC here..
++        foreach(_libname ${sodium_PKG_STATIC_LIBRARIES})
++            if (NOT _libname MATCHES "^lib.*\\.a$") # ignore strings already ending with .a
++                list(INSERT sodium_PKG_STATIC_LIBRARIES 0 "lib${_libname}.a")
++            endif()
++        endforeach()
++        list(REMOVE_DUPLICATES sodium_PKG_STATIC_LIBRARIES)
++
++        # if pkgconfig for libsodium doesn't provide
++        # static lib info, then override PKG_STATIC here..
++        if (NOT sodium_PKG_STATIC_FOUND)
+             set(sodium_PKG_STATIC_LIBRARIES libsodium.a)
+         endif()
+ 
+         set(XPREFIX sodium_PKG_STATIC)
+     else()
+-        if (sodium_PKG_LIBRARIES STREQUAL "")
++        if (NOT sodium_PKG_FOUND)
+             set(sodium_PKG_LIBRARIES sodium)
+         endif()
+ 
+@@ -101,7 +101,7 @@ elseif (WIN32)
+ 
+     if (MSVC)
+         # detect target architecture
+-        file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arch.c" [=[
++        file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arch.cpp" [=[
+             #if defined _M_IX86
+             #error ARCH_VALUE x86_32
+             #elif defined _M_X64
+@@ -109,7 +109,7 @@ elseif (WIN32)
+             #endif
+             #error ARCH_VALUE unknown
+         ]=])
+-        try_compile(_UNUSED_VAR "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/arch.c"
++        try_compile(_UNUSED_VAR "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/arch.cpp"
+             OUTPUT_VARIABLE _COMPILATION_LOG
+         )
+         string(REGEX REPLACE ".*ARCH_VALUE ([a-zA-Z0-9_]+).*" "\\1" _TARGET_ARCH "${_COMPILATION_LOG}")
+@@ -224,7 +224,8 @@ endif()
+ 
+ # communicate results
+ include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(sodium
++find_package_handle_standard_args(
++    Sodium # The name must be either uppercase or match the filename case.
+     REQUIRED_VARS
+         sodium_LIBRARY_RELEASE
+         sodium_LIBRARY_DEBUG
+@@ -233,6 +234,11 @@ find_package_handle_standard_args(sodium
+         sodium_VERSION
+ )
+ 
++if(Sodium_FOUND)
++    set(sodium_LIBRARIES
++        optimized ${sodium_LIBRARY_RELEASE} debug ${sodium_LIBRARY_DEBUG})
++endif()
++
+ # mark file paths as advanced
+ mark_as_advanced(sodium_INCLUDE_DIR)
+ mark_as_advanced(sodium_LIBRARY_DEBUG)


             reply	other threads:[~2019-09-03  7:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03  7:41 Lars Wendler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-04-11 19:24 [gentoo-commits] repo/gentoo:master commit in: games-engines/devilutionx/files/ Sam James
2022-06-30  2:47 Ionen Wolkens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1567496463.f61d1cc3832f22c056cf3d647ac165d06b2da2f2.polynomial-c@gentoo \
    --to=polynomial-c@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox