diff options
author | fredb <fredb@pkgsrc.org> | 2001-03-25 23:47:10 +0000 |
---|---|---|
committer | fredb <fredb@pkgsrc.org> | 2001-03-25 23:47:10 +0000 |
commit | 66f4e2efdf8811c35f8b699ff5fae086dba02db1 (patch) | |
tree | 2d0868b37cab97299a305ab3b97909fed57c4565 /misc | |
parent | d6921ad334aeccf86d7d5ff521869864a0a45252 (diff) | |
download | pkgsrc-66f4e2efdf8811c35f8b699ff5fae086dba02db1.tar.gz |
By popular demand, permit a default info path to be compiled in,
and pass in a default suitable for NetBSD.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/pinfo/Makefile | 4 | ||||
-rw-r--r-- | misc/pinfo/files/patch-sum | 3 | ||||
-rw-r--r-- | misc/pinfo/patches/patch-aa | 82 |
3 files changed, 88 insertions, 1 deletions
diff --git a/misc/pinfo/Makefile b/misc/pinfo/Makefile index ed1d48c887a..05ef9092267 100644 --- a/misc/pinfo/Makefile +++ b/misc/pinfo/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.1.1 2001/03/23 20:07:33 fredb Exp $ +# $NetBSD: Makefile,v 1.2 2001/03/25 23:47:10 fredb Exp $ # DISTNAME= pinfo-0.6.0 @@ -15,7 +15,9 @@ DEPENDS+= ncurses>=5.0:../../devel/ncurses GNU_CONFIGURE= yes USE_LIBINTL= yes +CPPFLAGS+= -DDFLT_INFOPATH='\"/usr/share/info:${X11BASE}/info:${LOCALBASE}/info:/usr/local/info\"' CONFIGURE_ARGS+= --with-ncurses=${LOCALBASE} +CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" post-install: ${INSTALL_DATA} ${WRKSRC}/src/pinforc ${PREFIX}/share/examples/ diff --git a/misc/pinfo/files/patch-sum b/misc/pinfo/files/patch-sum new file mode 100644 index 00000000000..13bd99306b5 --- /dev/null +++ b/misc/pinfo/files/patch-sum @@ -0,0 +1,3 @@ +$NetBSD: patch-sum,v 1.1 2001/03/25 23:47:11 fredb Exp $ + +SHA1 (patch-aa) = e2d7d0e8ccbe5db276fb736d22682bb8f719eb98 diff --git a/misc/pinfo/patches/patch-aa b/misc/pinfo/patches/patch-aa new file mode 100644 index 00000000000..30b8619ea5a --- /dev/null +++ b/misc/pinfo/patches/patch-aa @@ -0,0 +1,82 @@ +$NetBSD: patch-aa,v 1.1 2001/03/25 23:47:11 fredb Exp $ + +--- src/filehandling_functions.c.orig Tue Jun 6 13:48:58 2000 ++++ src/filehandling_functions.c +@@ -670,10 +670,14 @@ + { + char curdir[1024]; + int i, infolen, wsklen; ++#ifndef DFLT_INFOPATH + int localdir = 0, globaldir = 0; /* flags, which say if the /usr/local/info * + * and /usr/info were defined in $INFOPATH */ + int sharedir = 0; /* the same for /usr/share/info */ ++#endif + char *lang = getenv ("LANG"); ++ char *infopath; ++ char *wsk; + + getcwd (curdir, 1024); + +@@ -681,29 +685,44 @@ + + infopathcount = 0; + ++#ifdef DFLT_INFOPATH ++ if (getenv ("INFOPATH") == NULL) ++ { ++ infopath = xmalloc (strlen (DFLT_INFOPATH) + 100); ++ strcpy (infopath, DFLT_INFOPATH); ++ } ++ else ++#else + if (getenv ("INFOPATH") != NULL) /* check paths in $INFOPATH variable */ ++#endif + { +- char *infopath = xmalloc (strlen (getenv ("INFOPATH")) + 100); ++ infopath = xmalloc (strlen (getenv ("INFOPATH")) + 100); + /* + * +5 (well, +100) of overrun buffer, since the following while loop + * can be coded simplier this way + */ +- char *wsk = infopath; + strcpy (infopath, getenv ("INFOPATH")); ++#ifdef DFLT_INFOPATH ++ } ++ { ++#endif + infolen = strlen (infopath); + for (i = 0; i < infolen; i++) + if (infopath[i] == ':') + infopath[i] = 0; ++ wsk = infopath; + while (wsk < infopath + infolen) + { + infopaths = xrealloc (infopaths, (infopathcount + 2) * sizeof (char *)); + wsklen = strlen (wsk); ++#ifndef DFLT_INFOPATH + if (strncmp ("/usr/info", wsk, 9) == 0) + globaldir = 1; + if (strncmp ("/usr/local/info", wsk, 15) == 0) + localdir = 1; + if (strncmp ("/usr/share/info", wsk, 15) == 0) + sharedir = 1; ++#endif + if (wsklen) + { + if (wsk[wsklen - 1] == '/') +@@ -734,6 +753,7 @@ + xfree (infopath); + infopath = 0; + } ++#ifndef DFLT_INFOPATH + if (lang) + { + infopaths = xrealloc (infopaths, sizeof (char *) * (infopathcount + 15)); +@@ -799,6 +819,7 @@ + infopathcount++; + } + } ++#endif + infopaths[infopathcount] = xmalloc (5); + strcpy (infopaths[infopathcount], "."); /* for ./ */ + infopathcount++; |