Fri Feb 5 17:25:52 2021 UTC ()
nano: Fix hardcoded paths in manpages

pkgsrc changes:
---------------
  * Add patches to substitute hardcoded /etc and /usr paths in manpages.
  * Bump revision.


(triaxx)
diff -r1.92 -r1.93 pkgsrc/editors/nano/Makefile
diff -r1.63 -r1.64 pkgsrc/editors/nano/distinfo
diff -r0 -r1.1 pkgsrc/editors/nano/patches/patch-doc_nano.1
diff -r0 -r1.1 pkgsrc/editors/nano/patches/patch-doc_nanorc.5

cvs diff -r1.92 -r1.93 pkgsrc/editors/nano/Makefile (expand / switch to unified diff)

--- pkgsrc/editors/nano/Makefile 2021/01/24 17:13:42 1.92
+++ pkgsrc/editors/nano/Makefile 2021/02/05 17:25:52 1.93
@@ -1,16 +1,17 @@ @@ -1,16 +1,17 @@
1# $NetBSD: Makefile,v 1.92 2021/01/24 17:13:42 nia Exp $ 1# $NetBSD: Makefile,v 1.93 2021/02/05 17:25:52 triaxx Exp $
2 2
3DISTNAME= nano-5.5 3DISTNAME= nano-5.5
 4PKGREVISION= 1
4CATEGORIES= editors 5CATEGORIES= editors
5MASTER_SITES= https://www.nano-editor.org/dist/v${PKGVERSION_NOREV:C/\..*$//}/ 6MASTER_SITES= https://www.nano-editor.org/dist/v${PKGVERSION_NOREV:C/\..*$//}/
6EXTRACT_SUFX= .tar.xz 7EXTRACT_SUFX= .tar.xz
7 8
8MAINTAINER= wiedi@frubar.net 9MAINTAINER= wiedi@frubar.net
9HOMEPAGE= https://www.nano-editor.org/ 10HOMEPAGE= https://www.nano-editor.org/
10COMMENT= Small and friendly text editor (a free replacement for Pico) 11COMMENT= Small and friendly text editor (a free replacement for Pico)
11LICENSE= gnu-gpl-v3 12LICENSE= gnu-gpl-v3
12 13
13USE_PKGLOCALEDIR= yes 14USE_PKGLOCALEDIR= yes
14USE_TOOLS+= msgfmt msgmerge xgettext gmake 15USE_TOOLS+= msgfmt msgmerge xgettext gmake
15GNU_CONFIGURE= yes 16GNU_CONFIGURE= yes
16CONFIGURE_ARGS+= --enable-color 17CONFIGURE_ARGS+= --enable-color
@@ -23,19 +24,25 @@ INFO_FILES= yes @@ -23,19 +24,25 @@ INFO_FILES= yes
23# Looks like that IRIX 5.x lacks vsnprintf() functions, 24# Looks like that IRIX 5.x lacks vsnprintf() functions,
24# which are required to make this work, so glib2 is used instead. 25# which are required to make this work, so glib2 is used instead.
25.include "../../mk/bsd.prefs.mk" 26.include "../../mk/bsd.prefs.mk"
26 27
27.if !empty(MACHINE_PLATFORM:MIRIX-5*) 28.if !empty(MACHINE_PLATFORM:MIRIX-5*)
28. include "../../devel/glib2/buildlink3.mk" 29. include "../../devel/glib2/buildlink3.mk"
29.endif 30.endif
30 31
31.include "options.mk" 32.include "options.mk"
32 33
33INSTALLATION_DIRS+= share/examples/nano 34INSTALLATION_DIRS+= share/examples/nano
34CONF_FILES+= share/examples/nano/nanorc ${PKG_SYSCONFDIR}/nanorc 35CONF_FILES+= share/examples/nano/nanorc ${PKG_SYSCONFDIR}/nanorc
35 36
 37SUBST_CLASSES+= man
 38SUBST_STAGE.man= pre-configure
 39SUBST_MESSAGE.man= Fixing paths in manpages.
 40SUBST_FILES.man= doc/nano.1 doc/nanorc.5
 41SUBST_VARS.man= PKG_SYSCONFDIR PREFIX
 42
36post-install: 43post-install:
37 ${INSTALL_DATA} ${WRKSRC}/doc/sample.nanorc ${DESTDIR}${PREFIX}/share/examples/nano/nanorc 44 ${INSTALL_DATA} ${WRKSRC}/doc/sample.nanorc ${DESTDIR}${PREFIX}/share/examples/nano/nanorc
38 45
39.include "../../devel/gettext-lib/buildlink3.mk" 46.include "../../devel/gettext-lib/buildlink3.mk"
40.include "../../mk/curses.buildlink3.mk" 47.include "../../mk/curses.buildlink3.mk"
41.include "../../mk/bsd.pkg.mk" 48.include "../../mk/bsd.pkg.mk"

cvs diff -r1.63 -r1.64 pkgsrc/editors/nano/distinfo (expand / switch to unified diff)

--- pkgsrc/editors/nano/distinfo 2021/01/24 17:13:42 1.63
+++ pkgsrc/editors/nano/distinfo 2021/02/05 17:25:52 1.64
@@ -1,7 +1,9 @@ @@ -1,7 +1,9 @@
1$NetBSD: distinfo,v 1.63 2021/01/24 17:13:42 nia Exp $ 1$NetBSD: distinfo,v 1.64 2021/02/05 17:25:52 triaxx Exp $
2 2
3SHA1 (nano-5.5.tar.xz) = b727bcd583498312f52307ed39b83d7515401c58 3SHA1 (nano-5.5.tar.xz) = b727bcd583498312f52307ed39b83d7515401c58
4RMD160 (nano-5.5.tar.xz) = 0aaec99f60c214081608e3278ecd662e48f95825 4RMD160 (nano-5.5.tar.xz) = 0aaec99f60c214081608e3278ecd662e48f95825
5SHA512 (nano-5.5.tar.xz) = cbd2b6e1dc7437caf4ec6b55252664430fb1d6243dcf51a7b29ca3683bd1e6a25809c7b9d514d42cc85eb1a615bf3365951c07bf7c3c183a8cbe71c8586d9481 5SHA512 (nano-5.5.tar.xz) = cbd2b6e1dc7437caf4ec6b55252664430fb1d6243dcf51a7b29ca3683bd1e6a25809c7b9d514d42cc85eb1a615bf3365951c07bf7c3c183a8cbe71c8586d9481
6Size (nano-5.5.tar.xz) = 1427592 bytes 6Size (nano-5.5.tar.xz) = 1427592 bytes
7SHA1 (patch-configure) = 5f34f74d20c9b18f21afa308ed5634daed98a25d 7SHA1 (patch-configure) = 5f34f74d20c9b18f21afa308ed5634daed98a25d
 8SHA1 (patch-doc_nano.1) = 28dcfb77046774d09128986783bbc434a708e212
 9SHA1 (patch-doc_nanorc.5) = a1c2151152d08348263a6f36be43fa04fb4eee15

File Added: pkgsrc/editors/nano/patches/patch-doc_nano.1
$NetBSD: patch-doc_nano.1,v 1.1 2021/02/05 17:25:52 triaxx Exp $

* Fix hard-coded pathes.

--- doc/nano.1.orig	2021-01-14 10:11:45.000000000 +0000
+++ doc/nano.1
@@ -383,7 +383,7 @@ or \fI~/.config/nano/nanorc\fR, whicheve
 .BR nanorc (5)
 for more information on the possible contents of those files.
 .sp
-See \fI/usr/share/nano/\fR and \fI/usr/share/nano/extra/\fR
+See \fI@PREFIX@/share/nano/\fR and \fI@PREFIX@/share/nano/extra/\fR
 for available syntax-coloring definitions.
 
 .SH NOTES
@@ -420,4 +420,4 @@ the environment variable \fBNANO_NOCATCH
 .SH SEE ALSO
 .BR nanorc (5)
 .sp
-\fI/usr/share/doc/nano/\fP (or equivalent on your system)
+\fI@PREFIX@/share/doc/nano/\fP (or equivalent on your system)

File Added: pkgsrc/editors/nano/patches/patch-doc_nanorc.5
$NetBSD: patch-doc_nanorc.5,v 1.1 2021/02/05 17:25:52 triaxx Exp $

* Fix hard-coded pathes.

--- doc/nanorc.5.orig	2021-01-14 10:11:45.000000000 +0000
+++ doc/nanorc.5
@@ -25,7 +25,7 @@ nanorc \- GNU nano's configuration file
 The \fInanorc\fP files contain the default settings for \fBnano\fP,
 a small and friendly editor.  During startup, if \fB\-\-rcfile\fR
 is not given, \fBnano\fR will read two files: first the
-system-wide settings, from \fI/etc/nanorc\fP (the exact path might be
+system-wide settings, from \fI@PKG_SYSCONFDIR@/nanorc\fP (the exact path might be
 different on your system), and then the user-specific settings, either
 from \fI~/.nanorc\fR or from \fI$XDG_CONFIG_HOME/nano/nanorc\fR
 or from \fI~/.config/nano/nanorc\fR, whichever is encountered first.
@@ -995,13 +995,13 @@ for \fBunbind\fR it means all menus wher
 
 .SH FILES
 .TP
-.I /etc/nanorc
+.I @PKG_SYSCONFDIR@/nanorc
 System-wide configuration file.
 .TP
 .IR ~/.nanorc " or " $XDG_CONFIG_HOME/nano/nanorc " or " ~/.config/nano/nanorc
 Per-user configuration file.
 .TP
-.I /usr/share/nano/*
+.I @PREFIX@/share/nano/*
 Syntax definitions for the syntax coloring of common file types
 (and for less common file types in the \fIextra/\fR subdirectory).