Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,4 +1,4 @@
$NetBSD: README.Cygwin,v 1.1 2013/02/22 13:59:47 obache Exp $
$NetBSD: README.Cygwin,v 1.2 2016/07/03 15:16:47 sevan Exp $
Please read the general README file as well.
@@ -11,6 +11,12 @@ To bootstrap using clang:
env CC=clang ./bootstrap --compiler=clang
You need to install minimal base packages in `Base' category plus any of
compiler, gcc, gcc4, and/or clang. For gcc and gcc4, C and C++ compiler will be
installed by default, but you can install Fortran compiler additionally because
it will be required to use libtool. If it is not installed (or too old), Fortran
compiler will be installed with pkgsrc automatically.
==========================================================================
The su(1) command has been in Cygwin distribution, but it has never worked.

View File

@@ -1,6 +1,173 @@
$NetBSD: README.Interix,v 1.16 2015/01/19 00:12:43 obache Exp $
$NetBSD: README.Interix,v 1.17 2016/07/10 01:25:16 sevan Exp $
Please read the general README file, and the Interix installation
instructions in the pkgsrc Guide at:
Interix is a POSIX-compatible subsystem for the Windows NT kernel, providing a
Unix-like environment with a tighter kernel integration than available with
Cygwin. It is part of the Windows Services for Unix package, available for free
for any licensed copy of Windows 2000, XP (not including XP Home), or 2003. SFU
can be downloaded from http://www.microsoft.com/windows/sfu/.
http://www.NetBSD.org/docs/pkgsrc/platforms.html#interix
Services for Unix 3.5 has been tested. 3.0 or 3.1 may work, but are not
officially supported. (The main difference in 3.0/3.1 is lack of pthreads, but
other parts of libc may also be lacking.)
Services for Unix Applications (aka SUA) is an integrated component of Windows
Server 2003 R2 (5.2), Windows Vista and Windows Server 2008 (6.0), Windows 7 and
Windows Server 2008 R2 (6.1). As of this writing, the SUA's Interix 6.0 (32bit)
and 6.1 (64bit) subsystems have been tested. Other versions may work as well.
The Interix 5.x subsystem has not yet been tested with pkgsrc.
When installing Interix/SFU
---------------------------
At an absolute minimum, the following packages must be installed from the
Windows Services for Unix 3.5 distribution in order to use pkgsrc:
Utilities -> Base Utilities
Interix GNU Components -> (all)
Remote Connectivity
Interix SDK
When using pkgsrc on Interix, DO NOT install the Utilities subcomponent "UNIX
Perl". That is Perl 5.6 without shared module support, installed to /usr/local,
and will only cause confusion. Instead, install Perl 5.8 from pkgsrc (or from a
binary package).
The Remote Connectivity subcomponent "Windows Remote Shell Service" does not
need to be installed, but Remote Connectivity itself should be installed in
order to have a working inetd.
During installation you may be asked whether to enable setuid behavior for
Interix programs, and whether to make pathnames default to case-sensitive.
Setuid should be enabled, and case-sensitivity MUST be enabled. (Without
case-sensitivity, a large number of packages including perl will not build.)
NOTE: Newer Windows service packs change the way binary execution works (via the
Data Execution Prevention feature). In order to use pkgsrc and other
gcc-compiled binaries reliably, a hotfix containing POSIX.EXE, PSXDLL.DLL,
PSXRUN.EXE, and PSXSS.EXE (899522 or newer) must be installed. Hotfixes are
available from Microsoft through a support contract; however, Debian Interix
Port has made most Interix hotfixes available for personal use from
http://www.debian-interix.net/hotfixes/.
In addition to the hotfix noted above, it may be necessary to disable Data
Execution Prevention entirely to make Interix functional. This may happen only
with certain types of CPUs; the cause is not fully understood at this time. If
gcc or other applications still segfault repeatedly after installing one of the
hotfixes note above, the following option can be added to the appropriate
"boot.ini" line on the Windows boot drive: /NoExecute=AlwaysOff (WARNING, this
will disable DEP completely, which may be a security risk if applications are
often run as a user in the Administrators group!).
What to do if Interix/SFU is already installed
----------------------------------------------
If SFU is already installed and you wish to alter these settings to work with
pkgsrc, note the following things.
To uninstall UNIX Perl, use Add/Remove Programs, select Microsoft Windows
Services for UNIX, then click Change. In the installer, choose Add or Remove,
then uncheck Utilities->UNIX Perl.
To enable case-sensitivity for the file system, run REGEDIT.EXE, and change the
following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel
Set the DWORD value "obcaseinsensitive" to 0; then reboot.
To enable setuid binaries (optional), run REGEDIT.EXE, and change the following
registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Services for UNIX
Set the DWORD value "EnableSetuidBinaries" to 1; then reboot.
Important notes for using pkgsrc
--------------------------------
The package manager (either the pkgsrc "su" user, or the user running "pkg_add")
must be a member of the local Administrators group. Such a user must also be
used to run the bootstrap. This is slightly relaxed from the normal pkgsrc
requirement of "root".
The package manager should use a umask of 002. "make install" will automatically
complain if this is not the case. This ensures that directories written in
/var/db/pkg are Administrators-group writeable.
The popular Interix binary packages from http://www.interopsystems.com/ use an
older version of pkgsrc's pkg_* tools. Ideally, these should NOT be used in
conjunction with pkgsrc. If you choose to use them at the same time as the
pkgsrc packages, ensure that you use the proper pkg_* tools for each type of
binary package.
The TERM setting used for DOS-type console windows (including those invoked by
the csh and ksh startup shortcuts) is "interix". Most systems don't have a
termcap/terminfo entry for it, but the following .termcap entry provides
adequate emulation in most cases:
interix:kP=\E[S:kN=\E[T:kH=\E[U:dc@:DC@:tc=pcansi:
Limitations of the Interix platform
-----------------------------------
Though Interix suffices as a familiar and flexible substitute for a full
Unix-like platform, it has some drawbacks that should be noted for those
desiring to make the most of Interix.
X11:
Interix comes with the standard set of X11R6 client libraries, and can run X11
based applications, but it does not come with an X server. Some options are
StarNet X-Win32 http://www.starnet.com/products/xwin32/, Hummingbird Exceed
http://connectivity.hummingbird.com/products/nc/exceed/ (available in a trimmed
version for Interix from Interop Systems as the Interop X Server
http://www.interopsystems.com/InteropXserver.htm), and the free X11 server
included with Cygwin http://x.cygwin.com/.
X11 acceleration:
Because Interix runs in a completely different NT subsystem from Win32
applications, it does not currently support various X11 protocol extensions for
acceleration (such as MIT-SHM or DGA). Most interactive applications to a local
X server will run reasonably fast, but full motion video and other graphics
intensive applications may require a faster-than-expected CPU.
Audio:
Interix has no native support for audio output. For audio support, pkgsrc uses
the esound client/server audio system on Interix. Unlike on most platforms, the
audio/esound package does not contain the esd server component. To output audio
via an Interix host, the emulators/cygwin_esound package must also be installed.
CD/DVDs, USB, and SCSI:
Direct device access is not currently supported in Interix, so it is not
currently possible to access CD/DVD drives, USB devices, or SCSI devices through
non-filesystem means. Among other things, this makes it impossible to use
Interix directly for CD/DVD burning.
Tape drives:
Due to the same limitations as for CD-ROMs and SCSI devices, tape drives are
also not directly accessible in Interix. However, support is in work to make
tape drive access possible by using Cygwin as a bridge (similarly to audio
bridged via Cygwin's esound server).
Known issues for pkgsrc on Interix
----------------------------------
It is not necessary, in general, to have a "root" user on the Windows system;
any member of the local Administrators group will suffice. However, some
packages currently assume that the user named "root" is the privileged user. To
accommodate these, you may create such a user; make sure it is in the local
group Administrators (or your language equivalent).
pkg_add creates directories of mode 0755, not 0775, in $PKG_DBDIR. For the time
being, install packages as the local Administrator (or your language
equivalent), or run the following command after installing a package to work
around the issue:
# chmod -R g+w $PKG_DBDIR

View File

@@ -1,34 +1,111 @@
$NetBSD: README.MacOSX,v 1.20 2015/02/22 17:11:34 gdt Exp $
$NetBSD: README.MacOSX,v 1.32 2016/09/20 00:46:49 gdt Exp $
This file describes the use of current versions of pkgsrc with
multiple versions of Darwin and OS X, omitting information about previous pkgsrc
versions.
* Darwin vs OS X
(Apple has renamed Mac OS X to OS X, but the filename
remains.)
OS X consists of Darwin (kernel/userland) plus Mac stuff on top.
pkgsrc used to target Darwin, but given the tools issued discussed
below it is not clear that it works on Darwin without OS X. Darwin
from Apple is no longer open source.
Users of non-OS X Darwin are invited to submit patches to this file.
The only known project is:
http://www.puredarwin.org/
Until then, this file remains OS X-centric.
* OS X specific bootstrap arguments
Providing the --binary-macpkg flag to the bootstrap script causes it
to prepare a bootstrap kit as a native OS X package instead of using
the conventional .tar.bz2 format. This requires the package-maker
application to be installed.
* system tools issues
** native headers vs SDK
OS X used to include system headers in /usr/include, so that one
could treat it like a relatively normal POSIX system. Starting at
approximately 10.9, headers were no longer available at the standard
location, and one has to use an SDK that puts headers someplace else.
pkgsrc supports this, but there has been some confusion where a 10.9
system produced binaries for 10.10, which only mostly works. The
confusion is believed to be resolved.
** gcc vs clang
Older versions of Mac OS X (when XCode is installed) provided gcc, and
Older versions of OS X (when XCode is installed) provided gcc, and
pkgsrc defaulted to using gcc. With 10.9, gcc is no longer present.
(In 2014Q2 and earlier, one must explicitly bootstrap with
"--compiler=clang".)
** i386 vs x86_64 ABI issue
Mac OS X 10.6 through 10.10 supports 64-bit binaries on most Intel
Macs and builds those by default on such machine. This has caused
problems with packages which get confused because "MACHINE_ARCH" is in
some OS versions set to "i386" (on a 64-bit system!).
This entire section is only about Intel Macs.
OS X 10.6 and higher supports x86-64 binaries on Intel Macs with
x86-64 processors, which is now most of them. i386 binaries are also
supported on most (all?) Intel machines.
*** issues related to ABI 32 vs 64
Note that a pkgsrc package built in x86_64 mode will not run on an
Intel Mac that is i386 only. For a longer discussion, see:
http://mail-index.NetBSD.org/pkgsrc-users/2009/09/24/msg010817.html
Somewhat separately from pkgsrc's ABI choice, there have been issues
with packages which get confused because "MACHINE_ARCH" is in some OS
versions set to "i386" (on a 64-bit system!). As of 2016 this should
be mostly resolved.
version: uname -m : uname -p
10.6: i386 : i386
10.9: x86_64 : i386
There are of course some packages which will fail in i386 mode, and
some in x86_64 mode. Because of all this, the default for pkgsrc was
set to use the 32-bit ABI, which results in packages being compiled
and run in i386 mode. In addition, there are some Intel Macs (older
Mac Minis) which can only run i386 and not x86_64. For a longer
discussion, see:
http://mail-index.NetBSD.org/pkgsrc-users/2009/09/24/msg010817.html
*** default ABI
As of 2014, the decision to default to i386 should probably be
revisited.
The ABI is chosen at bootstrap time and encoded into mk.conf. So a
change in the default is about what a new bootstrap will do;
already-bootstrapped systems should remain unchanged. They should be
able to build and run new packages using the old ABI value.
pkgsrc used to set the default ABI as i386, both on systems with i386
processors and on systems with x86_64 processors. On 2015-11-09 the
default was changed so that ABI=64 is chosen on machines where "uname
-m" reports x86_64. (It remains i386 on others, which are not capable
of running x86_64 binaries.)
Generally, users will not need to deal with the default ABI change,
except that packages are mostly only portable across machines with the
same bootstrapping parameters.
If one unpacks a new binary bootstrap kit over an existing
installation, one can end up with a mix. The standard advice is not to
do this, and to rrebuild/reinstall all packages from scratch or a
compatible binary package set. But, one could also mark packages with
the wrong ABI as rebuild=YES and use pkg_rolling-replace.
*** change in storage of ABI information
On 2016-01-24, the way ABI information was stored in pkgsrc was
rationalized and simplified. The new code could compute the wrong ABI
for some previously-bootstrapped installations. The problem can be
resolved by building bmake with MACHINE_ARCH=x86_64 and updating that
package, as described in mail archives:
https://mail-index.netbsd.org/pkgsrc-users/2016/01/25/msg022870.html
(One would expect to be able to use make replace to do this. One
minor issue is that it requires pkg_tarup, although that will be
present on systems of those who use make replace. There also may be
an error with architecture mismatch from pkg_install requiring a "-f"
option. Repeatable data about recovery is somewhat hard to obtain, as
most are past this issue already and no longer interested in
experimenting.)
** sed in 10.9
@@ -38,83 +115,107 @@ Therefore, pkgsrc uses nbsed on 10.9.
* Developer tools and prerequisites
** basic tools
** XCode
If you haven't already, you will need to install the Mac OS X
This section applies to 10.6 through 10.10.
If you haven't already, you will need to install the OS X
Developer Tools package (XCode) to obtain a compiler, etc. The
procedure depends on the version of Mac OS X; recent versions use the
procedure depends on the version of OS X; recent versions use the
App Store.
Note that as of 10.9, cvs is no longer provided. You can build
** Command-line Tools
In 10.11, XCode has been reported as unsuitable [TODO: add details,
but it seems it doesn't include an SDK for itself]. Instead, it is
recommend to install command-line tools.
Command Line Tools for Xcode can be obtained from
https://developer.apple.com/downloads/
Since Xcode 7 (installed from the Apple Store) the development
environment can upgrade itself without interaction from the user, but
will not automatically update the Command Line Tools. This will
cause system header files like stdlib.h not to be found by pkgsrc.
The command `xcode-select --install' will install the Command Line
Tools for Xcode.
** cvs
Note that as of 10.9, cvs is no longer provided by Apple. You can build
devel/scmcvs. To obtain pkgsrc in order to bootstrap and build cvs,
it may be useful to `git clone https://github.com/jsonn/pkgsrc.git`.
** X11
X11 used to be built into Mac OS X, but as of 10.8 it is no longer
included. Install XQuartz from http://xquartz.macosforge.org/landing/
X11 used to be built into OS X, but as of 10.8 it is no longer
included. You can install XQuartz from
http://xquartz.macosforge.org/landing/, or try the newly-added pkgsrc
version.
* Mac OS X Versions
* OS X Versions
pkgsrc is a volunteer project, and individuals support/fix packages
and platforms as they choose. However, pkgsrc contributors as a group
share both a bugtracker and norms about what is ok to break and what
is not. To describe these norms, we define levels of concern, keeping
in mind that there are no guarantees:
Because Apple drops support for previous hardware faster than the
hardware fails, many machines cannot be upgraded to recent versions of
OS X, creating a greater than usual desire to support old systems.
Because of the particular history of deprecation, most systems tend to
run relatively recent versions or specific older versions (10.6 and
10.5).
SUPPORTED doesn't mean that anyone is required to fix your problem; it
means that we agree that it is broadly desireable that such problems
be fixed and that we therefore allow them to be listed in our issue
tracker. Structural breakage is unacceptable.
The stance of pkgsrc is generally to avoid breaking older systems
unless keeping support would cause difficulty, and to accept clean
patches when there is no harm to non-deprecated versions. This
section is partly to document what versions tend to be used and why,
and partly to enable cleaning up bug reports without fixes for very
old systems.
DEPRECATED means that individual problems are not of interest, but
pkgsrc overall working is of enough interest to be allowed to be
listed in the issue tracker. Structural breakage is undesirable,
but a fair topic of discussion if keeping support is painful.
Individual pkg PRs may be bounced to authors to retest with newer
versions, and closed if that doesn't happen in 14 days.
pkgsrc PRs about 10.5 or older that do not contain fixes may be closed
without fixing.
IGNORED means we are not willing to expend issue tracker resources
(clutter for those reviewing the db) at all. PRs may be summarily
closed. We are also unconcerned with whether pkgsrc works on the
system at all.
OS X 10.11 is considered new and there may be issues.
Given the above definitions, the pkgsrc developers label versions of
Mac OS X as follows:
OS X 10.10 is considered current.
10.10: current. [SUPPORTED]
OS X 10.9 (Darwin 13.4.0) is considered current.
10.9 (13.1.0): somewhat old but not that crufty. [SUPPORTED]
OS X 10.8 is old, and there are no no known reasons to it instead of a
newer version.
10.8: old. [SUPPORTED]
OS X 10.7 is the last version that works on a few Intel Macs, e.g. the
Mac Pro 1.1 and 2.1 and some Mac Minis.
10.7: old. [SUPPORTED]
OS X 10.6 is the last version that works on Intel Macs lacking amd64
support, e.g. Mac Minis and Macbooks with Core Duo. (There is an
active bulk build for 10.6.)
10.6 (10.8.0): very old [DEPRECATED] (But note that this is the
Joyent i386-mode build target.)
OS X 10.5 is the last version that works on PowerPC Macs. As of 2015
reports of using 10.5 are very rare.
10.5 and below: ancient, and PRs will be summarily closed. It is
acceptable to give zero consideration to causing structural
problems on 10.5 and below. [IGNORED]
Because Apple provides 10.9 as a no-cost upgrade (from 10.6 or higher,
it is fairly likely that 10.6-10.8 will become DEPRECATED faster than
they might have otherwise. (The rationale for supporting versions
beyond the current and previous ones has been the difficulty for users
to upgrade.)
OS X 10.4 (Darwin 8.11.0) is the last version that works on PowerPC G3
and slower G4 Macs.
* Bulk builds
Clearly, it is desirable for a bulk build to be useful on as many
computers as possible. The main issues are which ABI and which OS X
version. Targetting older versions makes a build run on more systems,
and targetting newer versions makes the build closer to what would be
obtained from bootstrappping on a newer version and thus avoids some
issues.
version. Targeting older versions makes a build run on more systems,
and targeting newer versions makes the build closer to what would be
obtained from bootstrapping on a newer version and thus avoids some
issues. This section has pointers to active bulk builds.
** 10.6, --abi=32
** 10.4, --abi=32 powerpc, gcc
Joyent provide a bulk build for quarterly branches (--abi=32, OSX
Sevan Janiyan <Sevan@NetBSD.org> provides a bulk build for the -current branch
(--abi=32, OS X 10.4/PowerPC, gcc 4.0.1 from Xcode 2.5, X11_TYPE=modular):
https://www.geeklan.co.uk/?p=1579
US repo: http://sevan.mit.edu/packages
Euro mirror: http://pkgsrc.geeklan.co.uk/packages/current/Darwin-8
See
https://mail-index.netbsd.org/pkgsrc-bulk/2015/11/07/msg012171.html
** 10.6, --abi=32 i386, gcc
Joyent provide a bulk build for quarterly branches (--abi=32, OS X
10.6, and therefore gcc 4.2.1, XQuartz, X11_TYPE=native):
http://pkgsrc.joyent.com/install-on-osx/
which should run on any version from 10.6 and up.
@@ -123,7 +224,7 @@ Note that sed on 10.9 is broken, but a bootstrap on 10.6 will not
avoid it, so while one can install this bootstrap on 10.9 and run
binary packages, building packages will not in general work.
** 10.9, --abi=64 --compiler=clang
** 10.9, --abi=64 x86-64, clang
Joyent provide a build build for 10.9/x86_64, at the same URL as
above.
Joyent provide a bulk build for 10.9/x86_64, and therefore clang, at
the same URL as above.

View File

@@ -1,4 +1,4 @@
$NetBSD: README.MirBSD,v 1.1 2011/01/23 19:07:24 agc Exp $
$NetBSD: README.MirBSD,v 1.2 2016/07/03 14:47:05 sevan Exp $
Please read the general README file as well.
@@ -41,3 +41,6 @@ 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.
The pkgsrc on MirOS page contains more details
https://www.mirbsd.org/pkgsrc.htm

View File

@@ -1,4 +1,4 @@
$NetBSD: README.Solaris,v 1.14 2012/07/13 16:12:41 jperkin Exp $
$NetBSD: README.Solaris,v 1.15 2016/07/03 15:38:12 sevan Exp $
You will need a working C compiler. Any version of gcc >2.8 should
work, 2.95.x and 3.x have been tested. SunPro 5 and 8 have been
@@ -108,4 +108,21 @@ Whichever compiler you use, please ensure the compiler tools and
your $prefix are in your PATH. This includes /usr/ccs/{bin,lib}
and eg. /usr/pkg/{bin,sbin}.
You should set the following variables in your mk.conf file:
CC= cc
CXX= CC
CPP= cc -E
CXXCPP= CC -E
Common problems
---------------
Sometimes, when using libtool, /bin/ksh crashes with a segmentation fault. The
workaround is to use another shell for the configure scripts, for example by
installing shells/bash and adding the following lines to your mk.conf:
CONFIG_SHELL= ${LOCALBASE}/bin/bash
WRAPPER_SHELL= ${LOCALBASE}/bin/bash
Then, rebuild the devel/libtool-base package.
bootstrap-pkgsrc has been tested on Solaris 2.6 -> 10.

View File

@@ -1,6 +1,6 @@
#! /bin/sh
# $NetBSD: bootstrap,v 1.218 2015/06/13 13:15:39 tron Exp $
# $NetBSD: bootstrap,v 1.232 2016/06/22 11:40:16 joerg Exp $
#
# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
# All rights reserved.
@@ -77,10 +77,6 @@ usage="Usage: $0 "'
[ --workdir <workdir> ]
'
# this replicates some of the logic in bsd.prefs.mk. until
# bootstrap-pkgsrc is merged into pkgsrc, we need to determine the
# right value for OPSYS and MACHINE_ARCH.
# strip / for BSD/OS, strip - for HP-UX
opsys=`uname -s | tr -d /-`
@@ -175,7 +171,11 @@ get_abi()
abi_opsys=$@
if [ -n "$abi" ]; then
die "ERROR: $abi_opsys has special ABI handling, --abi not supported (yet)."
case "$abi_opsys" in
IRIX)
die "ERROR: $abi_opsys has special ABI handling, --abi not supported (yet)."
;;
esac
fi
case "$abi_opsys" in
@@ -213,6 +213,24 @@ get_machine_arch_aix()
fi
}
get_machine_arch_darwin()
{
case `uname -p` in
i386)
# Returns "i386" or "x86_64" depending on CPU
echo `uname -m`
;;
powerpc)
# sysctl mib exists on 64-bit hardware
if [ -n "`sysctl -n hw.optional.64bitops 2>/dev/null`" ]; then
echo "powerpc64"
else
echo "powerpc"
fi
;;
esac
}
check_prog()
{
_var="$1"; _name="$2"
@@ -490,7 +508,6 @@ overpath=""
root_user=root
bmakexargs=
need_extras=no
set_machine_arch=no
use_bsdinstall=
case "$opsys" in
AIX)
@@ -509,7 +526,7 @@ Bitrig)
need_awk=no
need_sed=no
set_opsys=no
machine_arch=`uname -m`
machine_arch=`arch -s`
check_compiler=yes
;;
CYGWIN_*)
@@ -537,7 +554,7 @@ Darwin)
need_awk=no
need_sed=no
set_opsys=no
machine_arch=`uname -p`
machine_arch=`get_machine_arch_darwin`
CC=${CC:-"cc -isystem /usr/include"}; export CC
check_compiler=yes
osrev=`uname -r`
@@ -554,7 +571,7 @@ Darwin)
;;
esac
case "$macosx_version" in
10.[8-9]|10.10)
10.[8-9]|10.1[01])
need_awk=yes
need_sed=yes
;;
@@ -676,7 +693,6 @@ IRIX*)
need_sed=yes
set_opsys=yes
machine_arch=mipseb
bmakexargs="MACHINE_ARCH=$machine_arch"
check_compiler=yes
if [ `uname -r` -lt 6 ]; then
# IRIX 5's mkdir bails out with an error when trying to create with the -p
@@ -701,12 +717,6 @@ Linux)
need_sed=no
set_opsys=no
machine_arch=`uname -m | sed -e 's/i.86/i386/'`
# Support multiarch systems.
if [ "$machine_arch" = "x86_64" -a "$abi" = "32" ]; then
machine_arch=i386
set_machine_arch=yes
bmakexargs="MACHINE_ARCH=$machine_arch"
fi
;;
Minix)
root_group=operator
@@ -759,7 +769,7 @@ OpenBSD)
need_awk=no
need_sed=no
set_opsys=no
machine_arch=`uname -m`
machine_arch=`arch -s`
;;
OSF1)
root_group=system
@@ -838,6 +848,34 @@ UnixWare)
;;
esac
# Fixup MACHINE_ARCH to use canonical pkgsrc variants, and support multiarch
# systems via --abi, setting a default $abi based on MACHINE_ARCH if not set.
#
case "$machine_arch/$abi" in
# "amd64" translates to "x86_64", defaults to 64-bit
amd64/32) abi=32 machine_arch=i386 ;;
amd64/*) abi=64 machine_arch=x86_64 ;;
# XXX: hppa untested
hppa/64) abi=64 machine_arch=hppa64 ;;
hppa/*) abi=32 machine_arch=hppa ;;
hppa64/32) abi=32 machine_arch=hppa ;;
hppa64/*) abi=64 machine_arch=hppa64 ;;
# "i386" can support 64-bit, e.g. SunOS, defaults to 32-bit.
i386/64) abi=64 machine_arch=x86_64 ;;
i386/*) abi=32 machine_arch=i386 ;;
# XXX: powerpc untested
powerpc/64) abi=64 machine_arch=powerpc64 ;;
powerpc/*) abi=32 machine_arch=powerpc ;;
powerpc64/32) abi=32 machine_arch=powerpc ;;
powerpc64/*) abi=64 machine_arch=powerpc64 ;;
# "sparc" can support 64-bit, e.g. SunOS, defaults to 32-bit.
sparc/64) abi=64 machine_arch=sparc64 ;;
sparc/*) abi=32 machine_arch=sparc ;;
# x86_64 supports 32-bit/64-bit, defaults to 64-bit.
x86_64/32) abi=32 machine_arch=i386 ;;
x86_64/*) abi=64 machine_arch=x86_64 ;;
esac
# If "--full" is specified, then install all of the platform-independent
# bootstrap software.
#
@@ -865,14 +903,9 @@ if [ $? -ne 0 ]; then
die "ERROR: --make-jobs must be a positive integer argument"
fi
# export OPSYS and MACHINE_ARCH for pkg_install. we only set
# MACHINE_ARCH on platforms where we override bmake's value.
OPSYS=${opsys}
export OPSYS
if [ "${machine_arch}" != "" ]; then
MACHINE_ARCH=${machine_arch}
export MACHINE_ARCH
fi
# export MACHINE_ARCH and OPSYS for bmake and pkg_install.
MACHINE_ARCH=${machine_arch}; export MACHINE_ARCH
OPSYS=${opsys}; export OPSYS
if [ "x$preserve_path" != "xyes" ]; then
PATH="$overpath:$PATH"
@@ -988,9 +1021,6 @@ fi
if [ -n "$abi" ]; then
echo "ABI= $abi" >> ${TARGET_MKCONF}
fi
if [ "$set_machine_arch" = "yes" ]; then
echo "MACHINE_ARCH= $machine_arch" >> ${TARGET_MKCONF}
fi
if [ "$compiler" != "" ]; then
echo "PKGSRC_COMPILER= $compiler" >> ${TARGET_MKCONF}
fi
@@ -1107,25 +1137,25 @@ $shprog ./bootstrap.sh)"
bootstrap_bmake() {
echo_msg "Bootstrapping bmake"
copy_src $pkgsrcdir/devel/bmake/files bmake
run_cmd "(cd $wrkdir/bmake && $shprog configure $configure_quiet_flags --with-default-sys-path=$wrkdir/share/mk --prefix=$wrkdir $bmakexargs)"
run_cmd "(cd $wrkdir/bmake && $shprog configure $configure_quiet_flags --prefix=$wrkdir --with-default-sys-path=$wrkdir/share/mk --with-machine-arch=${machine_arch} $bmakexargs)"
run_cmd "(cd $wrkdir/bmake && $shprog make-bootstrap.sh)"
run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/bmake/bmake $wrkdir/bin/bmake"
}
bootstrap_bmake
bmake="$wrkdir/bin/bmake $make_quiet_flags"
bmake="$wrkdir/bin/bmake"
# build libnbcompat
echo_msg "Building libnbcompat"
copy_src $pkgsrcdir/pkgtools/libnbcompat/files libnbcompat
run_cmd "(cd $wrkdir/libnbcompat; $shprog ./configure $configure_quiet_flags -C --prefix=$prefix --infodir=$infodir --mandir=$mandir --sysconfdir=$sysconfdir --enable-bsd-getopt --enable-db && $bmake -j$make_jobs)"
run_cmd "(cd $wrkdir/libnbcompat; $shprog ./configure $configure_quiet_flags -C --prefix=$prefix --infodir=$infodir --mandir=$mandir --sysconfdir=$sysconfdir --enable-bsd-getopt --enable-db && $bmake $make_quiet_flags -j$make_jobs)"
# bootstrap ksh if necessary
case "$need_ksh" in
yes) echo_msg "Bootstrapping ksh"
copy_src $pkgsrcdir/shells/pdksh/files ksh
test -n "$CC" || CC=gcc # default to gcc if no compiler is specified
run_cmd "(cd $wrkdir/ksh && env $BSTRAP_ENV $shprog ./configure $configure_quiet_flags --prefix=$prefix --infodir=$infodir --mandir=$mandir --sysconfdir=$sysconfdir && $bmake -j$make_jobs)"
run_cmd "(cd $wrkdir/ksh && env $BSTRAP_ENV $shprog ./configure $configure_quiet_flags --prefix=$prefix --infodir=$infodir --mandir=$mandir --sysconfdir=$sysconfdir && $bmake $make_quiet_flags -j$make_jobs)"
run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/ksh/ksh $wrkdir/bin/pdksh"
echo "TOOLS_PLATFORM.sh?= $prefix/bin/pdksh" >> ${TARGET_MKCONF}
echo "TOOLS_PLATFORM.sh?= $wrkdir/bin/pdksh" >> ${BOOTSTRAP_MKCONF}
@@ -1143,7 +1173,7 @@ case "$need_awk" in
yes) echo_msg "Bootstrapping awk"
copy_src $pkgsrcdir/lang/nawk/files awk
test -n "$CC" || CC=gcc # default to gcc if no compiler is specified
run_cmd "(cd $wrkdir/awk && $bmake -j$make_jobs -f Makefile CC=\"${CC}\" CFLAGS=\"${CFLAGS}\")"
run_cmd "(cd $wrkdir/awk && $bmake $make_quiet_flags -j$make_jobs -f Makefile CC=\"${CC}\" CFLAGS=\"${CFLAGS}\")"
run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/awk/a.out $wrkdir/bin/nawk"
echo "TOOLS_PLATFORM.awk?= $prefix/bin/nawk" >> ${TARGET_MKCONF}
echo "TOOLS_PLATFORM.awk?= $wrkdir/bin/nawk" >> ${BOOTSTRAP_MKCONF}
@@ -1154,7 +1184,7 @@ esac
case "$need_sed" in
yes) echo_msg "Bootstrapping sed"
copy_src $pkgsrcdir/textproc/nbsed/files sed
run_cmd "(cd $wrkdir/sed; env $BSTRAP_ENV CPPFLAGS='$CPPFLAGS -I../libnbcompat' LDFLAGS='$LDFLAGS -L../libnbcompat' LIBS='$LIBS -lnbcompat' $shprog ./configure $configure_quiet_flags -C --prefix=$prefix --infodir=$infodir --mandir=$mandir --sysconfdir=$sysconfdir --program-transform-name='s,sed,nbsed,' && $bmake -j$make_jobs)"
run_cmd "(cd $wrkdir/sed; env $BSTRAP_ENV CPPFLAGS='$CPPFLAGS -I../libnbcompat' LDFLAGS='$LDFLAGS -L../libnbcompat' LIBS='$LIBS -lnbcompat' $shprog ./configure $configure_quiet_flags -C --prefix=$prefix --infodir=$infodir --mandir=$mandir --sysconfdir=$sysconfdir --program-transform-name='s,sed,nbsed,' && $bmake $make_quiet_flags -j$make_jobs)"
run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/sed/sed $wrkdir/bin/sed"
echo "TOOLS_PLATFORM.sed?= $prefix/bin/nbsed" >> ${TARGET_MKCONF}
echo "TOOLS_PLATFORM.sed?= $wrkdir/bin/sed" >> ${BOOTSTRAP_MKCONF}
@@ -1163,16 +1193,29 @@ esac
# bootstrap pkg_install
echo_msg "Bootstrapping pkgtools"
copy_src $pkgsrcdir/archivers/libarchive/files libarchive
run_cmd "(cd $wrkdir/libarchive; env $BSTRAP_ENV \
$shprog ./configure $configure_quiet_flags --enable-static --disable-shared \
--disable-bsdtar --disable-bsdcpio --disable-posix-regex-lib --disable-xattr \
--disable-maintainer-mode --disable-acl --without-zlib --without-bz2lib \
--without-lzmadec --without-iconv --without-lzma --without-lzo2 \
--without-nettle --without-openssl --without-xml2 --without-expat \
MAKE=$bmake && $bmake $make_quiet_flags -j$make_jobs)"
copy_src $pkgsrcdir/pkgtools/pkg_install/files pkg_install
run_cmd "(cd $wrkdir/pkg_install; env $BSTRAP_ENV \
CPPFLAGS='$CPPFLAGS -I../libnbcompat -I../../libnbcompat' \
LDFLAGS='$LDFLAGS -L../libnbcompat -L../../libnbcompat' \
CPPFLAGS='$CPPFLAGS -I${wrkdir}/libnbcompat -I${wrkdir}/libarchive/libarchive' \
LDFLAGS='$LDFLAGS -L${wrkdir}/libnbcompat' \
LIBS='$LIBS -lnbcompat' $shprog ./configure $configure_quiet_flags -C \
--enable-bootstrap --prefix=$prefix --sysconfdir=$sysconfdir \
--with-pkgdbdir=$pkgdbdir --infodir=$infodir --mandir=$mandir $pkg_install_args && $bmake -j$make_jobs)"
--with-pkgdbdir=$pkgdbdir --infodir=$infodir \
--mandir=$mandir $pkg_install_args && \
STATIC_LIBARCHIVE=$wrkdir/libarchive/.libs/libarchive.a \
PKGSRC_MACHINE_ARCH="$machine_arch" $bmake $make_quiet_flags -j$make_jobs)"
run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/add/pkg_add $wrkdir/sbin/pkg_add"
run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/admin/pkg_admin $wrkdir/sbin/pkg_admin"
run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/create/pkg_create $wrkdir/sbin/pkg_create"
run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/pkg_install/info/pkg_info $wrkdir/sbin/pkg_info"
echo "PKG_ADD_CMD?= $wrkdir/sbin/pkg_add" >> ${BOOTSTRAP_MKCONF}
echo "PKG_ADMIN_CMD?= $wrkdir/sbin/pkg_admin" >> ${BOOTSTRAP_MKCONF}
echo "PKG_CREATE_CMD?= $wrkdir/sbin/pkg_create" >> ${BOOTSTRAP_MKCONF}
echo "PKG_INFO_CMD?= $wrkdir/sbin/pkg_info" >> ${BOOTSTRAP_MKCONF}
@@ -1246,7 +1289,7 @@ echo ".endif # end pkgsrc settings" >> ${BOOTSTRAP_MKCONF}
# build and register packages
# usage: build_package <packagedirectory> [additional arguments]
build_package() {
run_cmd "(cd $pkgsrcdir/$1 && $bmake MAKE_JOBS=${make_jobs} USE_DESTDIR=no -DPKG_PRESERVE MAKECONF=${BOOTSTRAP_MKCONF} install)"
run_cmd "(cd $pkgsrcdir/$1 && $bmake $make_quiet_flags MAKE_JOBS=${make_jobs} PKG_COMPRESSION=none -DPKG_PRESERVE MAKECONF=${BOOTSTRAP_MKCONF} install)"
}
#