From a03670e35b7f333e8868e3b684fc6cb9a0317de6 Mon Sep 17 00:00:00 2001 From: dinoex Date: Wed, 18 Dec 2002 03:49:07 +0000 Subject: - Fix some of the build problems on CURRENT, not all. - make PREFIX aware - mark BROKEN for conflicts with getopt.h - take maintainership --- security/lsh/Makefile | 16 +++++---- security/lsh/files/patch-ac | 60 ---------------------------------- security/lsh/files/patch-argp-help.c | 21 ++++++++++++ security/lsh/files/patch-lsh-authorize | 60 ++++++++++++++++++++++++++++++++++ 4 files changed, 91 insertions(+), 66 deletions(-) delete mode 100644 security/lsh/files/patch-ac create mode 100644 security/lsh/files/patch-argp-help.c create mode 100644 security/lsh/files/patch-lsh-authorize diff --git a/security/lsh/Makefile b/security/lsh/Makefile index 29da366058b0..2dd212cf64c5 100644 --- a/security/lsh/Makefile +++ b/security/lsh/Makefile @@ -11,24 +11,28 @@ MASTER_SITES= ftp://ftp.lysator.liu.se/pub/security/lsh/%SUBDIR%/ MASTER_SITE_SUBDIR= . old DISTNAME= ${PORTNAME}-${PORTVERSION} -MAINTAINER= ports@FreeBSD.org +MAINTAINER= dinoex@FreeBSD.org RESTRICTED= "Crypto; export-controlled" GNU_CONFIGURE= yes INSTALL_TARGET= install +MAN1= lsh_writekey.1 lsh_keygen.1 lsh.1 +MAN5= DSA.5 secsh.5 SHA.5 SPKI.5 +MAN8= lshd.8 .include .if ${OSVERSION} < 400014 -CONFIGURE_ARGS+=--without-ipv6 +CONFIGURE_ARGS+= --without-ipv6 .endif .if ${OSVERSION} >= 500000 BUILD_DEPENDS+= ${LOCALBASE}/include/gmp.h:${PORTSDIR}/math/libgmp4 +CONFIGURE_ARGS+= --with-include-path=${LOCALBASE}/include +CONFIGURE_ARGS+= --with-lib-path=${LOCALBASE}/lib +.endif +.if ${OSVERSION} >= 500043 +BROKEN= conflicts with /usr/include/getopt.h .endif - -MAN1= lsh_writekey.1 lsh_keygen.1 lsh.1 -MAN5= DSA.5 secsh.5 SHA.5 SPKI.5 -MAN8= lshd.8 post-install: .for BIN in lsh lsh_keygen lsh_writekey sexp-conv srp-gen lsh-decode-key diff --git a/security/lsh/files/patch-ac b/security/lsh/files/patch-ac deleted file mode 100644 index fd367474558e..000000000000 --- a/security/lsh/files/patch-ac +++ /dev/null @@ -1,60 +0,0 @@ ---- src/lsh-authorize.orig Tue Jul 11 13:56:07 2000 -+++ src/lsh-authorize Tue Jul 11 14:00:58 2000 -@@ -1,4 +1,4 @@ --#! /bin/sh -+#!/bin/sh - - usage () { - echo Usage: $0 key-file -@@ -29,7 +29,7 @@ - exit 0 - fi - --create_dir () { -+create-dir () { - if mkdir $1 2>/dev/null; then - echo Created $1 - chmod $2 $1 || exit 1 -@@ -37,26 +37,27 @@ - } - - # Create directories --create_dir ~/.lsh 0700 --create_dir ~/.lsh/authorized_keys_sha1 0700 -+create-dir ~/.lsh 0700 -+create-dir ~/.lsh/authorized_keys_sha1 0700 - --if type sexp-conv ; then -- SEXP_CONV=sexp_conv --else -- SEXP_CONV=./sexp_conv --fi -+PATH=$PATH:`dirname $0` - --if ! type $SEXP_CONV ; then -- echo "Can't find the sexp_conv program" -- exit 1 --fi -+SEXP_CONV="sexp_conv" - - while [ $# != 0 ]; do -- hash=`$SEXP_CONV < $1 --once --hash sha1 --raw-hash` -- if [ -z $hash ] ; then -- echo $0: File $1 not found. -- else -+ if [ -f $1 ]; then -+ hash=`$SEXP_CONV < $1 --once --hash sha1 --raw-hash` -+ if [ $? = 127 ]; then -+ echo "Can't find the sexp_conv program" -+ exit 1 -+ fi -+ if [ -z "$hash" ] ; then -+ echo $0: File $1 not readable -+ else - $SEXP_CONV < $1 -f canonical --once > ~/.lsh/authorized_keys_sha1/$hash -+ fi -+ else -+ echo $0: File $1 not found. - fi - shift - done diff --git a/security/lsh/files/patch-argp-help.c b/security/lsh/files/patch-argp-help.c new file mode 100644 index 000000000000..ea25b96b774f --- /dev/null +++ b/security/lsh/files/patch-argp-help.c @@ -0,0 +1,21 @@ +--- src/argp/argp-help.c.orig Wed Feb 2 15:14:31 2000 ++++ src/argp/argp-help.c Tue Dec 17 13:08:02 2002 +@@ -56,7 +56,9 @@ + #include + #include + #include ++#ifndef __FreeBSD__ + #include ++#endif + #include + + #ifndef _ +@@ -182,7 +184,7 @@ + { "header-col", 0, offsetof (struct uparams, header_col) }, + { "usage-indent", 0, offsetof (struct uparams, usage_indent) }, + { "rmargin", 0, offsetof (struct uparams, rmargin) }, +- { 0 } ++ { 0, 0, 0 } + }; + + /* Read user options from the environment, and fill in UPARAMS appropiately. */ diff --git a/security/lsh/files/patch-lsh-authorize b/security/lsh/files/patch-lsh-authorize new file mode 100644 index 000000000000..fd367474558e --- /dev/null +++ b/security/lsh/files/patch-lsh-authorize @@ -0,0 +1,60 @@ +--- src/lsh-authorize.orig Tue Jul 11 13:56:07 2000 ++++ src/lsh-authorize Tue Jul 11 14:00:58 2000 +@@ -1,4 +1,4 @@ +-#! /bin/sh ++#!/bin/sh + + usage () { + echo Usage: $0 key-file +@@ -29,7 +29,7 @@ + exit 0 + fi + +-create_dir () { ++create-dir () { + if mkdir $1 2>/dev/null; then + echo Created $1 + chmod $2 $1 || exit 1 +@@ -37,26 +37,27 @@ + } + + # Create directories +-create_dir ~/.lsh 0700 +-create_dir ~/.lsh/authorized_keys_sha1 0700 ++create-dir ~/.lsh 0700 ++create-dir ~/.lsh/authorized_keys_sha1 0700 + +-if type sexp-conv ; then +- SEXP_CONV=sexp_conv +-else +- SEXP_CONV=./sexp_conv +-fi ++PATH=$PATH:`dirname $0` + +-if ! type $SEXP_CONV ; then +- echo "Can't find the sexp_conv program" +- exit 1 +-fi ++SEXP_CONV="sexp_conv" + + while [ $# != 0 ]; do +- hash=`$SEXP_CONV < $1 --once --hash sha1 --raw-hash` +- if [ -z $hash ] ; then +- echo $0: File $1 not found. +- else ++ if [ -f $1 ]; then ++ hash=`$SEXP_CONV < $1 --once --hash sha1 --raw-hash` ++ if [ $? = 127 ]; then ++ echo "Can't find the sexp_conv program" ++ exit 1 ++ fi ++ if [ -z "$hash" ] ; then ++ echo $0: File $1 not readable ++ else + $SEXP_CONV < $1 -f canonical --once > ~/.lsh/authorized_keys_sha1/$hash ++ fi ++ else ++ echo $0: File $1 not found. + fi + shift + done -- cgit