diff options
author | Gonzalo Exequiel Pedone | 2024-01-16 23:04:06 -0300 |
---|---|---|
committer | Gonzalo Exequiel Pedone | 2024-01-16 23:04:06 -0300 |
commit | f8b1ff37394cd2c9238c43838918f023a6b156d4 (patch) | |
tree | a8ae216914e83b8f0a441407f925097a991f8e42 | |
parent | fe214f321b15b08f6214997b2954d413bb5a3960 (diff) | |
download | aur-f8b1ff37394cd2c9238c43838918f023a6b156d4.tar.gz |
Fixed compile error.
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | 0001-Fix-static-lib.patch | 14 | ||||
-rw-r--r-- | 0002-Fix-missing-prototype-error.patch | 11 | ||||
-rw-r--r-- | PKGBUILD | 15 |
4 files changed, 38 insertions, 10 deletions
@@ -1,7 +1,7 @@ pkgbase = android-x86-libssh pkgdesc = Library for accessing ssh client services through C libraries (android) pkgver = 0.9.6 - pkgrel = 2 + pkgrel = 3 url = https://www.libssh.org/ arch = any groups = android-libssh @@ -16,8 +16,10 @@ pkgbase = android-x86-libssh options = staticlibs options = !emptydirs source = https://www.libssh.org/files/0.9/libssh-0.9.6.tar.xz - source = staticlibfix.patch + source = 0001-Fix-static-lib.patch + source = 0002-Fix-missing-prototype-error.patch md5sums = 0174df377361221a31a9576afbaba330 - md5sums = cb8d77a8779db385ac57f4d2c885a31b + md5sums = 66588a420aac9c580c31018a5b1c78cf + md5sums = 768b2bee29d9f55f09f74279ef06f48d pkgname = android-x86-libssh diff --git a/0001-Fix-static-lib.patch b/0001-Fix-static-lib.patch new file mode 100644 index 000000000000..adf0f1d67ed0 --- /dev/null +++ b/0001-Fix-static-lib.patch @@ -0,0 +1,14 @@ +diff -ruN libssh-0.9.2/src/CMakeLists.txt patched/src/CMakeLists.txt +--- a/src/CMakeLists.txt 2019-11-07 16:14:46.000000000 +0100 ++++ b/src/CMakeLists.txt 2019-12-05 17:35:42.941031097 +0100 +@@ -324,6 +324,10 @@ + + add_library(ssh::ssh ALIAS ssh) + ++if (WIN32 AND NOT BUILD_SHARED_LIBS) ++ set_target_properties(ssh PROPERTIES COMPILE_FLAGS "-DLIBSSH_STATIC") ++endif () ++ + if (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT) + if (ABIMAP_FOUND) + # Change path to devel map file diff --git a/0002-Fix-missing-prototype-error.patch b/0002-Fix-missing-prototype-error.patch new file mode 100644 index 000000000000..671d5f2bb0d0 --- /dev/null +++ b/0002-Fix-missing-prototype-error.patch @@ -0,0 +1,11 @@ +--- a/src/init.c 2021-03-15 04:11:33.000000000 -0300 ++++ b/src/init.c 2024-01-16 17:47:40.548501135 -0300 +@@ -269,7 +269,7 @@ + * + * @see ssh_init() + */ +-bool is_ssh_initialized() { ++bool is_ssh_initialized(void) { + + bool is_initialized = false; + @@ -11,7 +11,7 @@ _android_arch=x86 pkgname=android-${_android_arch}-libssh pkgver=0.9.6 -pkgrel=2 +pkgrel=3 arch=('any') pkgdesc="Library for accessing ssh client services through C libraries (android)" license=('LGPL') @@ -24,9 +24,12 @@ makedepends=('android-cmake' 'doxygen' 'python') source=("https://www.libssh.org/files/${pkgver%.*}/libssh-$pkgver.tar.xz" - 'staticlibfix.patch') + '0001-Fix-static-lib.patch' + '0002-Fix-missing-prototype-error.patch') + md5sums=('0174df377361221a31a9576afbaba330' - 'cb8d77a8779db385ac57f4d2c885a31b') + '66588a420aac9c580c31018a5b1c78cf' + '768b2bee29d9f55f09f74279ef06f48d') prepare() { cd "${srcdir}/libssh-${pkgver}" @@ -34,10 +37,8 @@ prepare() { # Disable automatic detection of openssl since it picks up openssl-1.0 sed 's/find_package(OpenSSL)/#find_package(OpenSSL)/' -i CMakeLists.txt - # Should be included in next release: - # https://bugs.libssh.org/T198 - # https://gitlab.com/libssh/libssh-mirror/merge_requests/73/diffs - patch -p1 -i ${srcdir}/staticlibfix.patch + patch -Np1 -i "../0001-Fix-static-lib.patch" + patch -Np1 -i "../0002-Fix-missing-prototype-error.patch" } build() { |