aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-01-02 08:50:50 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-01-02 08:50:50 +0000
commitb61058b92d402cf4d0b442736206f11eff9cb28c (patch)
treec4e6691ba8c91e89d9542234955e58442e9d0744
parenteb275884ad7ab102a4014d6d45d1a7eac646bbba (diff)
downloadaports-b61058b92d402cf4d0b442736206f11eff9cb28c.tar.bz2
aports-b61058b92d402cf4d0b442736206f11eff9cb28c.tar.xz
main/libssh: build fix. link to pthreads
-rw-r--r--main/libssh/APKBUILD8
-rw-r--r--main/libssh/link-pthread.patch63
2 files changed, 68 insertions, 3 deletions
diff --git a/main/libssh/APKBUILD b/main/libssh/APKBUILD
index 8f15a4e98f..20d86171b7 100644
--- a/main/libssh/APKBUILD
+++ b/main/libssh/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libssh
pkgver=0.5.2
-pkgrel=0
+pkgrel=1
pkgdesc="Library for accessing ssh client services through C libraries"
url="http://www.libssh.org/"
arch="all"
@@ -10,7 +10,8 @@ license="LGPL"
depends=
makedepends="openssl-dev cmake doxygen"
subpackages="$pkgname-dev"
-source="http://www.libssh.org/files/${pkgver%.*}/${pkgname}-${pkgver}.tar.gz"
+source="http://www.libssh.org/files/${pkgver%.*}/${pkgname}-${pkgver}.tar.gz
+ link-pthread.patch"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -41,4 +42,5 @@ package() {
make DESTDIR="$pkgdir" install
}
-md5sums="38b67c48af7a9204660a3e08f97ceba6 libssh-0.5.2.tar.gz"
+md5sums="38b67c48af7a9204660a3e08f97ceba6 libssh-0.5.2.tar.gz
+8d58b3391286de4dad3eb8a5b70171aa link-pthread.patch"
diff --git a/main/libssh/link-pthread.patch b/main/libssh/link-pthread.patch
new file mode 100644
index 0000000000..2e2c770f6a
--- /dev/null
+++ b/main/libssh/link-pthread.patch
@@ -0,0 +1,63 @@
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index aeff201..0191d5d 100644
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -13,36 +13,36 @@ include_directories(
+
+ if (LINUX)
+ add_executable(libssh_scp libssh_scp.c ${examples_SRCS})
+- target_link_libraries(libssh_scp ${LIBSSH_SHARED_LIBRARY})
++ target_link_libraries(libssh_scp ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ add_executable(scp_download scp_download.c ${examples_SRCS})
+- target_link_libraries(scp_download ${LIBSSH_SHARED_LIBRARY})
++ target_link_libraries(scp_download ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ add_executable(samplessh sample.c ${examples_SRCS})
+- target_link_libraries(samplessh ${LIBSSH_SHARED_LIBRARY})
++ target_link_libraries(samplessh ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ add_executable(sshnetcat sshnetcat.c ${examples_SRCS})
+- target_link_libraries(sshnetcat ${LIBSSH_SHARED_LIBRARY})
++ target_link_libraries(sshnetcat ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ if (WITH_SFTP)
+ add_executable(samplesftp samplesftp.c ${examples_SRCS})
+- target_link_libraries(samplesftp ${LIBSSH_SHARED_LIBRARY})
++ target_link_libraries(samplesftp ${LIBSSH_SHARED_LIBRARY} pthread)
+ endif (WITH_SFTP)
+
+ if (WITH_SERVER)
+ add_executable(samplesshd samplesshd.c)
+- target_link_libraries(samplesshd ${LIBSSH_SHARED_LIBRARY})
++ target_link_libraries(samplesshd ${LIBSSH_SHARED_LIBRARY} pthread)
+ endif (WITH_SERVER)
+ endif (LINUX)
+
+ add_executable(exec exec.c ${examples_SRCS})
+-target_link_libraries(exec ${LIBSSH_SHARED_LIBRARY})
++target_link_libraries(exec ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ add_executable(senddata senddata.c ${examples_SRCS})
+-target_link_libraries(senddata ${LIBSSH_SHARED_LIBRARY})
++target_link_libraries(senddata ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ add_executable(libsshpp libsshpp.cpp)
+-target_link_libraries(libsshpp ${LIBSSH_SHARED_LIBRARY})
++target_link_libraries(libsshpp ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ add_executable(libsshpp_noexcept libsshpp_noexcept.cpp)
+-target_link_libraries(libsshpp_noexcept ${LIBSSH_SHARED_LIBRARY})
++target_link_libraries(libsshpp_noexcept ${LIBSSH_SHARED_LIBRARY} pthread)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index e158665..ef2005d 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -40,6 +40,7 @@ if (HAVE_LIBSOCKET)
+ set(LIBSSH_LINK_LIBRARIES
+ ${LIBSSH_LINK_LIBRARIES}
+ socket
++ pthread
+ )
+ endif (HAVE_LIBSOCKET)
+