update info directory on install/uninstall; replace gets with fgets

This commit is contained in:
marc 1998-03-15 04:30:47 +00:00
parent 70f6734747
commit 26a88d7951
3 changed files with 30 additions and 2 deletions

View File

@ -3,14 +3,14 @@
# Date created: 1 Dev 1997
# Whom: ejovi
#
# $OpenBSD: Makefile,v 1.1.1.1 1997/12/01 21:37:56 joey Exp $
# $OpenBSD: Makefile,v 1.2 1998/03/15 04:30:47 marc Exp $
#
DISTNAME= id-utils-3.2
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU}
MAINTAINER= joey@OpenBSD.ORG
MAINTAINER= ports@OpenBSD.ORG
# need to byte-compile a .el file
BUILD_DEPENDS= emacs:${PORTSDIR}/editors/emacs
@ -18,4 +18,10 @@ BUILD_DEPENDS= emacs:${PORTSDIR}/editors/emacs
GNU_CONFIGURE= yes
USE_GMAKE= yes
post-install:
@if [ ! -f ${PREFIX}/info/dir ]; then \
${SED} -ne '1,/Menu:/p' /usr/share/info/dir > ${PREFIX}/info/dir; \
fi
@install-info ${PREFIX}/info/id-utils.info ${PREFIX}/info/dir
.include <bsd.port.mk>

View File

@ -0,0 +1,19 @@
--- src/lid.c.~1~ Tue Aug 6 19:43:28 1996
+++ src/lid.c Sat Mar 14 19:59:04 1998
@@ -758,11 +758,14 @@
search_flinkv (struct file_link **flinkv)
{
char pattern[BUFSIZ];
+ char *p;
unsigned int count;
- if (gets (pattern) == 0)
+ if (fgets (pattern, BUFSIZ, stdin) == 0)
return -1;
-
+ p = strchr(pattern, '\n');
+ if (p)
+ *p = 0;
for (count = 0; *flinkv; count++, flinkv++)
{
char *file_name = ALLOCA (char, PATH_MAX);

View File

@ -7,7 +7,10 @@ bin/eid
bin/aid
bin/gid
bin/defid
@unexec install-info --delete %D/info/id-utils.info %D/info/dir
info/id-utils.info
@exec [ -f %D/info/dir ] || sed -ne '1,/Menu:/p' /usr/share/info/dir > %D/info/dir
@exec install-info %D/info/id-utils.info %D/info/dir
share/emacs/site-lisp/id-utils.elc
share/id-lang.map
share/locale/de/LC_MESSAGES/id-utils.mo