libdeltachat: 1.60.0 -> 1.63.0

This commit is contained in:
Robert Schütz 2021-11-07 14:25:23 -08:00
parent 424d276cb7
commit c571aa7642
3 changed files with 61 additions and 18 deletions

View file

@ -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([

View file

@ -1,7 +1,6 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, openssl
, perl
@ -16,33 +15,25 @@
stdenv.mkDerivation rec {
pname = "libdeltachat";
version = "1.60.0";
version = "1.63.0";
src = fetchFromGitHub {
owner = "deltachat";
repo = "deltachat-core-rust";
rev = version;
sha256 = "1agm5xyaib4ynmw4mhgmkhh4lnxs91wv0q9i1zfihv2vkckfm2s2";
sha256 = "1511jh38h7nmn4dpyi1vfxvhybcacc6gavwfifxvb5npirphziga";
};
patches = [
# https://github.com/deltachat/deltachat-core-rust/pull/2589
(fetchpatch {
url = "https://github.com/deltachat/deltachat-core-rust/commit/408467e85d04fbbfd6bed5908d84d9e995943487.patch";
sha256 = "1j2ywaazglgl6370js34acrg0wrh0b7krqg05dfjf65n527lzn59";
})
./darwin-dylib.patch
./no-static-lib.patch
# https://github.com/deltachat/deltachat-core-rust/pull/2660
(fetchpatch {
url = "https://github.com/deltachat/deltachat-core-rust/commit/8fb5e038a97d8ae68564c885d61b93127a68366d.patch";
sha256 = "088pzfrrkgfi4646dc72404s3kykcpni7hgkppalwlzg0p4is41x";
})
];
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
sha256 = "09d3mw2hb1gmqg7smaqwnfm7izw40znl0h1dz7s2imms2cnkjws1";
sha256 = "0hfp2k84mvq11h7q96hkcj3k6f3sxw8wx89acg4hy6lbh8xpy6ai";
};
nativeBuildInputs = [

View file

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fe7abe08..acdbe0d6 100644
index 44ca43e7..8b6960dd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,6 @@ find_program(CARGO cargo)
@@ -14,7 +14,6 @@ find_program(CARGO cargo)
add_custom_command(
OUTPUT
@ -10,7 +10,7 @@ index fe7abe08..acdbe0d6 100644
"target/release/libdeltachat.${DYNAMIC_EXT}"
"target/release/pkgconfig/deltachat.pc"
COMMAND
@@ -38,13 +37,11 @@ add_custom_target(
@@ -39,12 +38,10 @@ add_custom_target(
lib_deltachat
ALL
DEPENDS
@ -19,13 +19,12 @@ index fe7abe08..acdbe0d6 100644
"target/release/pkgconfig/deltachat.pc"
)
include(GNUInstallDirs)
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.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
diff --git a/deltachat-ffi/Cargo.toml b/deltachat-ffi/Cargo.toml
index a34a27ba..cf354abb 100644
index de0fbafe..120efec9 100644
--- a/deltachat-ffi/Cargo.toml
+++ b/deltachat-ffi/Cargo.toml
@@ -12,7 +12,7 @@ categories = ["cryptography", "std", "email"]