Import of pkgsrc-2014Q1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$NetBSD: README.FreeBSD,v 1.4 2010/12/02 17:12:39 asau Exp $
|
||||
$NetBSD: README.FreeBSD,v 1.6 2013/12/16 10:43:09 asau Exp $
|
||||
|
||||
Please read the general README file as well.
|
||||
|
||||
@@ -6,10 +6,10 @@ Care should be taken so that the tools that this kit installs do not conflict
|
||||
with the FreeBSD userland tools. There are several steps:
|
||||
|
||||
1. FreeBSD stores its ports pkg database in /var/db/pkg. It is therefore
|
||||
recommended that you choose a different location (e.g. /usr/pkgdb) by
|
||||
recommended that you choose a different location (e.g. /usr/pkg/pkgdb) by
|
||||
using the --pkgdbdir option to the bootstrap script.
|
||||
|
||||
2. If you do not intend to use the FreeBSD ports tools, it's probably a
|
||||
2. If you do not intend to use the FreeBSD ports tools, it may be a
|
||||
good idea to move them out of the way to avoid confusion, e.g.:
|
||||
cd /usr/sbin
|
||||
mv pkg_add pkg_add.orig
|
||||
@@ -21,4 +21,4 @@ Alternatively, take care to get pkgsrc tools first in PATH.
|
||||
|
||||
|
||||
bootstrap-pkgsrc has been tested on FreeBSD 4.x and 5.x (i386).
|
||||
pkgsrc works well on FreeBSD 6.2-6.4, 7.1-7.3 (i386).
|
||||
pkgsrc works well on FreeBSD 6.2-6.4, 7.1-7.3 (i386), 9.0-9.1 (amd64).
|
||||
|
||||
11
bootstrap/README.GNUkFreeBSD
Normal file
11
bootstrap/README.GNUkFreeBSD
Normal file
@@ -0,0 +1,11 @@
|
||||
$NetBSD: README.GNUkFreeBSD,v 1.4 2013/08/22 13:46:37 ryoon Exp $
|
||||
|
||||
Please read the general README file as well.
|
||||
|
||||
==========================================================================
|
||||
|
||||
Debian GNU/kFreeBSD (it is only GNU/kFreeBSD distribution) need
|
||||
libcurses (libncurses). Installing the distributions libncurses-dev
|
||||
package should fix the problem.
|
||||
|
||||
==========================================================================
|
||||
@@ -1,35 +1,64 @@
|
||||
$NetBSD: README.MacOSX,v 1.14 2013/02/06 15:25:24 schmonz Exp $
|
||||
$NetBSD: README.MacOSX,v 1.17 2014/03/18 01:28:26 gdt Exp $
|
||||
|
||||
* system tools issues
|
||||
|
||||
Mac OS X Snow Leopard 32/64 (i386/x86_64) ABI issue:
|
||||
** gcc vs clang
|
||||
|
||||
Mac OS X Snow Leopard (10.6) supports 64-bit binaries on most Intel
|
||||
Macs and builds those by default on such machine. This causes
|
||||
problems with a lot of packages which get confused because
|
||||
"MACHINE_ARCH" is set to "i386" (on a 64-bit system!). There are also
|
||||
packages that don't support 64-bit under Mac OS X at all. Because of
|
||||
this, the default for pkgsrc is use use the 32-bit ABI, which results
|
||||
in packages being compiled and run in i386 mode. For a longer
|
||||
Older versions of Mac OS X (with XCode, of course) provided gcc, and
|
||||
pkgsrc defaulted to using gcc. With 10.9, gcc is no longer present
|
||||
and one must bootstrap with "--compiler=clang". (Arguably, pkgsrc
|
||||
should default to clang on 10.9.)
|
||||
|
||||
** i386 vs x86_64 ABI issue
|
||||
|
||||
Mac OS X Snow Leopard (10.6) through Mavericks (10.9) supports 64-bit
|
||||
binaries on most Intel Macs and build 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!).
|
||||
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
|
||||
|
||||
As of 2014, the decision to default to i386 should probably be
|
||||
revisited.
|
||||
|
||||
Developer tools:
|
||||
** sed in 10.9
|
||||
|
||||
If you haven't already, you will need to install the Mac OS X Developer
|
||||
Tools package. Depending on the version of OS X you are running, you
|
||||
may have this on CD. If not, you can download it from Apple's
|
||||
Developer Connection. (You will need to register for a free ADC
|
||||
account.) See http://developer.apple.com/macosx/ for details.
|
||||
(If you don't want or need the full Xcode GUI, download and install
|
||||
Command Line Tools for Xcode.)
|
||||
The sed that comes with 10.9 appears to be broken; it exits when
|
||||
called on files with UTF-8 or other apparently-binary content.
|
||||
Therefore, pkgsrc uses nbsed on 10.9.
|
||||
|
||||
Then start Xcode, go to "Preferences" - "Downloads" and install
|
||||
the "Command Line Tools".
|
||||
* Developer tools and prerequisites
|
||||
|
||||
If you plan to build packages that use the X11 Window System, you
|
||||
will also need to make sure you have an Xserver installed. Download
|
||||
XQuartz from http://xquartz.macosforge.org/landing/
|
||||
** basic tools
|
||||
|
||||
If you haven't already, you will need to install the Mac 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
|
||||
App Store.
|
||||
|
||||
Note that as of 10.9, cvs is no longer provided. You can build
|
||||
devel/scmcvs. To obtain pkgsrc in order to bootstrap and build cvs,
|
||||
it may be useful to use git to clone https://github.com/jsonn/pkgsrc
|
||||
|
||||
** X11
|
||||
|
||||
X11 used to be built into Mac OS X, but as of 10.8 it is not.
|
||||
Install XQuartz from http://xquartz.macosforge.org/landing/
|
||||
|
||||
** XL compiler
|
||||
|
||||
[The text in this section dates from 2004-10-07! Please update it if
|
||||
you have used XL since then.]
|
||||
|
||||
Experimental support for IBM's XL C/C++ compiler is present (tested
|
||||
with version 6.0). To use it, set:
|
||||
@@ -56,8 +85,7 @@ to bootstrap with xlc, you need to make sure CFLAGS contains "-ma":
|
||||
|
||||
env CC=/opt/ibmcmp/vacpp/6.0/bin/xlc CFLAGS=-ma ./bootstrap
|
||||
|
||||
|
||||
Mac OS X Versions
|
||||
* Mac OS X Versions
|
||||
|
||||
pkgsrc is a volunteer project, and individuals support/fix packages
|
||||
and platforms as they choose. However, pkgsrc contributors as a group
|
||||
@@ -80,19 +108,55 @@ in mind that there are no guarantees:
|
||||
Given the above definitions, the pkgsrc developers label versions of
|
||||
Mac OS X as follows:
|
||||
|
||||
10.8: current, PRs may be filed. Structurally breaking pkgsrc on 10.8
|
||||
is considered not ok. [SUPPORTED]
|
||||
10.9 (13.1.0): current, PRs may be filed. Structurally breaking
|
||||
pkgsrc on 10.9 is considered not ok. [SUPPORTED]
|
||||
|
||||
10.7: old, but PRs may still be filed. Structurally breaking pkgsrc on
|
||||
10.7 is considered not ok. [SUPPORTED]
|
||||
10.8: somewhat old, PRs may still be filed. Structurally breaking
|
||||
pkgsrc on 10.8 is considered not ok. [SUPPORTED]
|
||||
|
||||
10.6: very old, and individual pkg PRs may be bounced to authors to
|
||||
retest with newer versions, and closed if that doesn't happen
|
||||
in 14 days. We will for now consider structurally breaking
|
||||
pkgsrc on 10.6 to be undesirable. If keeping support for 10.6
|
||||
causes excessive work for maintainers it may be moved to
|
||||
IGNORED state any time, without warning. [DEPRECATED]
|
||||
10.7: old, but PRs may still be filed. Structurally breaking pkgsrc
|
||||
on 10.7 is considered not ok. [SUPPORTED]
|
||||
|
||||
10.6 (10.8.0): very old, and individual pkg PRs may be bounced to
|
||||
authors to retest with newer versions, and closed if that
|
||||
doesn't happen in 14 days. We will for now consider
|
||||
structurally breaking pkgsrc on 10.6 to be undesirable. If
|
||||
keeping support for 10.6 causes excessive work for maintainers
|
||||
it may be moved to IGNORED state any time, without
|
||||
warning. [DEPRECATED]
|
||||
|
||||
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.)
|
||||
|
||||
* Bulk build suggestions and issues
|
||||
|
||||
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.
|
||||
|
||||
** 10.6, --abi=32
|
||||
|
||||
jperkin@netbsd.org provides a bulk build for quarterly branches
|
||||
(--abi=32, OSX 10.6, and therefore gcc 4.2.1, XQuartz,
|
||||
X11_TYPE=native):
|
||||
http://www.perkin.org.uk/pages/pkgsrc-binary-packages-for-osx.html
|
||||
http://mail-index.netbsd.org/pkgsrc-bulk/2014/01/10/msg010276.html
|
||||
which should run on any version from 10.6 to 10.9.
|
||||
|
||||
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
|
||||
|
||||
Given the 10.9 license situation, a bulk build on 10.9 (and therefore
|
||||
clang) seems reasonable, with either --abi=32 or --abi=64. Such
|
||||
builds are almost certainly only usable on 10.9, but that is or will
|
||||
be soon a large fraction of Macs.
|
||||
|
||||
247
bootstrap/README.OpenServer5
Normal file
247
bootstrap/README.OpenServer5
Normal file
@@ -0,0 +1,247 @@
|
||||
$NetBSD: README.OpenServer5,v 1.1 2014/03/14 21:54:25 ryoon Exp $
|
||||
|
||||
XXX You should change your /bin/sh to shells/pdksh under OpenServer 5.0.7/3.2!!
|
||||
|
||||
Supported platforms
|
||||
===================
|
||||
- Xinuos SCO OpenServer 5.0.7/3.2
|
||||
|
||||
Prerequisite softwares
|
||||
======================
|
||||
- SCO OpenServer 5 Development System with Maintenance Pack 4 update
|
||||
- GCC 4.2.4
|
||||
- GNU binutils 2.24
|
||||
|
||||
Compiler
|
||||
========
|
||||
C compiler that is shipped with OpenServer 5 Development System cannot
|
||||
build pkgsrc/devel/bmake. Please use GCC 4.2.4 built from scratch.
|
||||
You can follow "How to build gcc-4.2.4 for SCO OpenServer 5.0.7/.3.2"
|
||||
steps.
|
||||
|
||||
Prebuilt GCC is not available, because it contains proprietary header files
|
||||
in its directory structure (GCC fixincludes mechanism).
|
||||
|
||||
Selecting which ABI to use
|
||||
==========================
|
||||
Xinuos SCO OpenServer 5.0.7 can handle COFF and ELF binaries.
|
||||
I have tested only ELF binaries.
|
||||
But OpenServer 5.0.7's native CC generates COFF by default.
|
||||
|
||||
Start bootstrapping pkgsrc
|
||||
==========================
|
||||
PREFER_PKGSRC=yes build is recommended.
|
||||
|
||||
# ./bootstrap --prefer-pkgsrc yes
|
||||
|
||||
And you must remove libtool-base that is built and installed during
|
||||
bootstrap with
|
||||
|
||||
$ pkg_delete -ff libtool-base
|
||||
|
||||
It contains the path to bootstrap working directory and does not work properly.
|
||||
And rm command cannot accept "rm -f". You should install sysutils/coreutils
|
||||
and put the following line to your mk.conf.
|
||||
|
||||
TOOLS_PLATFORM.rm?=/a/pkg/bin/grm
|
||||
|
||||
How to build gcc-4.2.4 for SCO OpenServer 5.0.7/.3.2
|
||||
====================================================
|
||||
To follow these steps, you must have SCO OpenServer 5 Development System.
|
||||
|
||||
OpenServer 5.0.7's tar command does not support builtin gzip or bzip2
|
||||
support. You should use pipe.
|
||||
|
||||
$ gzcat make-3.79.1.tar.gz | tar xvf -
|
||||
|
||||
For configure newer GNU packages, you should replace your /bin/sh with
|
||||
ksh from pkgsrc/shells/pdksh!!
|
||||
|
||||
|
||||
1. Build GNU make 3.79.1 from make-3.79.1.tar.gz
|
||||
Use OpenServer's native CC, AS, LD, and MAKE.
|
||||
|
||||
$ cd make-3.79.1
|
||||
$ ./configure --prefix=$HOME/tools
|
||||
$ make
|
||||
$ make install
|
||||
|
||||
2. Build GCC 2.95.3 C compiler from GNU official gcc-core-2.95.3.tar.gz
|
||||
with minimal patch (*1)
|
||||
Use OpenServer's native CC, AS, LD, and GNU make.
|
||||
In this stage, you cannot build C++ compiler with internel compiler error.
|
||||
|
||||
$ mkdir build0
|
||||
$ cd build0
|
||||
$ PATH=$HOME/tools/bin:$PATH ../gcc-2.95.3/configure --prefix=$HOME/tools
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
3. Build GCC 2.95.3 C and C++ compilers from GNU official
|
||||
gcc-core-2.95.3.tar.gz and gcc-g++-2.95.3.tar.gz with minimal patch
|
||||
(*1 and *2)
|
||||
Use OpenServer's native AS, LD, GCC, and GNU make.
|
||||
In this stage, you can build C++ compiler with GCC C compiler.
|
||||
|
||||
$ mkdir build1
|
||||
$ cd build1
|
||||
$ PATH=$HOME/tools/bin:$PATH ../gcc-2.95.3/configure --prefix=$HOME/tools
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
4. Build GNU m4 1.4.3 from m4-1.4.3.tar.gz
|
||||
Use OpenServer's native AS, LD, GNU make, and GCC.
|
||||
|
||||
$ cd m4-1.4.3
|
||||
$ PATH=$HOME/tools/bin:$PATH ./configure --prefix=$HOME/tools
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
5. Build GNU bison 2.0 from bison-2.0.tar.gz
|
||||
Use OpenServer's native AS, LD, GNU make, and GCC.
|
||||
|
||||
$ cd bison-2.0
|
||||
$ PATH=$HOME/tools/bin:$PATH ./configure --prefix=$HOME/tools
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
6. Build flex 2.5.4 from flex-2.5.4a.tar.bz2
|
||||
Use OpenServer's native AS, LD, GNU make, and GCC.
|
||||
|
||||
$ cd flex-2.5.4a
|
||||
$ PATH=$HOME/tools/bin:$PATH ./configure --prefix=$HOME/tools
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
7. Build texinfo 4.8 with texinfo-4.8.tar.gz
|
||||
Use OpenServer's native AS, LD, GNU make, and GCC.
|
||||
|
||||
$ cd texinfo-4.8
|
||||
$ PATH=$HOME/tools/bin:$PATH ./configure --prefix=$HOME/tools
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
8. Build GNU gperf 2.7.2 from gperf-2.7.2.tar.gz
|
||||
Use OpenServer's native AS, LD, GNU make, and GCC (including g++).
|
||||
|
||||
$ cd gperf-2.7.2
|
||||
$ PATH=$HOME/tools/bin:$PATH ./configure --prefix=$HOME/tools
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
9. Build GCC 2.95.3pl4 (bootstrap) from Xinuos gnutools-5.0.7Kj-SRC.tar.bz2
|
||||
Use OpenServer's native LD, AS, GNU make, and GCC.
|
||||
|
||||
$ mkdir build2
|
||||
$ cd build2
|
||||
$ PATH=$HOME/tools/bin:$PATH ../gcc-2.95.3/configure --prefix=$HOME/tools
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make bootstrap
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
10. Build GNU binutils 2.14pl1 from Xinuos gnutools-5.0.7Kj-SRC.tar.bz2
|
||||
Use OpenServer's native LD, AS, GNU make, and GCC.
|
||||
LD from binutils is not available.
|
||||
|
||||
$ mkdir binutils-build0
|
||||
$ cd binutils-build0
|
||||
$ PATH=$HOME/tools/bin:$PATH ../binutils-2.14/configure --prefix=$HOME/tools2
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make
|
||||
$ PATH=$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
11. Build GCC 2.95.3pl4 (bootstrap) again
|
||||
Use OpenServer's native LD, GNU binutils (AS), GNU make, and GCC.
|
||||
|
||||
$ mkdir build3
|
||||
$ cd build3
|
||||
$ PATH=$HOME/tools2/bin:$HOME/tools/bin:$PATH ../gcc-2.95.3/configure --prefix=$HOME/tools2 --with-gnu-as
|
||||
$ PATH=$HOME/tools2/bin:$HOME/tools/bin:$PATH $HOME/tools/bin/make bootstrap
|
||||
$ PATH=$HOME/tools2/bin:$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
12. Build GNU binutils 2.14pl1 from Xinuos gnutools-5.0.7Kj-SRC.tar.bz2
|
||||
Use OpenServer's native LD, AS, GNU make, and GCC.
|
||||
|
||||
$ mkdir binutils-build1
|
||||
$ cd binutils-build1
|
||||
$ PATH=$HOME/tools2/bin:$PATH ../binutils-2.14/configure --prefix=$HOME/tools3
|
||||
$ PATH=$HOME/tools2/bin:$PATH $HOME/tools/bin/make
|
||||
$ PATH=$HOME/tools2/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
13. Build GCC 4.2.4 with patch (*3)
|
||||
Use OpenServer's native LD, GNU binutils (AS), GNU make, and GCC.
|
||||
XXX You cannot use native TAR to extract GCC 4.2.4's tar ball!!
|
||||
|
||||
$ mkdir 42build0
|
||||
$ cd 42build0
|
||||
$ PATH=$HOME/tools3/bin:$HOME/tools2/bin:$HOME/tools/bin:$PATH ../gcc-4.2.4/configure --prefix=$HOME/tools3 --with-gnu-as --disable-nls --enable-languages=c
|
||||
$ PATH=$HOME/tools3/bin:$HOME/tools2/bin:$HOME/tools/bin:$PATH $HOME/tools/bin/make
|
||||
$ PATH=$HOME/tools3/bin:$HOME/tools2/bin:$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
14. Build GNU binutils 2.24 with patch (*4)
|
||||
Use OpenServer's native LD, GNU binutils (AS), GNU make, and GCC.
|
||||
|
||||
$ mkdir 224binutils
|
||||
$ cd 224binutils
|
||||
$ PATH=$HOME/tools3/bin:$HOME/tools/bin:$PATH ../binutils-2.24/configure --prefix=$HOME/tools4 --disable-nls --disable-werror
|
||||
$ PATH=$HOME/tools3/bin:$HOME/tools/bin:$PATH ~/tools/bin/make
|
||||
$ PATH=$HOME/tools3/bin:$HOME/tools/bin:$PATH ~/tools/bin/make install
|
||||
|
||||
15. Build GCC 4.2.4 (bootstrap) with patch (*3)
|
||||
Use OpenServer's native LD, GNU binutils (AS), GNU make, and GCC.
|
||||
|
||||
$ mkdir 42build1
|
||||
$ cd 42build1
|
||||
$ PATH=$HOME/tools3/bin:$HOME/tools/bin:$PATH ../gcc-4.2.4/configure --prefix=$HOME/tools4 --with-gnu-as --disable-nls --enable-languages=c
|
||||
$ PATH=$HOME/tools3/bin:$HOME/tools/bin:$PATH $HOME/tools/bin/make bootstrap
|
||||
$ PATH=$HOME/tools3/bin:$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
16. Build GNU binutils 2.24 with patch (*4)
|
||||
Use OpenServer's native LD, GNU binutils (AS), GNU make, and GCC.
|
||||
|
||||
$ mkdir 224binutils
|
||||
$ cd 224binutils
|
||||
$ PATH=$HOME/tools4/bin:$HOME/tools/bin:$PATH ../binutils-2.24/configure --prefix=/opt/prebuilt --disable-nls --disable-werror
|
||||
$ PATH=$HOME/tools4/bin:$HOME/tools/bin:$PATH ~/tools/bin/make
|
||||
# PATH=$HOME/tools4/bin:$HOME/tools/bin:$PATH ~/tools/bin/make install
|
||||
|
||||
17. Build GNU gmp 4.2.4 from gmp-4.2.4.tar.gz
|
||||
Use OpenServer's native LD, GNU binutils (AS), GNU make, and GCC.
|
||||
|
||||
$ cd gmp-4.2.4
|
||||
$ PATH=/opt/prebuilt/bin:$PATH ./configure --prefix=/opt/prebuilt --build=i386-pc-sco3.2v5.0.7
|
||||
$ PATH=$HOME/tools4/bin:$HOME/tools/bin:$PATH ~/tools/bin/make
|
||||
# PATH=$HOME/tools4/bin:$HOME/tools/bin:$PATH ~/tools/bin/make install
|
||||
|
||||
18. Build mpfr 2.3.2 from mpfr-2.3.2.tar.gz
|
||||
Use OpenServer's native LD, GNU binutils (AS), GNU make, and GCC.
|
||||
|
||||
$ cd mpfr-2.3.2
|
||||
$ PATH=/opt/prebuilt/bin:$PATH ./configure --prefix=/opt/prebuilt
|
||||
$ PATH=$HOME/tools4/bin:$HOME/tools/bin:$PATH ~/tools/bin/make
|
||||
# PATH=$HOME/tools4/bin:$HOME/tools/bin:$PATH ~/tools/bin/make install
|
||||
|
||||
19. Build GNU mpc 0.8.2 from mpc-0.8.2.tar.gz
|
||||
Use OpenServer's native LD, GNU binutils (AS), GNU make, and GCC.
|
||||
|
||||
$ cd mpc-0.8.2
|
||||
$ PATH=/opt/prebuilt/bin:$PATH ./configure --prefix=/opt/prebuilt
|
||||
$ PATH=$HOME/tools4/bin:$HOME/tools/bin:$PATH ~/tools/bin/make
|
||||
# PATH=$HOME/tools4/bin:$HOME/tools/bin:$PATH ~/tools/bin/make install
|
||||
|
||||
20. Build GCC 4.2.4 fullset (bootstrap) with patch (*3)
|
||||
Use OpenServer's native LD, GNU binutils (AS), GNU make, and GCC.
|
||||
After this step, it is ready to bootstrap pkgsrc with GCC 4.2.4.
|
||||
|
||||
$ mkdir 42build2
|
||||
$ cd 42build2
|
||||
$ PATH=$HOME/tools4/bin:$HOME/tools/bin:$PATH ../gcc-4.2.4/configure --prefix=/opt/prebuilt --with-gnu-as --disable-nls
|
||||
$ PATH=$HOME/tools4/bin:$HOME/tools/bin:$PATH $HOME/tools/bin/make bootstrap
|
||||
# PATH=$HOME/tools4/bin:$HOME/tools/bin:$PATH $HOME/tools/bin/make install
|
||||
|
||||
Patches
|
||||
=======
|
||||
There are in
|
||||
http://ftp.netbsd.org/pub/NetBSD/misc/ryoon/SCO-OpenServer-5.0.7_3.2/ .
|
||||
(*1) gcc-2.95.3-SCO-OpenServer5.0.7_3.2-C-fix.diff
|
||||
(*2) gcc-2.95.3-SCO-OpenServer5.0.7_3.2-C++-fix.diff
|
||||
(*3) gcc-4.2.4-SCO-OpenServer-5.0.7_3.2.diff
|
||||
(*4) binutils-2.24-SCO-OpenServer-5.0.7_3.2.diff
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
# $NetBSD: bootstrap,v 1.194 2013/06/14 15:07:37 tron Exp $
|
||||
# $NetBSD: bootstrap,v 1.204 2014/03/14 21:52:13 ryoon Exp $
|
||||
#
|
||||
# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
|
||||
# All rights reserved.
|
||||
@@ -63,6 +63,7 @@ usage="Usage: $0 "'
|
||||
[ --help ]
|
||||
[ --mk-fragment <mk.conf> ]
|
||||
[ --pkgdbdir <pkgdbdir> ]
|
||||
[ --pkginfodir <pkginfodir> ]
|
||||
[ --pkgmandir <pkgmandir> ]
|
||||
[ --prefer-pkgsrc <list|yes|no> ]
|
||||
[ --prefix <prefix> ]
|
||||
@@ -147,6 +148,15 @@ get_compiler()
|
||||
IFS="${save_IFS}"
|
||||
fi
|
||||
|
||||
# Clang compiler pretends to be GCC, so we have to check that
|
||||
cat >${wrkdir}/$$.c <<EOF
|
||||
#ifdef __clang__
|
||||
indeed
|
||||
#endif
|
||||
EOF
|
||||
compiler_is_clang=`${testcc:-cc} -E ${wrkdir}/$$.c 2>/dev/null | grep -c indeed`
|
||||
rm -f ${wrkdir}/$$.c
|
||||
|
||||
cat >${wrkdir}/$$.c <<EOF
|
||||
#ifdef __GNUC__
|
||||
indeed
|
||||
@@ -299,6 +309,12 @@ copy_src()
|
||||
mkdir_p $wrkdir/$_dst
|
||||
fi
|
||||
$cpprog -r $_src/* $wrkdir/$_dst
|
||||
if [ -f $wrkdir/$_dst/config.guess ]; then
|
||||
$cpprog $pkgsrcdir/mk/gnu-config/config.guess $wrkdir/$_dst/
|
||||
fi
|
||||
if [ -f $wrkdir/$_dst/config.sub ]; then
|
||||
$cpprog $pkgsrcdir/mk/gnu-config/config.sub $wrkdir/$_dst/
|
||||
fi
|
||||
}
|
||||
|
||||
get_optarg()
|
||||
@@ -341,8 +357,10 @@ esac
|
||||
|
||||
# On some newer Ubuntu installations, /bin/sh is a symlink to /bin/dash,
|
||||
# whose echo(1) is not BSD-compatible.
|
||||
# On all Debian GNU/kFreeBSD 7.0, /bin/sh is a symlink to /bin/dash, and
|
||||
# use /bin/bash. bootstrap forces /bin/bash is used.
|
||||
dash_echo_test=`$bootstrap_sh -c 'echo "\\100"'`
|
||||
if [ "$dash_echo_test" = "@" ]; then
|
||||
if [ "$opsys" != "GNUkFreeBSD" ] && [ "$dash_echo_test" = "@" ]; then
|
||||
{ echo "ERROR: Your shell's echo command is not BSD-compatible."
|
||||
echo "ERROR: Please select another shell by setting the environment"
|
||||
echo "ERROR: variable SH."
|
||||
@@ -363,6 +381,7 @@ echo_msg "bootstrap started: $build_start"
|
||||
# whether they will be system wide or user specific
|
||||
prefix=
|
||||
pkgdbdir=
|
||||
pkginfodir=
|
||||
pkgmandir=
|
||||
sysconfdir=
|
||||
varbase=
|
||||
@@ -380,6 +399,8 @@ while [ $# -gt 0 ]; do
|
||||
--prefix) prefix="$2"; shift ;;
|
||||
--pkgdbdir=*) pkgdbdir=`get_optarg "$1"` ;;
|
||||
--pkgdbdir) pkgdbdir="$2"; shift ;;
|
||||
--pkginfodir=*) pkginfodir=`get_optarg "$1"` ;;
|
||||
--pkginfodir) pkginfodir="$2"; shift ;;
|
||||
--pkgmandir=*) pkgmandir=`get_optarg "$1"` ;;
|
||||
--pkgmandir) pkgmandir="$2"; shift ;;
|
||||
--sysconfdir=*) sysconfdir=`get_optarg "$1"` ;;
|
||||
@@ -426,6 +447,7 @@ checkarg_sane_absolute_path "$prefix" "--prefix"
|
||||
checkarg_sane_absolute_path "$pkgdbdir" "--pkgdbdir"
|
||||
checkarg_sane_absolute_path "$sysconfdir" "--sysconfdir"
|
||||
checkarg_sane_absolute_path "$varbase" "--varbase"
|
||||
checkarg_sane_relative_path "$pkginfodir" "--pkginfodir"
|
||||
checkarg_sane_relative_path "$pkgmandir" "--pkgmandir"
|
||||
|
||||
# set defaults for system locations if not already set by the user
|
||||
@@ -441,10 +463,13 @@ fi
|
||||
[ -z "$pkgdbdir" ] && pkgdbdir=${varbase}/db/pkg
|
||||
|
||||
if [ "$prefix" = "/usr" ]; then
|
||||
[ -z "$pkginfodir" ] && pkginfodir=share/info
|
||||
[ -z "$pkgmandir" ] && pkgmandir=share/man
|
||||
else
|
||||
[ -z "$pkginfodir" ] && pkginfodir=info
|
||||
[ -z "$pkgmandir" ] && pkgmandir=man
|
||||
fi
|
||||
infodir=${prefix}/${pkginfodir}
|
||||
mandir=${prefix}/${pkgmandir}
|
||||
[ -z "$sysconfdir" ] && sysconfdir=${prefix}/etc
|
||||
|
||||
@@ -457,6 +482,8 @@ root_user=root
|
||||
bmakexenv=
|
||||
bmakexargs=
|
||||
need_extras=no
|
||||
set_machine_arch=no
|
||||
use_bsdinstall=
|
||||
case "$opsys" in
|
||||
AIX)
|
||||
root_group=system
|
||||
@@ -531,6 +558,23 @@ FreeBSD)
|
||||
need_sed=no
|
||||
set_opsys=no
|
||||
machine_arch=`uname -p`
|
||||
check_compiler=yes
|
||||
;;
|
||||
FreeMiNT)
|
||||
root_group=root
|
||||
need_bsd_install=no
|
||||
need_awk=no
|
||||
need_sed=no
|
||||
set_opsys=no
|
||||
machine_arch=m68k
|
||||
;;
|
||||
GNUkFreeBSD)
|
||||
root_group=root
|
||||
need_bsd_install=no
|
||||
need_awk=yes
|
||||
need_sed=no
|
||||
set_opsys=no
|
||||
machine_arch=`uname -m`
|
||||
;;
|
||||
Haiku)
|
||||
root_user=`id -un`
|
||||
@@ -639,6 +683,12 @@ 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
|
||||
@@ -711,9 +761,21 @@ QNX)
|
||||
whoamiprog="id -un"
|
||||
machine_arch=`uname -p | sed -e 's/x86/i386/'`
|
||||
;;
|
||||
SCO_SV)
|
||||
root_group=root
|
||||
need_awk=yes
|
||||
need_bsd_install=yes
|
||||
need_sed=yes
|
||||
set_opsys=no
|
||||
whoamiprog='id -u'
|
||||
groupsprog='id -g'
|
||||
# /bin/sh under OpenServer 5.0.7/3.2 breaks bmake tests.
|
||||
#bmakexargs="$bmakexargs --with-defshell=/bin/ksh"
|
||||
;;
|
||||
SunOS)
|
||||
root_group=root
|
||||
need_bsd_install=yes
|
||||
use_bsdinstall=yes
|
||||
if [ -x "/usr/gnu/bin/awk" ]; then
|
||||
need_awk=no
|
||||
else
|
||||
@@ -829,7 +891,10 @@ echo "Working directory is: ${wrkdir}"
|
||||
|
||||
if [ "$compiler" = "" ] && [ x"$check_compiler" = x"yes" ]; then
|
||||
get_compiler
|
||||
if [ $compiler_is_gnu -gt 0 ]; then
|
||||
# Clang pretends to be GCC, so we have to check it first.
|
||||
if [ $compiler_is_clang -gt 0 ]; then
|
||||
compiler="clang"
|
||||
elif [ $compiler_is_gnu -gt 0 ]; then
|
||||
compiler="gcc"
|
||||
else
|
||||
case "$opsys" in
|
||||
@@ -900,6 +965,9 @@ 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
|
||||
@@ -939,6 +1007,7 @@ if [ "${sysconfdir}" != "${prefix}/etc" ]; then
|
||||
echo "PKG_SYSCONFBASE= $sysconfdir" >> ${TARGET_MKCONF}
|
||||
fi
|
||||
echo "PKG_TOOLS_BIN= $prefix/sbin" >> ${TARGET_MKCONF}
|
||||
echo "PKGINFODIR= $pkginfodir" >> ${TARGET_MKCONF}
|
||||
echo "PKGMANDIR= $pkgmandir" >> ${TARGET_MKCONF}
|
||||
echo "" >> ${TARGET_MKCONF}
|
||||
|
||||
@@ -950,13 +1019,25 @@ fi
|
||||
BOOTSTRAP_MKCONF=${wrkdir}/mk.conf
|
||||
cp ${TARGET_MKCONF} ${BOOTSTRAP_MKCONF}
|
||||
|
||||
# On all Debian GNU/kFreeBSD 7, /bin/sh is a symlink to /bin/dash, and
|
||||
# use /bin/bash.
|
||||
if [ "$opsys" = "GNUkFreeBSD" -a "$bootstrap_sh_set" != "set" ]; then
|
||||
echo "TOOLS_PLATFORM.sh?= /bin/bash # instead of /bin/sh" >> ${TARGET_MKCONF}
|
||||
echo "TOOLS_PLATFORM.sh?= /bin/bash # instead of /bin/sh" >> ${BOOTSTRAP_MKCONF}
|
||||
echo $opsys
|
||||
fi
|
||||
|
||||
# sbin is used by pkg_install, share/mk by bootstrap-mk-files
|
||||
mkdir_p $wrkdir/sbin $wrkdir/share/mk
|
||||
mkdir_p_early ${wrkdir}
|
||||
|
||||
if [ "$need_bsd_install" = "yes" ]; then
|
||||
BSTRAP_ENV="INSTALL='$prefix/bin/install-sh -c' $BSTRAP_ENV"
|
||||
echo "TOOLS_PLATFORM.install?= $prefix/bin/install-sh" >> ${TARGET_MKCONF}
|
||||
if [ "$use_bsdinstall" = "yes" ]; then
|
||||
echo "TOOLS_PLATFORM.install?= $prefix/bin/bsdinstall" >> ${TARGET_MKCONF}
|
||||
else
|
||||
echo "TOOLS_PLATFORM.install?= $prefix/bin/install-sh" >> ${TARGET_MKCONF}
|
||||
fi
|
||||
echo "TOOLS_PLATFORM.install?= $wrkdir/bin/install-sh" >> ${BOOTSTRAP_MKCONF}
|
||||
fi
|
||||
|
||||
@@ -993,6 +1074,7 @@ $shprog ./bootstrap.sh)"
|
||||
bootstrap_bmake() {
|
||||
echo_msg "Bootstrapping bmake"
|
||||
copy_src $pkgsrcdir/devel/bmake/files bmake
|
||||
run_cmd "chmod u+x $wrkdir/bmake/configure"
|
||||
run_cmd "(cd $wrkdir/bmake && env $bmakexenv $shprog ./boot-strap $configure_quiet_flags -q -o bootstrap.$opsys --prefix=$wrkdir --sysconfdir=$wrkdir --mksrc none --with-default-sys-path="$wrkdir/share/mk" $bmakexargs)"
|
||||
run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/bmake/bootstrap.$opsys/bmake $wrkdir/bin/bmake"
|
||||
}
|
||||
@@ -1003,14 +1085,14 @@ bmake="$wrkdir/bin/bmake $make_quiet_flags"
|
||||
# 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 --mandir=$mandir --sysconfdir=$sysconfdir --enable-bsd-getopt --enable-db && $bmake $make_quiet_flags)"
|
||||
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)"
|
||||
|
||||
# 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 --mandir=$mandir --sysconfdir=$sysconfdir && $bmake)"
|
||||
run_cmd "(cd $wrkdir/ksh && env $BSTRAP_ENV $shprog ./configure $configure_quiet_flags --prefix=$prefix --infodir=$infodir --mandir=$mandir --sysconfdir=$sysconfdir && $bmake)"
|
||||
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}
|
||||
@@ -1039,7 +1121,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 --mandir=$mandir --sysconfdir=$sysconfdir --program-transform-name='s,sed,nbsed,' && $bmake)"
|
||||
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)"
|
||||
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}
|
||||
@@ -1054,7 +1136,7 @@ CPPFLAGS='$CPPFLAGS -I../libnbcompat -I../../libnbcompat' \
|
||||
LDFLAGS='$LDFLAGS -L../libnbcompat -L../../libnbcompat' \
|
||||
LIBS='$LIBS -lnbcompat' $shprog ./configure $configure_quiet_flags -C \
|
||||
--enable-bootstrap --prefix=$prefix --sysconfdir=$sysconfdir \
|
||||
--with-pkgdbdir=$pkgdbdir --mandir=$mandir $pkg_install_args && $bmake)"
|
||||
--with-pkgdbdir=$pkgdbdir --infodir=$infodir --mandir=$mandir $pkg_install_args && $bmake)"
|
||||
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"
|
||||
@@ -1128,8 +1210,8 @@ fi
|
||||
echo ".endif # end pkgsrc settings" >> ${TARGET_MKCONF}
|
||||
echo ".endif # end pkgsrc settings" >> ${BOOTSTRAP_MKCONF}
|
||||
|
||||
# register packages
|
||||
# usage: register_package <packagedirectory> [additional arguments]
|
||||
# build and register packages
|
||||
# usage: build_package <packagedirectory> [additional arguments]
|
||||
build_package() {
|
||||
run_cmd "(cd $pkgsrcdir/$1 && $bmake USE_DESTDIR=no -DPKG_PRESERVE MAKECONF=${BOOTSTRAP_MKCONF} install)"
|
||||
}
|
||||
@@ -1141,7 +1223,13 @@ build_package() {
|
||||
echo_msg "Installing packages"
|
||||
build_package "pkgtools/bootstrap-mk-files"
|
||||
case "$need_bsd_install" in
|
||||
yes) build_package "sysutils/install-sh";;
|
||||
yes)
|
||||
if [ "$use_bsdinstall" = "yes" ]; then
|
||||
build_package "sysutils/bsdinstall"
|
||||
else
|
||||
build_package "sysutils/install-sh"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
case "$need_ksh" in
|
||||
yes) build_package "shells/pdksh";;
|
||||
|
||||
Reference in New Issue
Block a user