summaryrefslogtreecommitdiff
path: root/package/libssh
diff options
context:
space:
mode:
Diffstat (limited to 'package/libssh')
-rw-r--r--package/libssh/Makefile37
-rw-r--r--package/libssh/patches/patch-cmake_Modules_DefineCompilerFlags_cmake14
2 files changed, 51 insertions, 0 deletions
diff --git a/package/libssh/Makefile b/package/libssh/Makefile
new file mode 100644
index 000000000..8d7b455fb
--- /dev/null
+++ b/package/libssh/Makefile
@@ -0,0 +1,37 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= libssh
+PKG_VERSION:= 0.5.3
+PKG_RELEASE:= 3
+PKG_MD5SUM:= 9ad01838d3b89d98e900e0f6260a88cc
+PKG_DESCR:= SSH library
+PKG_SECTION:= libs
+PKG_DEPENDS:= libopenssl zlib
+PKG_BUILDDEP:= openssl zlib
+PKG_URL:= http://www.libssh.org/
+PKG_SITES:= http://www.libssh.org/files/0.5/
+PKG_OPTS:= dev
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,LIBSSH,libssh,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+
+WRKBUILD= ${WRKDIR}/${PKG_NAME}-obj
+CONFIG_STYLE:= manual
+
+do-configure:
+ (cd $(WRKBUILD) && PATH='${TARGET_PATH}' \
+ cmake -DCMAKE_SYSTEM_NAME=Linux \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DOPENSSL_ROOT_DIR='$(STAGING_TARGET_DIR)/usr' \
+ -DZLIB_ROOT_DIR='$(STAGING_TARGET_DIR)/usr' $(WRKSRC)/)
+
+libssh-install:
+ $(INSTALL_DIR) $(IDIR_LIBSSH)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/libssh*.so* \
+ $(IDIR_LIBSSH)/usr/lib
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/libssh/patches/patch-cmake_Modules_DefineCompilerFlags_cmake b/package/libssh/patches/patch-cmake_Modules_DefineCompilerFlags_cmake
new file mode 100644
index 000000000..a67998250
--- /dev/null
+++ b/package/libssh/patches/patch-cmake_Modules_DefineCompilerFlags_cmake
@@ -0,0 +1,14 @@
+--- libssh-0.5.3.orig/cmake/Modules/DefineCompilerFlags.cmake 2012-11-20 12:41:49.000000000 +0100
++++ libssh-0.5.3/cmake/Modules/DefineCompilerFlags.cmake 2013-12-17 13:20:04.073723090 +0100
+@@ -20,11 +20,6 @@ if (UNIX AND NOT WIN32)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+ endif (WITH_FPIC)
+
+- check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR)
+- if (WITH_STACK_PROTECTOR)
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
+- endif (WITH_STACK_PROTECTOR)
+-
+ check_c_compiler_flag("-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
+ if (WITH_FORTIFY_SOURCE)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")