1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-30 10:38:37 +00:00

Convert REINPLACE_CMD to patch file and use PREFIX

Suggested by:	swills
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2021-01-05 14:14:48 +00:00
parent 398e9c2b2b
commit cdbdbb820f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=560398
2 changed files with 12 additions and 1 deletions

View File

@ -38,7 +38,7 @@ PATCHFILES+= ${PORTNAME}${PORTVERSION:R:S|.||}-${patch:S|^|00|:S|.*(...)$|\1|}
.endfor
post-patch:
@${REINPLACE_CMD} -e '/SYS_INPUTRC/ s|/etc/inputrc|${LOCALBASE}&|' ${WRKSRC}/rlconf.h
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/rlconf.h
.if exists(/usr/lib/libtermcapw.so)
@${REINPLACE_CMD} 's|-ltermcap|-ltermcapw|g' ${WRKSRC}/configure
.endif

View File

@ -0,0 +1,11 @@
--- rlconf.h.orig 2017-02-21 15:25:30 UTC
+++ rlconf.h
@@ -43,7 +43,7 @@
#define DEFAULT_INPUTRC "~/.inputrc"
/* The ultimate last-ditch filename for an init file -- system-wide. */
-#define SYS_INPUTRC "/etc/inputrc"
+#define SYS_INPUTRC "%%PREFIX%%/etc/inputrc"
/* If defined, expand tabs to spaces. */
#define DISPLAY_TABS