changeset 2020:d8e7b20c4451

new package: libssh2
author Paul Crown <develop@computerdataprocessors.com>
date Fri, 21 Oct 2011 02:34:14 +1100
parents b9fc682c9d9b
children 1467d5e5fd6d
files src/libssh2-1-fixes.patch src/libssh2.mk
diffstat 2 files changed, 48 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libssh2-1-fixes.patch	Fri Oct 21 02:34:14 2011 +1100
@@ -0,0 +1,19 @@
+This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+Contains ad hoc patches for cross building.
+
+diff -Naur libssh2-1.3.0.orig/include/libssh2.h libssh2-1.3.0/include/libssh2.h
+--- libssh2-1.3.0.orig/include/libssh2.h	2011-09-06 15:56:34.000000000 -0500
++++ libssh2-1.3.0/include/libssh2.h	2011-10-17 10:10:13.000000000 -0500
+@@ -88,8 +88,8 @@
+ extern "C" {
+ #endif
+ #ifdef _WIN32
+-# include <BaseTsd.h>
+-# include <WinSock2.h>
++# include <basetsd.h>
++# include <winsock2.h>
+ #endif
+ 
+ #include <stddef.h>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libssh2.mk	Fri Oct 21 02:34:14 2011 +1100
@@ -0,0 +1,29 @@
+# This file is part of mingw-cross-env.
+# See doc/index.html for further information.
+
+# libssh2
+PKG             := libssh2
+$(PKG)_IGNORE   :=
+$(PKG)_VERSION  := 1.3.0
+$(PKG)_CHECKSUM := d342e06abe38a29b1bbb9c58d50dd093eab0bee9
+$(PKG)_SUBDIR   := libssh2-$($(PKG)_VERSION)
+$(PKG)_FILE     := libssh2-$($(PKG)_VERSION).tar.gz
+$(PKG)_WEBSITE  := http://www.libssh2.org
+$(PKG)_URL      := http://www.libssh2.org/download/$($(PKG)_FILE)
+$(PKG)_DEPS     := 
+
+define $(PKG)_UPDATE
+    wget -q -O- 'http://www.libssh2.org/download/' | \
+    grep 'libssh2-' | \
+    $(SED) -n 's,.*libssh2-\([0-9][^>]*\)\.tar.*,\1,p' | \
+    head -1
+endef
+
+define $(PKG)_BUILD
+    cd '$(1)' && ./configure \
+        --host='$(TARGET)' \
+        --disable-shared \
+        --prefix='$(PREFIX)/$(TARGET)' \
+        PKG_CONFIG='$(TARGET)-pkg-config'
+    $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= html_DATA=
+endef