libports: add libssh-0.5.4

Fixes #669
This commit is contained in:
Josef Söntgen 2012-12-03 22:47:03 +01:00 committed by Norman Feske
parent 15dc2f3642
commit 814c6fc9d5
6 changed files with 220 additions and 0 deletions

View File

@ -0,0 +1 @@
REP_INC_DIR += include/libssh

55
libports/lib/mk/libssh.mk Normal file
View File

@ -0,0 +1,55 @@
include $(REP_DIR)/ports/libssh.inc
LIBSSH_DIR = $(REP_DIR)/contrib/$(LIBSSH)
SRC_C = \
agent.c \
auth.c \
base64.c \
buffer.c \
callbacks.c \
channels.c \
client.c \
config.c \
connect.c \
crc32.c \
crypt.c \
dh.c \
error.c \
getpass.c \
gcrypt_missing.c \
gzip.c \
init.c \
kex.c \
keyfiles.c \
keys.c \
known_hosts.c \
legacy.c \
libcrypto.c \
libgcrypt.c \
log.c \
match.c \
messages.c \
misc.c \
options.c \
packet.c \
pcap.c \
pki.c \
poll.c \
session.c \
scp.c \
socket.c \
string.c \
threads.c \
wrapper.c
#INC_DIR += $(LIBSSH_DIR)
INC_DIR += $(REP_DIR)/src/lib/libssh
CC_OPT += -DHAVE_CONFIG_H
LIBS += libc zlib libcrypto
SHARED_LIB = yes
vpath %.c $(LIBSSH_DIR)/src

View File

@ -0,0 +1,2 @@
LIBSSH_VERSION = 0.5.4
LIBSSH = libssh-$(LIBSSH_VERSION)

31
libports/ports/libssh.mk Normal file
View File

@ -0,0 +1,31 @@
include ports/libssh.inc
LIBSSH_TGZ = $(LIBSSH).tar.gz
LIBSSH_URL = https://red.libssh.org/attachments/download/41/$(LIBSSH_TGZ)
#
# Interface to top-level prepare Makefile
#
PORTS += $(LIBSSH)
prepare-libssh: $(CONTRIB_DIR)/$(LIBSSH) include/libssh
$(CONTRIB_DIR)/$(LIBSSH): clean-libssh
#
# Port-specific local rules
#
$(DOWNLOAD_DIR)/$(LIBSSH_TGZ):
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(LIBSSH_URL) && touch $@
$(CONTRIB_DIR)/$(LIBSSH): $(DOWNLOAD_DIR)/$(LIBSSH_TGZ)
$(VERBOSE)tar xfz $< -C $(CONTRIB_DIR) && touch $@
include/libssh:
$(VERBOSE)mkdir -p $@
$(VERBOSE)for f in $(shell find $(CONTRIB_DIR)/$(LIBSSH)/include -name *.h); do \
ln -sf ../../$$f $@; done
clean-libssh:
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(LIBSSH)
$(VERBOSE)rm -rf include/libssh

View File

@ -0,0 +1,126 @@
/* Name of package */
#define PACKAGE "libssh"
/* Version number of package */
#define VERSION "0.5.2"
/* #undef LOCALEDIR */
#define DATADIR "/share/libssh"
#define LIBDIR "/lib"
#define PLUGINDIR "/lib/libssh-4"
#define SYSCONFDIR "/etc"
/************************** HEADER FILES *************************/
/* Define to 1 if you have the <argp.h> header file. */
#define HAVE_ARGP_H 1
/* Define to 1 if you have the <pty.h> header file. */
#define HAVE_PTY_H 1
/* Define to 1 if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define to 1 if you have the <openssl/aes.h> header file. */
#define HAVE_OPENSSL_AES_H 1
/* Define to 1 if you have the <wspiapi.h> header file. */
/* #undef HAVE_WSPIAPI_H */
/* Define to 1 if you have the <openssl/blowfish.h> header file. */
#define HAVE_OPENSSL_BLOWFISH_H 1
/* Define to 1 if you have the <openssl/des.h> header file. */
#define HAVE_OPENSSL_DES_H 1
/* Define to 1 if you have the <pthread.h> header file. */
/* #undef HAVE_PTHREAD_H */
/*************************** FUNCTIONS ***************************/
/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
/* Define to 1 if you have the `_snprintf' function. */
/* #undef HAVE__SNPRINTF */
/* Define to 1 if you have the `_snprintf_s' function. */
/* #undef HAVE__SNPRINTF_S */
/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1
/* Define to 1 if you have the `_vsnprintf' function. */
/* #undef HAVE__VSNPRINTF */
/* Define to 1 if you have the `_vsnprintf_s' function. */
/* #undef HAVE__VSNPRINTF_S */
/* Define to 1 if you have the `strncpy' function. */
#define HAVE_STRNCPY 1
/* Define to 1 if you have the `cfmakeraw' function. */
/* #unfdef HAVE_CFMAKERAW */
/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1
/* Define to 1 if you have the `poll' function. */
/* #undef HAVE_POLL */
/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1
/* Define to 1 if you have the `regcomp' function. */
#define HAVE_REGCOMP 1
/* Define to 1 if you have the `clock_gettime' function. */
#define HAVE_CLOCK_GETTIME 1
/* Define to 1 if you have the `ntohll' function. */
/* #undef HAVE_NTOHLL */
/*************************** LIBRARIES ***************************/
/* Define to 1 if you have the `crypto' library (-lcrypto). */
#define HAVE_LIBCRYPTO 1
/* Define to 1 if you have the `gcrypt' library (-lgcrypt). */
/* #undef HAVE_LIBGCRYPT */
/* Define to 1 if you have the `z' library (-lz). */
#define HAVE_LIBZ 1
/* Define to 1 if you have the `pthread' library (-lpthread). */
/* #undef HAVE_PTHREAD */
/**************************** OPTIONS ****************************/
/* Define to 1 if you want to enable ZLIB */
#define WITH_LIBZ 1
/* Define to 1 if you want to enable SFTP */
#define WITH_SFTP 1
/* Define to 1 if you want to enable SSH1 */
/* #undef WITH_SSH1 */
/* Define to 1 if you want to enable server support */
/* #undef WITH_SERVER */
/* Define to 1 if you want to enable debug output for crypto functions */
/* #undef DEBUG_CRYPTO */
/* Define to 1 if you want to enable pcap output support (experimental) */
/* #undef WITH_PCAP */
/* Define to 1 if you want to enable calltrace debug output */
#define DEBUG_CALLTRACE 1
/*************************** ENDIAN *****************************/
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
/* #undef WORDS_BIGENDIAN */

View File

@ -0,0 +1,5 @@
TARGET = test-libssh
LIBS = base libcrypto libssh
SRC_CC = main.cc
vpath main.cc $(PRG_DIR)/..