info viewer with keystrokes like lynx
This commit is contained in:
parent
c151792587
commit
8e42669c23
23
textproc/pinfo/Makefile
Normal file
23
textproc/pinfo/Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2003/07/08 16:23:47 espie Exp $
|
||||
|
||||
COMMENT="info viewer"
|
||||
MAINTAINER=Marc Espie <espie@openbsd.org>
|
||||
DISTNAME=pinfo-0.6.7
|
||||
CATEGORIES=textproc devel
|
||||
|
||||
# original distsite is currently unavailable
|
||||
MASTER_SITES=ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/
|
||||
|
||||
# GPL
|
||||
PERMIT_DISTFILES_FTP=Yes
|
||||
PERMIT_DISTFILES_CDROM=Yes
|
||||
PERMIT_PACKAGE_FTP=Yes
|
||||
PERMIT_PACKAGE_CDROM=Yes
|
||||
|
||||
CONFIGURE_STYLE=autoconf
|
||||
AUTOCONF_VERSION=2.13
|
||||
#CONFIGURE_ARGS+=--disable-nls
|
||||
MODULES=gettext
|
||||
CONFIGURE_ENV=CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib"
|
||||
|
||||
.include <bsd.port.mk>
|
3
textproc/pinfo/distinfo
Normal file
3
textproc/pinfo/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (pinfo-0.6.7.tar.gz) = d0ac823aa8fe528ed54004d022cb0896
|
||||
RMD160 (pinfo-0.6.7.tar.gz) = b4c906e1f70987677a1cb3654fad0a34807284fa
|
||||
SHA1 (pinfo-0.6.7.tar.gz) = 1271f74f7610fa2bcc0136d83b70734045ce8d44
|
13
textproc/pinfo/patches/patch-config_h_in
Normal file
13
textproc/pinfo/patches/patch-config_h_in
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-config_h_in,v 1.1.1.1 2003/07/08 16:23:47 espie Exp $
|
||||
--- config.h.in.orig Wed Jul 2 12:06:59 2003
|
||||
+++ config.h.in Wed Jul 2 12:07:23 2003
|
||||
@@ -163,6 +163,9 @@
|
||||
/* Define if you have the strdup function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
+/* Define if you have the mkstemp function. */
|
||||
+#undef HAVE_MKSTEMP
|
||||
+
|
||||
/* Define if you have the strtoul function. */
|
||||
#undef HAVE_STRTOUL
|
||||
|
11
textproc/pinfo/patches/patch-configure_in
Normal file
11
textproc/pinfo/patches/patch-configure_in
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-configure_in,v 1.1.1.1 2003/07/08 16:23:47 espie Exp $
|
||||
--- configure.in.orig Wed Jul 2 12:06:29 2003
|
||||
+++ configure.in Wed Jul 2 12:06:48 2003
|
||||
@@ -61,6 +61,7 @@ dnl AC_CHECK_FUNCS(strdup strstr)
|
||||
dnl Checks for missing functions.
|
||||
AC_CHECK_FUNCS(getopt_long snprintf)
|
||||
AC_CHECK_FUNCS(curs_set use_default_colors bkgdset)
|
||||
+AC_CHECK_FUNCS(mkstemp)
|
||||
dnl AC_CHECK_LIB(ncurses, curs_set, AC_DEFINE(HAS_CURS_SET))
|
||||
dnl AC_CHECK_LIB(ncurses, use_default_colors, AC_DEFINE(HAS_USE_DEFAULT_COLORS))
|
||||
AM_CONDITIONAL(HAVE_SNPRINTF,test "x$ac_cv_func_snprintf" = "xyes")
|
30
textproc/pinfo/patches/patch-src_filehandling_functions_c
Normal file
30
textproc/pinfo/patches/patch-src_filehandling_functions_c
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-src_filehandling_functions_c,v 1.1.1.1 2003/07/08 16:23:47 espie Exp $
|
||||
--- src/filehandling_functions.c.orig Wed Jul 2 12:08:36 2003
|
||||
+++ src/filehandling_functions.c Wed Jul 2 12:09:05 2003
|
||||
@@ -503,7 +503,7 @@ opendirfile (int number)
|
||||
unlink (tmpfilename1); /* erase old tmpfile */
|
||||
free (tmpfilename1);
|
||||
}
|
||||
- tmpfilename1 = tempnam ("/tmp", NULL);
|
||||
+ tmpfilename1 = mytempfile ();
|
||||
tmpfilename = tmpfilename1; /* later we will refere only to tmp1 */
|
||||
}
|
||||
for (i = 0; i < infopathcount; i++) /* go through all paths */
|
||||
@@ -671,7 +671,7 @@ openinfo (char *filename, int number) /*
|
||||
unlink (tmpfilename1); /* erase old tmpfile */
|
||||
free (tmpfilename1);
|
||||
}
|
||||
- tmpfilename1 = tempnam ("/tmp", NULL);
|
||||
+ tmpfilename1 = mytempfile ();
|
||||
tmpfilename = tmpfilename1; /* later we will refere only to tmp1 */
|
||||
}
|
||||
else
|
||||
@@ -682,7 +682,7 @@ openinfo (char *filename, int number) /*
|
||||
unlink (tmpfilename2); /* erase old tmpfile */
|
||||
free (tmpfilename2);
|
||||
}
|
||||
- tmpfilename2 = tempnam ("/tmp", NULL);
|
||||
+ tmpfilename2 = mytempfile ();
|
||||
tmpfilename = tmpfilename2; /* later we will refere only to tmp2 */
|
||||
}
|
||||
|
39
textproc/pinfo/patches/patch-src_manual_c
Normal file
39
textproc/pinfo/patches/patch-src_manual_c
Normal file
@ -0,0 +1,39 @@
|
||||
$OpenBSD: patch-src_manual_c,v 1.1.1.1 2003/07/08 16:23:47 espie Exp $
|
||||
--- src/manual.c.orig Wed Jul 2 12:07:43 2003
|
||||
+++ src/manual.c Wed Jul 2 12:08:15 2003
|
||||
@@ -215,7 +215,7 @@ handlemanual (char *name) /*
|
||||
unlink (tmpfilename1);
|
||||
xfree (tmpfilename1);
|
||||
}
|
||||
- tmpfilename1 = tempnam ("/tmp", NULL);
|
||||
+ tmpfilename1 = mytempfile ();
|
||||
|
||||
#ifdef getmaxyx
|
||||
init_curses ();
|
||||
@@ -315,7 +315,7 @@ handlemanual (char *name) /*
|
||||
}
|
||||
else
|
||||
source = fopen (location, "r"); /* from cmd output */
|
||||
- name = tempnam ("/tmp", NULL);
|
||||
+ name = mytempfile ();
|
||||
raw_tempfilename = name;
|
||||
id = fopen (name, "w");
|
||||
|
||||
@@ -393,7 +393,7 @@ handlemanual (char *name) /*
|
||||
if (use_apropos)
|
||||
{
|
||||
printf (_ ("Calling apropos \n"));
|
||||
- apropos_tempfilename = tempnam ("/tmp", NULL);
|
||||
+ apropos_tempfilename = mytempfile ();
|
||||
snprintf (cmd, 255, "apropos %s > %s", name, apropos_tempfilename);
|
||||
if (system (cmd) != 0)
|
||||
{
|
||||
@@ -437,7 +437,7 @@ handlemanual (char *name) /*
|
||||
unlink (tmpfilename2);
|
||||
xfree (tmpfilename2);
|
||||
}
|
||||
- tmpfilename2 = tempnam ("/tmp", NULL);
|
||||
+ tmpfilename2 = mytempfile ();
|
||||
if (return_value != -2) /* key_back is not pressed;
|
||||
and return_value is an
|
||||
offset to manuallinks */
|
52
textproc/pinfo/patches/patch-src_utils_c
Normal file
52
textproc/pinfo/patches/patch-src_utils_c
Normal file
@ -0,0 +1,52 @@
|
||||
$OpenBSD: patch-src_utils_c,v 1.1.1.1 2003/07/08 16:23:47 espie Exp $
|
||||
--- src/utils.c.orig Wed Jul 2 12:00:46 2003
|
||||
+++ src/utils.c Wed Jul 2 12:08:29 2003
|
||||
@@ -474,3 +474,48 @@ handlewinch ()
|
||||
getmaxyx (stdscr, maxy, maxx);
|
||||
ungetch (keys.refresh_1);
|
||||
}
|
||||
+
|
||||
+char *
|
||||
+mytempfile()
|
||||
+{
|
||||
+ char *result;
|
||||
+ int fd;
|
||||
+
|
||||
+#ifdef HAVE_MKSTEMP
|
||||
+ result = strdup ("/tmp/pinfo.XXXXXXXXXX");
|
||||
+ if (!result)
|
||||
+ return NULL;
|
||||
+ fd = mkstemp (result);
|
||||
+ if (fd == -1)
|
||||
+ {
|
||||
+ free (result);
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ close (fd);
|
||||
+ return result;
|
||||
+ }
|
||||
+#else
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < 50; i++)
|
||||
+ {
|
||||
+ result = tempnam ("/tmp", NULL);
|
||||
+ if (!result)
|
||||
+ break;
|
||||
+ fd = open (result, O_WRONLY | O_CREAT | O_EXCL, 0666);
|
||||
+ if (fd == -1)
|
||||
+ free (result);
|
||||
+ else
|
||||
+ break;
|
||||
+ }
|
||||
+ if (fd != -1)
|
||||
+ {
|
||||
+ close (fd);
|
||||
+ return result;
|
||||
+ }
|
||||
+ else
|
||||
+ return NULL;
|
||||
+#endif
|
||||
+}
|
9
textproc/pinfo/patches/patch-src_utils_h
Normal file
9
textproc/pinfo/patches/patch-src_utils_h
Normal file
@ -0,0 +1,9 @@
|
||||
$OpenBSD: patch-src_utils_h,v 1.1.1.1 2003/07/08 16:23:47 espie Exp $
|
||||
--- src/utils.h.orig Wed Jul 2 12:05:36 2003
|
||||
+++ src/utils.h Wed Jul 2 12:05:48 2003
|
||||
@@ -51,4 +51,5 @@ void waitforgetch (); /* Block until so
|
||||
|
||||
extern int curses_open; /* is curses screen open? */
|
||||
|
||||
+extern char *mytempfile ();
|
||||
#endif
|
2
textproc/pinfo/pkg/DESCR
Normal file
2
textproc/pinfo/pkg/DESCR
Normal file
@ -0,0 +1,2 @@
|
||||
pinfo is an alternate GNU texinfo viewer,
|
||||
that recognizes command sequences in the style of lynx.
|
12
textproc/pinfo/pkg/PLIST
Normal file
12
textproc/pinfo/pkg/PLIST
Normal file
@ -0,0 +1,12 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2003/07/08 16:23:47 espie Exp $
|
||||
@unexec install-info --delete --info-dir=%D/info %D/info/pinfo.info
|
||||
bin/pinfo
|
||||
info/pinfo.info
|
||||
man/man1/pinfo.1
|
||||
share/locale/cs/LC_MESSAGES/pinfo.mo
|
||||
share/locale/de/LC_MESSAGES/pinfo.mo
|
||||
share/locale/ja/LC_MESSAGES/pinfo.mo
|
||||
share/locale/pl/LC_MESSAGES/pinfo.mo
|
||||
share/locale/ru/LC_MESSAGES/pinfo.mo
|
||||
share/locale/sv/LC_MESSAGES/pinfo.mo
|
||||
@exec install-info --info-dir=%D/info %D/info/pinfo.info
|
Loading…
Reference in New Issue
Block a user