bsdmake: ensure @PREFIX@ is always replaced with a path

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-08-09 02:05:04 -05:00
parent 11587636ca
commit f10f5a24f0

View file

@ -21,6 +21,8 @@ class Bsdmake < Formula
def install
# Replace @PREFIX@ inserted by MacPorts patches
# Use 'prefix' since this is sometimes a keg-only brew
# But first replace the X11 path if X11 is installed
inreplace 'mk/sys.mk', '@PREFIX@', MacOS::X11.prefix if MacOS::X11.installed?
inreplace %W[mk/bsd.README
mk/bsd.cpu.mk
mk/bsd.doc.mk
@ -28,12 +30,10 @@ class Bsdmake < Formula
mk/bsd.own.mk
mk/bsd.port.mk
mk/bsd.port.subdir.mk
mk/sys.mk
pathnames.h],
'@PREFIX@', prefix
# X11 path shouldn't be munged
inreplace 'mk/sys.mk', '@PREFIX@', MacOS::X11.prefix if MacOS::X11.installed?
inreplace 'mk/bsd.own.mk' do |s|
s.gsub! '@INSTALL_USER@', `id -un`.chomp
s.gsub! '@INSTALL_GROUP@', `id -gn`.chomp