Commit dbda9cfa authored by Mike Hibler's avatar Mike Hibler

More FreeBSD 10 fixes.

Apparently I never tried to install an optional package. GetPackage and
AddPackage did not play nice. Also, you must specify --posix in the new
version of patch to get it to work with (some of) our patch files.
parent 7de150c4
......@@ -215,6 +215,9 @@ $TOUCH = "/usr/bin/touch";
$CHOWN = "/usr/sbin/chown";
$PW = "/usr/sbin/pw";
$PATCH = "/usr/bin/patch";
if ($FBSD_MAJOR >= 10) {
$PATCH .= " --posix";
}
$CAT = "/bin/cat";
$NEWALIASES = "/usr/bin/newaliases";
$SH = "/bin/sh";
......
......@@ -842,7 +842,15 @@ sub AddPackage($$) {
if (-x "/usr/sbin/pkg_add") {
ExecQuietFatal("env PKG_PATH=$packagedir pkg_add $pname");
} elsif (-x "/usr/sbin/pkg") {
ExecQuietFatal("pkg add $packagedir/$pname.txz");
# must have the prefix
if ($pname !~ /^$packagedir\//) {
$pname = "$packagedir/$pname";
}
# and the suffix
if ($pname !~ /\.txz$/) {
$pname .= ".txz";
}
ExecQuietFatal("pkg add $pname");
} else {
PhaseFail("No package tools found!?");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment