aboutsummaryrefslogtreecommitdiffstats
path: root/security/libssh
diff options
context:
space:
mode:
authorfluffy <fluffy@FreeBSD.org>2014-01-16 11:27:31 +0800
committerfluffy <fluffy@FreeBSD.org>2014-01-16 11:27:31 +0800
commitcb8d779b10af6e1e30d7b5702e5d26a01a864d71 (patch)
tree565c2bbd07c60762797a17d08e31f0628f26749c /security/libssh
parent52b3d5289ca9eaefafcbbafeb52a0cf3fb52d0b1 (diff)
downloadfreebsd-ports-gnome-cb8d779b10af6e1e30d7b5702e5d26a01a864d71.tar.gz
freebsd-ports-gnome-cb8d779b10af6e1e30d7b5702e5d26a01a864d71.tar.zst
freebsd-ports-gnome-cb8d779b10af6e1e30d7b5702e5d26a01a864d71.zip
- Update libssh to 0.6.0 security release
- Fix threaded library [1] Submitted by: rakuco@ via libssh mailing list [1]
Diffstat (limited to 'security/libssh')
-rw-r--r--security/libssh/Makefile48
-rw-r--r--security/libssh/distinfo4
-rw-r--r--security/libssh/files/patch-ConfigureChecks.cmake18
-rw-r--r--security/libssh/files/patch-src__threads__CMakeLists.txt39
-rw-r--r--security/libssh/pkg-plist7
5 files changed, 90 insertions, 26 deletions
diff --git a/security/libssh/Makefile b/security/libssh/Makefile
index 1e7d878dbf98..d6feaabc938f 100644
--- a/security/libssh/Makefile
+++ b/security/libssh/Makefile
@@ -2,19 +2,21 @@
# $FreeBSD$
PORTNAME= libssh
-DISTVERSION= 0.5.5
-PORTREVISION= 1
+DISTVERSION= 0.6.0
CATEGORIES= security devel
-MASTER_SITES= https://red.libssh.org/attachments/download/51/ \
+MASTER_SITES= http://git.libssh.org/projects/libssh.git/snapshot/ \
LOCAL/fluffy
MAINTAINER= fluffy@FreeBSD.org
COMMENT= Library implementing the SSH1 and SSH2 protocol
-OPTIONS_DEFINE= GCRYPT SSH1
-GCRYPT_DESC= Build with libgcrypt
-SSH1_DESC= Build with SSH1 support
+OPTIONS_DEFINE= SSH1
+OPTIONS_RADIO= CRYPTO
+OPTIONS_RADIO_CRYPTO= GCRYPT OPENSSL
+OPTIONS_DEFAULT= OPENSSL
+OPTIONS_SUB= yes
+USE_BZIP2= yes
USES= cmake
CMAKE_SOURCE_PATH= ${WRKSRC}
CONFIGURE_WRKSRC= ${CMAKE_SOURCE_PATH}/build
@@ -26,29 +28,31 @@ USE_LDCONFIG= yes
LICENSE= LGPL21
LICENSE_FILE= ${WRKSRC}/COPYING
-.include <bsd.port.options.mk>
+GCRYPT_LIB_DEPENDS= libgcrypt.so:${PORTSDIR}/security/libgcrypt
+GCRYPT_CMAKE_ON= -DWITH_GCRYPT:BOOL=ON
+GCRYPT_CMAKE_OFF= -DWITH_GCRYPT:BOOL=OFF
+
+OPENSSL_USE= openssl=yes
+OPENSSL_CMAKE_ON= -DWITH_OPENSSL:BOOL=ON
+OPENSSL_CMAKE_OFF= -DWITH_OPENSSL:BOOL=OFF
-.if ${PORT_OPTIONS:MGCRYPT}
-LIB_DEPENDS+= libgcrypt.so:${PORTSDIR}/security/libgcrypt
-CMAKE_ARGS+= -DWITH_GCRYPT:BOOL=ON
-.else
-USE_OPENSSL= yes
-.endif
-
-.if ${PORT_OPTIONS:MSSH1}
-CMAKE_ARGS+= -DWITH_SSH1:BOOL=ON
-PLIST_SUB+= SSH1=""
-.else
-CMAKE_ARGS+= -DWITH_SSH1:BOOL=OFF
-PLIST_SUB+= SSH1="@comment "
-.endif
+SSH1_DESC= Build with SSH1 support
+SSH1_CMAKE_ON= -DWITH_SSH1:BOOL=ON
+SSH1_CMAKE_OFF= -DWITH_SSH1:BOOL=OFF
+
+.include <bsd.port.options.mk>
post-patch:
@${RM} ${PATCH_WRKSRC}/cmake/Modules/UseDoxygen.cmake
@${REINPLACE_CMD} -e '/add_subdirectory.*s)/d' \
-e 's|LIB_INSTALL_DIR}|CMAKE_INSTALL_PREFIX}/libdata|' \
+ -e 's|CMAKE_INSTALL_DIR}|CMAKE_INSTALL_DIR}/libssh|' \
${PATCH_WRKSRC}/CMakeLists.txt
- @${REINPLACE_CMD} -e '/CMAKE_HAVE_THREADS_LIBRARY/d' \
+ @${REINPLACE_CMD} -e 's|CMAKE_HAVE_THREADS_LIBRARY|CMAKE_USE_PTHREADS_INIT|' \
+ ${PATCH_WRKSRC}/src/threads/CMakeLists.txt \
${PATCH_WRKSRC}/src/CMakeLists.txt
+ @${REINPLACE_CMD} -e 's|-lssh_threads|-lssh_threads ${PTHREAD_LIBS}|' \
+ -e 's|$${INCLUDE_INSTALL_DIR}|$${INCLUDE_INSTALL_DIR} ${PTHREAD_CFLAGS}|' \
+ ${PATCH_WRKSRC}/libssh_threads.pc.cmake
.include <bsd.port.mk>
diff --git a/security/libssh/distinfo b/security/libssh/distinfo
index d63c3f331ece..ef8e653bd8a6 100644
--- a/security/libssh/distinfo
+++ b/security/libssh/distinfo
@@ -1,2 +1,2 @@
-SHA256 (libssh-0.5.5.tar.gz) = c0df0f05fc812dbe26fd4118bec0776aa9e892c0719590f3971130489c6b8e9d
-SIZE (libssh-0.5.5.tar.gz) = 321583
+SHA256 (libssh-0.6.0.tar.bz2) = c7affc1d94529a5251f52a5b8076eb3b542d5fbba87da109ddef796de1df0d29
+SIZE (libssh-0.6.0.tar.bz2) = 293784
diff --git a/security/libssh/files/patch-ConfigureChecks.cmake b/security/libssh/files/patch-ConfigureChecks.cmake
new file mode 100644
index 000000000000..75fca357ecfb
--- /dev/null
+++ b/security/libssh/files/patch-ConfigureChecks.cmake
@@ -0,0 +1,18 @@
+--- ./ConfigureChecks.cmake
++++ ./ConfigureChecks.cmake
+@@ -169,11 +169,9 @@ if (GCRYPT_FOUND)
+ endif (GCRYPT_VERSION VERSION_GREATER "1.4.6")
+ endif (GCRYPT_FOUND)
+
+-if (CMAKE_HAVE_THREADS_LIBRARY)
+- if (CMAKE_USE_PTHREADS_INIT)
+- set(HAVE_PTHREAD 1)
+- endif (CMAKE_USE_PTHREADS_INIT)
+-endif (CMAKE_HAVE_THREADS_LIBRARY)
++if (CMAKE_USE_PTHREADS_INIT)
++ set(HAVE_PTHREAD 1)
++endif (CMAKE_USE_PTHREADS_INIT)
+
+ # OPTIONS
+ check_c_source_compiles("
+
diff --git a/security/libssh/files/patch-src__threads__CMakeLists.txt b/security/libssh/files/patch-src__threads__CMakeLists.txt
new file mode 100644
index 000000000000..5250a19396c1
--- /dev/null
+++ b/security/libssh/files/patch-src__threads__CMakeLists.txt
@@ -0,0 +1,39 @@
+--- ./src/threads/CMakeLists.txt
++++ ./src/threads/CMakeLists.txt
+@@ -24,30 +24,12 @@ if (WITH_STATIC_LIB)
+ endif (WITH_STATIC_LIB)
+
+ set(LIBSSH_THREADS_LINK_LIBRARIES
+- ${LIBSSH_SHARED_LIBRARY}
+-)
+-
+-set(libssh_threads_SRCS
+-)
+-
+-# build and link pthread
+-if (CMAKE_USE_PTHREADS_INIT)
+- set(libssh_threads_SRCS
+- ${libssh_threads_SRCS}
+- pthread.c
+- )
+-
+- set(LIBSSH_THREADS_LINK_LIBRARIES
+- ${LIBSSH_THREADS_LINK_LIBRARIES}
+- ${CMAKE_THREAD_LIBS_INIT}
+- )
+-endif (CMAKE_USE_PTHREADS_INIT)
+-
+-set(LIBSSH_THREADS_LINK_LIBRARIES
+- ${LIBSSH_THREADS_LINK_LIBRARIES}
++ ${LIBSSH_SHARED_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}
+ CACHE INTERNAL "libssh threads link libraries"
+ )
+
++set(libssh_threads_SRCS pthread.c)
++
+ include_directories(
+ ${LIBSSH_THREADS_PUBLIC_INCLUDE_DIRS}
+ ${LIBSSH_THREADS_PRIVATE_INCLUDE_DIRS}
+
+
+
diff --git a/security/libssh/pkg-plist b/security/libssh/pkg-plist
index e547910c3183..57d883c89dc5 100644
--- a/security/libssh/pkg-plist
+++ b/security/libssh/pkg-plist
@@ -5,14 +5,17 @@ include/libssh/server.h
include/libssh/sftp.h
%%SSH1%%include/libssh/ssh1.h
include/libssh/ssh2.h
+lib/cmake/libssh/libssh-config.cmake
+lib/cmake/libssh/libssh-config-version.cmake
lib/libssh.a
lib/libssh.so
lib/libssh.so.4
-lib/libssh.so.4.2.5
+lib/libssh.so.4.3.0
lib/libssh_threads.a
lib/libssh_threads.so
lib/libssh_threads.so.4
-lib/libssh_threads.so.4.2.5
+lib/libssh_threads.so.4.3.0
libdata/pkgconfig/libssh.pc
libdata/pkgconfig/libssh_threads.pc
+@dirrm lib/cmake/libssh
@dirrm include/libssh