aboutsummaryrefslogtreecommitdiff
path: root/security/libssh
diff options
context:
space:
mode:
authorAlexander Logvinov <avl@FreeBSD.org>2010-12-05 06:02:49 +0000
committerAlexander Logvinov <avl@FreeBSD.org>2010-12-05 06:02:49 +0000
commit515ad9a3e647ae4b348fa3790a573c9fc57acaa8 (patch)
treeddb78912b9925efc50b2dc768bd0330948b9c049 /security/libssh
parentba25a3ddf74a4efb013e1eb3534219c840f35a20 (diff)
downloadports-515ad9a3e647ae4b348fa3790a573c9fc57acaa8.tar.gz
ports-515ad9a3e647ae4b348fa3790a573c9fc57acaa8.zip
Notes
Diffstat (limited to 'security/libssh')
-rw-r--r--security/libssh/Makefile4
-rw-r--r--security/libssh/distinfo1
-rw-r--r--security/libssh/files/patch-include_libssh_libssh.h21
-rw-r--r--security/libssh/files/patch-libssh_socket.c14
-rw-r--r--security/libssh/pkg-plist1
5 files changed, 40 insertions, 1 deletions
diff --git a/security/libssh/Makefile b/security/libssh/Makefile
index 6e66e201c295..998eadc8c3be 100644
--- a/security/libssh/Makefile
+++ b/security/libssh/Makefile
@@ -7,6 +7,7 @@
PORTNAME= libssh
PORTVERSION= 0.4.6
+PORTREVISION= 1
CATEGORIES= security devel
MASTER_SITES= http://www.libssh.org/files/ \
LOCAL/avl
@@ -23,6 +24,7 @@ CMAKE_SOURCE_PATH= ${WRKSRC}
CONFIGURE_WRKSRC= ${CMAKE_SOURCE_PATH}/build
BUILD_WRKSRC= ${CONFIGURE_WRKSRC}
INSTALL_WRKSRC?= ${BUILD_WRKSRC}
+CMAKE_ARGS+= -DWITH_STATIC_LIB:BOOL=ON
USE_LDCONFIG= yes
LICENSE= GPLv2 BSD
@@ -52,5 +54,7 @@ post-patch:
@${RM} ${PATCH_WRKSRC}/cmake/Modules/UseDoxygen.cmake
@${REINPLACE_CMD} -e '/add_subdirectory.*s)/d' \
${PATCH_WRKSRC}/CMakeLists.txt
+ @${REINPLACE_CMD} -e 's|ssh_static|ssh|' \
+ ${PATCH_WRKSRC}/libssh/CMakeLists.txt
.include <bsd.port.mk>
diff --git a/security/libssh/distinfo b/security/libssh/distinfo
index 92b82ac7ea9d..d6ba04a23c46 100644
--- a/security/libssh/distinfo
+++ b/security/libssh/distinfo
@@ -1,3 +1,2 @@
-MD5 (libssh-0.4.6.tar.gz) = 9efdc8911fdb150fb16500c2fbe4ef2e
SHA256 (libssh-0.4.6.tar.gz) = 17ef7bacb3c6c53e67c12767266e4826c6a594452a1a6fd13394f14a67f26988
SIZE (libssh-0.4.6.tar.gz) = 276843
diff --git a/security/libssh/files/patch-include_libssh_libssh.h b/security/libssh/files/patch-include_libssh_libssh.h
new file mode 100644
index 000000000000..aafe9ff41c6f
--- /dev/null
+++ b/security/libssh/files/patch-include_libssh_libssh.h
@@ -0,0 +1,21 @@
+--- include/libssh/libssh.h.orig 2010-10-31 18:16:26.000000000 +0900
++++ include/libssh/libssh.h 2010-10-31 18:16:41.000000000 +0900
+@@ -22,9 +22,6 @@
+ #ifndef _LIBSSH_H
+ #define _LIBSSH_H
+
+-#ifdef LIBSSH_STATIC
+- #define LIBSSH_API
+-#else
+ #if defined _WIN32 || defined __CYGWIN__
+ #ifdef LIBSSH_EXPORTS
+ #ifdef __GNUC__
+@@ -46,7 +43,6 @@
+ #define LIBSSH_API
+ #endif
+ #endif
+-#endif
+
+ #ifdef _MSC_VER
+ /* Visual Studio hasn't inttypes.h so it doesn't know uint32_t */
+
diff --git a/security/libssh/files/patch-libssh_socket.c b/security/libssh/files/patch-libssh_socket.c
new file mode 100644
index 000000000000..5eebace16b0b
--- /dev/null
+++ b/security/libssh/files/patch-libssh_socket.c
@@ -0,0 +1,14 @@
+--- libssh/socket.c.orig 2010-09-06 03:29:26.000000000 +1000
++++ libssh/socket.c 2010-12-05 14:25:26.000000000 +0900
+@@ -265,7 +265,10 @@
+ if (s->fd == SSH_INVALID_SOCKET)
+ return;
+ FD_SET(s->fd,set);
+- if (s->fd >= 0 && s->fd != SSH_INVALID_SOCKET) {
++
++ if (s->fd >= 0 &&
++ s->fd >= *max_fd &&
++ s->fd != SSH_INVALID_SOCKET) {
+ *max_fd = s->fd + 1;
+ }
+ }
diff --git a/security/libssh/pkg-plist b/security/libssh/pkg-plist
index 8a275d03c2be..8ad2032358d5 100644
--- a/security/libssh/pkg-plist
+++ b/security/libssh/pkg-plist
@@ -4,6 +4,7 @@ include/libssh/server.h
include/libssh/sftp.h
%%SSH1%%include/libssh/ssh1.h
include/libssh/ssh2.h
+lib/libssh.a
lib/libssh.so
lib/libssh.so.4
lib/libssh.so.4.1.3