summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErvin Peters <coder@ervnet.de>2021-10-29 08:19:41 +0200
committerBernard Cafarelli <voyageur@gentoo.org>2021-11-04 22:37:33 +0100
commit2d6bab929a994134859507a76342809c72873ac9 (patch)
treeae6bcfeea294bfa6b51e7126f4047603cd3d3af0 /net-misc
parentwww-apps/element: 1.9.3 bump (diff)
downloadgentoo-2d6bab929a994134859507a76342809c72873ac9.tar.gz
gentoo-2d6bab929a994134859507a76342809c72873ac9.tar.bz2
gentoo-2d6bab929a994134859507a76342809c72873ac9.zip
net-misc/csync: fix libssh-version detection
Signed-off-by: Ervin Peters <coder@ervnet.de> Bug: https://bugs.gentoo.org/819945 Closes: https://bugs.gentoo.org/819945 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Closes: https://github.com/gentoo/gentoo/pull/22749 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/csync/csync-0.50.0-r2.ebuild49
-rw-r--r--net-misc/csync/files/csync-0.50.0-libssh-version.patch41
2 files changed, 90 insertions, 0 deletions
diff --git a/net-misc/csync/csync-0.50.0-r2.ebuild b/net-misc/csync/csync-0.50.0-r2.ebuild
new file mode 100644
index 000000000000..54a643702efa
--- /dev/null
+++ b/net-misc/csync/csync-0.50.0-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="lightweight file synchronizer utility"
+HOMEPAGE="https://www.csync.org/"
+SRC_URI="https://open.cryptomilk.org/attachments/download/27/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc iconv samba +sftp test"
+RESTRICT="!test? ( test )"
+
+RDEPEND=">=dev-db/sqlite-3.4:3
+ net-libs/neon[ssl]
+ iconv? ( virtual/libiconv )
+ samba? ( >=net-fs/samba-3.5 )
+ sftp? ( >=net-libs/libssh-0.5 )
+ !net-misc/ocsync"
+DEPEND="${RDEPEND}
+ app-text/asciidoc
+ doc? ( app-doc/doxygen )
+ test? ( dev-util/cmocka )"
+
+PATCHES=( "${FILESDIR}"/${P}-gcc_5_and_8.patch
+ "${FILESDIR}"/${P}-libssh-version.patch )
+src_prepare() {
+ cmake_src_prepare
+
+ # proper docdir
+ sed -e "s:/doc/${PN}:/doc/${PF}:" \
+ -i doc/CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc
+ -DWITH_ICONV="$(usex iconv)"
+ -DUNIT_TESTING="$(usex test)"
+ $(cmake_use_find_package doc Doxygen)
+ $(cmake_use_find_package samba SMBClient)
+ $(cmake_use_find_package sftp LibSSH)
+ )
+ cmake_src_configure
+}
diff --git a/net-misc/csync/files/csync-0.50.0-libssh-version.patch b/net-misc/csync/files/csync-0.50.0-libssh-version.patch
new file mode 100644
index 000000000000..77ce1cdafa14
--- /dev/null
+++ b/net-misc/csync/files/csync-0.50.0-libssh-version.patch
@@ -0,0 +1,41 @@
+Index: csync-0.50.0/cmake/Modules/FindLibSSH.cmake
+===================================================================
+--- csync-0.50.0.orig/cmake/Modules/FindLibSSH.cmake
++++ csync-0.50.0/cmake/Modules/FindLibSSH.cmake
+@@ -20,7 +20,7 @@ else (LIBSSH_LIBRARIES AND LIBSSH_INCLUD
+
+ find_path(LIBSSH_INCLUDE_DIR
+ NAMES
+- libssh/libssh.h
++ libssh/libssh_version.h
+ PATHS
+ /usr/include
+ /usr/local/include
+@@ -58,15 +58,15 @@ else (LIBSSH_LIBRARIES AND LIBSSH_INCLUD
+ )
+
+ if (LibSSH_FIND_VERSION)
+- file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MAJOR
++ file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h LIBSSH_VERSION_MAJOR
+ REGEX "#define[ ]+LIBSSH_VERSION_MAJOR[ ]+[0-9]+")
+ # Older versions of libssh like libssh-0.2 have LIBSSH_VERSION but not LIBSSH_VERSION_MAJOR
+ if (LIBSSH_VERSION_MAJOR)
+ string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MAJOR ${LIBSSH_VERSION_MAJOR})
+- file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_MINOR
++ file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h LIBSSH_VERSION_MINOR
+ REGEX "#define[ ]+LIBSSH_VERSION_MINOR[ ]+[0-9]+")
+ string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_MINOR ${LIBSSH_VERSION_MINOR})
+- file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h LIBSSH_VERSION_PATCH
++ file(STRINGS ${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h LIBSSH_VERSION_PATCH
+ REGEX "#define[ ]+LIBSSH_VERSION_MICRO[ ]+[0-9]+")
+ string(REGEX MATCH "[0-9]+" LIBSSH_VERSION_PATCH ${LIBSSH_VERSION_PATCH})
+
+@@ -75,7 +75,7 @@ else (LIBSSH_LIBRARIES AND LIBSSH_INCLUD
+ include(FindPackageVersionCheck)
+ find_package_version_check(LibSSH DEFAULT_MSG)
+ else (LIBSSH_VERSION_MAJOR)
+- message(STATUS "LIBSSH_VERSION_MAJOR not found in ${LIBSSH_INCLUDE_DIR}/libssh/libssh.h, assuming libssh is too old")
++ message(STATUS "LIBSSH_VERSION_MAJOR not found in ${LIBSSH_INCLUDE_DIR}/libssh/libssh_version.h, assuming libssh is too old")
+ set(LIBSSH_FOUND FALSE)
+ endif (LIBSSH_VERSION_MAJOR)
+ endif (LibSSH_FIND_VERSION) \ No newline at end of file