summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2011-01-23 19:07:24 +0000
committeragc <agc@pkgsrc.org>2011-01-23 19:07:24 +0000
commit231a384ac39e89066848cc87adf59eeb1aeb87b3 (patch)
tree329b182f4e7c428624cf6a843492f604fb12c155 /bootstrap
parentf5404a820b828d189f2df4c4925b8189a9f4d458 (diff)
downloadpkgsrc-231a384ac39e89066848cc87adf59eeb1aeb87b3.tar.gz
Add support for MirBSD to pkgsrc. Patches from Benny Siegert and
Thorsten Glaser.
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/README.MirBSD43
-rwxr-xr-xbootstrap/bootstrap31
2 files changed, 73 insertions, 1 deletions
diff --git a/bootstrap/README.MirBSD b/bootstrap/README.MirBSD
new file mode 100644
index 00000000000..9df7117f148
--- /dev/null
+++ b/bootstrap/README.MirBSD
@@ -0,0 +1,43 @@
+$NetBSD: README.MirBSD,v 1.1 2011/01/23 19:07:24 agc Exp $
+
+Please read the general README file as well.
+
+pkgsrc will install the portable NetBSD make as "bmake". The standard
+make(1) from MirBSD is incompatible with pkgsrc.
+
+Unless you bootstrap pkgsrc with the --unprivileged option, sudo(8) will
+be used to gain root privileges.
+
+MirPorts and pkgsrc can be installed in parallel. The MirPorts framework
+uses /usr/mpkg as its default prefix and /usr/mpkg/db/pkg as its package
+database directory. Thus, its paths do not clash with the default
+choices of pkgsrc, which are /usr/pkg and /var/db/pkg respectively. We
+suggest however that you place the package database for pkgsrc below its
+prefix, for example by specifying the
+
+ --pkgdbdir /usr/pkg/db
+
+option to bootstrap. Please note that the package tools from MirPorts
+and pkgsrc have the same names (e.g. pkg_add) but are incompatible. This
+leads to strage behavior when building or installing packages if both
+frameworks are in your PATH.
+
+Thus, before you start the bootstrap, you must make sure that
+/usr/mpkg/bin and /usr/mpkg/sbin are NOT in your PATH if MirPorts is
+already installed. Use a command like the following:
+
+ export PATH=${HOME}/.etc/bin:/usr/local/bin:/usr/pkg/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/sbin:/sbin:/usr/pkg/sbin:/usr/games
+
+Other environment variables that you may want to set are MANPATH,
+INFOPATH and XAPPLRESDIR. There should be no need to set the
+LD_LIBRARY_PATH environment variable.
+
+The default mk.conf will be installed in /usr/pkg/etc. It mirrors the
+values for CFLAGS, CPPFLAGS, and LDFLAGS retrieved from the native
+make(1) at bootstrap time, instead of including /etc/make.cfg and the
+native <bsd.own.mk>. If you change values in /etc/make.cfg, you will
+also have to adjust the mk.conf used by bmake.
+
+The standard compiler is mgcc; if you have more than one native compiler
+installed (assuming all are GCC variants), export CC=gcc-1.2.3 before
+using pkgsrc and possibly adjust /usr/pkg/etc/mk.conf accordingly.
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index 2871e197c81..2d5983c5ff5 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.162 2010/12/26 11:24:21 adam Exp $
+# $NetBSD: bootstrap,v 1.163 2011/01/23 19:07:25 agc Exp $
#
#
# Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved.
@@ -622,6 +622,35 @@ Linux)
set_opsys=no
machine_arch=`uname -m | sed -e 's/i.86/i386/'`
;;
+MirBSD)
+ root_group=wheel
+ need_pax=yes
+ need_mtree=no
+ need_bsd_install=no
+ need_awk=no
+ need_sed=no
+ set_opsys=no
+ check_prog mtreeprog mtree
+ machine_arch=`arch -s`
+ [ -z "$fetch_cmd" ] && fetch_cmd=/usr/bin/ftp
+ # there is no /usr/bin/cc, so use mgcc if unset
+ test -n "$CC" || { CC=mgcc; export CC; }
+ # get some variables from the native make if unset
+ for var in CFLAGS CPPFLAGS LDFLAGS; do
+ # check if variable is already set
+ eval _tmp=\"\$$var\"
+ [ "x$_tmp" != x ] && continue
+ # ask the native make (EXPERIMENTAL = don't add -Werror)
+ # the -I${.CURDIR} dance is to prevent junk in CPPFLAGS
+ _tmp=`printf '%s\nall:\n\t@%s %%s %s=${%s:M*:Q:Q}\n%s\n%s\n' \
+ $var'+=-I${.CURDIR}' printf $var $var':S/-I${.CURDIR}//' \
+ EXPERIMENTAL=yes '.include <bsd.prog.mk>' | \
+ (unset MAKECONF; /usr/bin/make -f - all 2>/dev/null) | \
+ sed 's/^x//'`
+ eval $_tmp
+ eval export $var
+ done
+ ;;
NetBSD)
root_group=wheel
need_bsd_install=no