1                 Creation of the zlib source for illumos
   2 
   3 
   4 This source was derived from the Oracle userland version of zlib.
   5 Their userland distribution is documented at:
   6 
   7     https://java.net/projects/solaris-userland
   8 
   9 Use this command to obtain it:
  10 
  11     $ hg clone https://hg.java.net/hg/solaris-userland~gate userland-gate
  12 
  13 It includes adaptations for all opensource software that's included
  14 with Oracle Solaris, along with download procedures and build
  15 procedures.  It will download and build zlib-1.2.8.tar.gz in the
  16 components/zlib directory.
  17 
  18 Begin by building the userland version of zlib.  I had to modify some
  19 of the userland files to accomodate the older versions of python,
  20 perl, and ld on illumos distributions.  The different location of the
  21 compilers also had to be accomodated.  For the userland build on
  22 SPARC, I also had to omit Oracle's T4 capability enhancements because
  23 they used compiler options that were not available on illumos
  24 distributions, specifically these:
  25 
  26     -xarch=sparc4 -xtarget=T4 -xchip=T4
  27 
  28 Once the userland build is complete, record the compiler options so
  29 they can be transferred to the illumos build.
  30 
  31 The location for illumos is usr/src/lib/zlib .  Makefiles follow the
  32 model described in usr/src/lib/README.Makefiles .  At the top level of
  33 the new subdirectory, both Makefile and Makefile.com are required.  In
  34 the ISA-dependant locations (amd64 i386 sparc sparcv9), only Makefile
  35 is required.  All of the zlib source goes in the `common' directory.
  36 
  37 Most of the files from the zlib userland directory are copied to the
  38 new location.  `capabilities' is copied, but used only for reference.
  39 `llib-lz' becomes a symlink target.  `Makefile' is renamed and used
  40 only for reference.  `mapfile' is also a symlink target.  `patches' is
  41 copied, but `parfait.patch' is moved to the new `unused-patches'
  42 directory.  `zlib-1.2.8' is moved to `common'.  This source has already
  43 been patched by the userland build.  `zlib.3.sunman' is
  44 used only for reference.  `zlib.license' becomes a symlink target.
  45 `zlib.p5m', the manifest, is renamed and used for reference.
  46 
  47 The `build' directory and the file `zlib-1.2.8.tar.gz' are not used
  48 and don't need to be copied.  None of the Oracle or zlib Makefiles
  49 are used, except for reference.  The following files, symlinks, or
  50 directories are newly created in the new illumos location:
  51 
  52     unused-patches THIRDPARTYLICENSE THIRDPARTYLICENSE.descrip
  53     amd64 common i386 sparc sparcv9
  54     common/llib-lz common/mapfile-vers
  55 
  56 The new Makefiles list all the object files, suppress the header
  57 check, add the necessary compile options, and create usr symlinks in
  58 the prototype area.
  59 
  60 The zlib man pages are installed by an addition to the Makefile in
  61 usr/src/man/man3 .  Rather than copy the man page source to this
  62 location, a symlink pointing to common/zlib.3 is created here.
  63 
  64 A new manifest, library-zlib.mf, is created in usr/src/pkg/manifests
  65 to build the IPS package from files in the prototype area.