From f4df2160c9329b300095c603927901f445fb0d12 Mon Sep 17 00:00:00 2001 From: Robert Schütz Date: Sun, 1 May 2022 06:25:23 +0000 Subject: libdeltachat: 1.77.0 -> 1.78.0 https://github.com/deltachat/deltachat-core-rust/blob/1.78.0/CHANGELOG.md --- .../deltachat-desktop/default.nix | 1 + .../libdeltachat-darwin-dylib.patch | 53 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 pkgs/applications/networking/instant-messengers/deltachat-desktop/libdeltachat-darwin-dylib.patch (limited to 'pkgs/applications/networking/instant-messengers/deltachat-desktop') diff --git a/pkgs/applications/networking/instant-messengers/deltachat-desktop/default.nix b/pkgs/applications/networking/instant-messengers/deltachat-desktop/default.nix index 266f3958adfd8..009ece90b4c69 100644 --- a/pkgs/applications/networking/instant-messengers/deltachat-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/deltachat-desktop/default.nix @@ -31,6 +31,7 @@ let name = "${old.pname}-${version}"; hash = "sha256-sBFXcLXpAkX+HzRKrLKaHhi5ieS8Yc/Uf30WcXyWrok="; }; + patches = [ ./libdeltachat-darwin-dylib.patch ] ++ old.patches; }); electronExec = if stdenv.isDarwin then "${electron_16}/Applications/Electron.app/Contents/MacOS/Electron" diff --git a/pkgs/applications/networking/instant-messengers/deltachat-desktop/libdeltachat-darwin-dylib.patch b/pkgs/applications/networking/instant-messengers/deltachat-desktop/libdeltachat-darwin-dylib.patch new file mode 100644 index 0000000000000..caa44a62a062d --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/deltachat-desktop/libdeltachat-darwin-dylib.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5ed8020c..44ca43e7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,12 +2,20 @@ cmake_minimum_required(VERSION 3.16) + project(deltachat LANGUAGES C) + include(GNUInstallDirs) + ++if(APPLE) ++ set(DYNAMIC_EXT "dylib") ++elseif(UNIX) ++ set(DYNAMIC_EXT "so") ++else() ++ set(DYNAMIC_EXT "dll") ++endif() ++ + find_program(CARGO cargo) + + add_custom_command( + OUTPUT + "target/release/libdeltachat.a" +- "target/release/libdeltachat.so" ++ "target/release/libdeltachat.${DYNAMIC_EXT}" + "target/release/pkgconfig/deltachat.pc" + COMMAND + PREFIX=${CMAKE_INSTALL_PREFIX} +@@ -32,11 +40,11 @@ add_custom_target( + ALL + DEPENDS + "target/release/libdeltachat.a" +- "target/release/libdeltachat.so" ++ "target/release/libdeltachat.${DYNAMIC_EXT}" + "target/release/pkgconfig/deltachat.pc" + ) + + install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-install(FILES "target/release/libdeltachat.so" DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(FILES "target/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) +diff --git a/python/install_python_bindings.py b/python/install_python_bindings.py +index c8ed43e2..714c7e30 100755 +--- a/python/install_python_bindings.py ++++ b/python/install_python_bindings.py +@@ -24,7 +24,7 @@ + + print("running:", " ".join(cmd)) + subprocess.check_call(cmd) +- subprocess.check_call("rm -rf build/ src/deltachat/*.so" , shell=True) ++ subprocess.check_call("rm -rf build/ src/deltachat/*.so src/deltachat/*.dylib" , shell=True) + + if len(sys.argv) <= 1 or sys.argv[1] != "onlybuild": + subprocess.check_call([ -- cgit 1.4.1