diff options
author | Tony Theodore <tonyt@logyst.com> | 2011-10-20 16:33:35 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2011-10-20 16:33:35 (GMT) |
commit | 41f2e2253f7ccd06bee6963f7fbe249fbd2d6ade (patch) | |
tree | b9ea443ebbd414a83c74041be7fbd4a71b2bca04 | |
parent | 48190805b3d7cc4658582d5fa702997783cb170d (diff) | |
download | mxe-41f2e2253f7ccd06bee6963f7fbe249fbd2d6ade.zip mxe-41f2e2253f7ccd06bee6963f7fbe249fbd2d6ade.tar.gz mxe-41f2e2253f7ccd06bee6963f7fbe249fbd2d6ade.tar.bz2 |
package libssh2: add missing dependencies and test program
-rw-r--r-- | src/libssh2-test.c | 14 | ||||
-rw-r--r-- | src/libssh2.mk | 63 |
2 files changed, 48 insertions, 29 deletions
diff --git a/src/libssh2-test.c b/src/libssh2-test.c new file mode 100644 index 0000000..33754d2 --- /dev/null +++ b/src/libssh2-test.c @@ -0,0 +1,14 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html for further information. */ + +#include <stdio.h> +#include <libssh2.h> + +int main(int argc, char *argv[]) +{ + (void)argc; + (void)argv; + + printf("libssh2 version: %s", libssh2_version(0) ); + return 0; +} diff --git a/src/libssh2.mk b/src/libssh2.mk index 9b6caee..c047416 100644 --- a/src/libssh2.mk +++ b/src/libssh2.mk @@ -1,29 +1,34 @@ -# 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
+# 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 := gcc openssl zlib + +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= + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libssh2.exe' \ + -lssh2 +endef |