Merge pull request #36281 from jonafato/keepassxc-2.3.0

keepassxc: 2.2.4 -> 2.3.0
This commit is contained in:
Jörg Thalheim 2018-03-04 12:32:42 +00:00 committed by GitHub
commit bcb5271813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 60 additions and 40 deletions

View File

@ -1,18 +0,0 @@
Fix "No known features for CXX compiler", see
https://cmake.org/pipermail/cmake/2016-December/064733.html and the note at
https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,10 +20,10 @@ if(NOT CMAKE_BUILD_TYPE)
FORCE)
endif()
-project(KeePassXC)
-
cmake_minimum_required(VERSION 3.1.0)
+project(KeePassXC)
+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# Support Visual Studio Code

View File

@ -1,28 +1,51 @@
{ stdenv, fetchFromGitHub, cmake, makeWrapper, qttools
, libgcrypt, zlib, libmicrohttpd, libXtst, qtbase, libgpgerror, glibcLocales, libyubikey, yubikey-personalization, libXi, qtx11extras
, withKeePassHTTP ? true
, curl
, libargon2
, libgcrypt
, libsodium
, zlib
, libmicrohttpd
, libXtst
, qtbase
, libgpgerror
, glibcLocales
, libyubikey
, yubikey-personalization
, libXi
, qtx11extras
, withKeePassBrowser ? true
, withKeePassHTTP ? false
, withKeePassNetworking ? false
, withKeePassSSHAgent ? false
}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "keepassxc-${version}";
version = "2.2.4";
version = "2.3.0";
src = fetchFromGitHub {
owner = "keepassxreboot";
repo = "keepassxc";
rev = "${version}";
sha256 = "0q913v2ka6p7jr7c4w9fq8aqh5v6nxqgcv9h7zllk5p0amsf8d80";
sha256 = "1zch1qbqgphhp2p2kvjlah8s337162m69yf4y00kcnfb3539ii5f";
};
patches = [ ./cmake.patch ./darwin.patch ];
patches = [ ./darwin.patch ];
cmakeFlags = [
"-DKEEPASSXC_BUILD_TYPE=Release"
"-DWITH_GUI_TESTS=ON"
"-DWITH_XC_AUTOTYPE=ON"
"-DWITH_XC_YUBIKEY=ON"
] ++ (optional withKeePassHTTP "-DWITH_XC_HTTP=ON");
]
++ (optional withKeePassBrowser "-DWITH_XC_BROWSER=ON")
++ (optional withKeePassHTTP "-DWITH_XC_HTTP=ON")
++ (optional withKeePassNetworking "-DWITH_XC_NETWORKING=ON")
++ (optional withKeePassSSHAgent "-DWITH_XC_SSHAGENT=ON");
doCheck = true;
checkPhase = ''
@ -32,7 +55,22 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake makeWrapper qttools ];
buildInputs = [ libgcrypt zlib qtbase libXtst libmicrohttpd libgpgerror glibcLocales libyubikey yubikey-personalization libXi qtx11extras ];
buildInputs = [
curl
glibcLocales
libXi
libXtst
libargon2
libgcrypt
libgpgerror
libmicrohttpd
libsodium
libyubikey
qtbase
qtx11extras
yubikey-personalization
zlib
];
postInstall = optionalString stdenv.isDarwin ''
# Make it work without Qt in PATH.

View File

@ -2,7 +2,7 @@ Remove the use of macdeployqt to avoid copying dependencies and
reduce installation size from 90 MB to 9 MB.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -188,8 +188,8 @@ else()
@@ -250,8 +250,8 @@ else()
set(PROGNAME keepassxc)
endif()
@ -10,43 +10,43 @@ reduce installation size from 90 MB to 9 MB.
- set(CMAKE_INSTALL_PREFIX "/Applications")
+if(APPLE AND WITH_APP_BUNDLE)
+ set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/Applications")
set(CMAKE_INSTALL_MANDIR "/usr/local/share/man")
endif()
if(MINGW)
@@ -198,7 +198,7 @@ if(MINGW)
@@ -262,7 +262,7 @@ if(MINGW)
set(PLUGIN_INSTALL_DIR ".")
set(DATA_INSTALL_DIR "share")
elseif(APPLE AND WITH_APP_BUNDLE)
- set(CLI_INSTALL_DIR "/usr/local/bin")
+ set(CLI_INSTALL_DIR "../bin")
set(PROXY_INSTALL_DIR "/usr/local/bin")
set(BIN_INSTALL_DIR ".")
set(PLUGIN_INSTALL_DIR "${PROGNAME}.app/Contents/PlugIns")
set(DATA_INSTALL_DIR "${PROGNAME}.app/Contents/Resources")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5255186..0175983 100644
index 69526967..38f7c5d4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -282,11 +282,6 @@ if(APPLE AND WITH_APP_BUNDLE)
if(NOT DEFINED QT_BINARY_DIR)
set(QT_BINARY_DIR "/usr/local/opt/qt5/bin" CACHE PATH "QT binary folder")
endif()
@@ -319,11 +319,6 @@ if(APPLE AND WITH_APP_BUNDLE)
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}")
include(CPack)
- add_custom_command(TARGET ${PROGNAME}
- POST_BUILD
- COMMAND ${QT_BINARY_DIR}/macdeployqt ${PROGNAME}.app
- COMMAND ${MACDEPLOYQT_EXE} ${PROGNAME}.app
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
- COMMENT "Deploying app bundle")
endif()
if(MINGW)
install(TARGETS ${PROGNAME}
diff --git a/src/autotype/mac/CMakeLists.txt b/src/autotype/mac/CMakeLists.txt
index ac93de0..03d502e 100644
index 08c53278..b833b692 100644
--- a/src/autotype/mac/CMakeLists.txt
+++ b/src/autotype/mac/CMakeLists.txt
@@ -16,7 +16,6 @@ if(WITH_APP_BUNDLE)
@@ -14,7 +14,6 @@ if(WITH_APP_BUNDLE)
add_custom_command(TARGET keepassx-autotype-cocoa
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libkeepassx-autotype-cocoa.so ${PLUGIN_INSTALL_DIR}
- COMMAND ${QT_BINARY_DIR}/macdeployqt ${PROGNAME}.app -executable=${PLUGIN_INSTALL_DIR}/libkeepassx-autotype-cocoa.so -no-plugins
- COMMAND ${MACDEPLOYQT_EXE} ${PROGNAME}.app -executable=${PLUGIN_INSTALL_DIR}/libkeepassx-autotype-cocoa.so -no-plugins
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
COMMENT "Deploying autotype plugin")
else()

View File

@ -36,6 +36,6 @@ stdenv.mkDerivation rec {
homepage = https://www.argon2.com/;
license = with licenses; [ asl20 cc0 ];
maintainers = with maintainers; [ taeer olynch ];
platforms = platforms.linux;
platforms = platforms.linux ++ platforms.darwin;
};
}