1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-17 08:01:36 +00:00

Change the way REINPLACE_CMD works - instead of using perl(1) on systems

where sed(1) can't do in-place editing add a new USE_REINPLACE knob, which
if turned on defines REINPLACE_CMD and adds textproc/sed_inplace port into
BUILD_DEPENDS if necessary.

Not objected by:	portmgr@
This commit is contained in:
Maxim Sobolev 2002-06-19 08:21:27 +00:00
parent 4803463633
commit 683ff40aac
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=61546

View File

@ -623,13 +623,6 @@ OSVERSION!= /usr/sbin/sysctl -n kern.osreldate
.endif
.endif
# Special macro for doing in-place file editing using regexps
.if ${OSVERSION} <= 500033
REINPLACE_CMD?= ${PERL} -p -i.bak
.else
REINPLACE_CMD?= ${SED} -i.bak
.endif
# Get the object format.
.if !defined(PORTOBJFORMAT)
PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout
@ -716,6 +709,17 @@ FILESDIR?= ${MASTERDIR}/files
SCRIPTDIR?= ${MASTERDIR}/scripts
PKGDIR?= ${MASTERDIR}
# Special macro for doing in-place file editing using regexps
.if defined(USE_REINPLACE)
REINPLACE_ARGS?= -i.bak
.if ${OSVERSION} <= 500033
BUILD_DEPENDS+= ${LOCALBASE}/bin/sed_inplace:${PORTSDIR}/textproc/sed_inplace
REINPLACE_CMD?= ${LOCALBASE}/bin/sed_inplace ${REINPLACE_ARGS}
.else
REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS}
.endif
.endif
.if defined(USE_IMAKE) && !defined(USE_X_PREFIX)
USE_X_PREFIX= yes
.endif