Child pages
  • Building g11n

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Building g11n on for illumos based system

Do onu or image-update to the illumos onnv

Install all pkg:/locale/* packages

Install cbe

Install build dependencies

Code Block
pkg install \
pkg:/compatibility/ucb \
pkg:/developer/build/libtool \
pkg:/developer/documentation-tool/doxygen \
pkg:/developer/documentation-tool/gtk-doc \
pkg:/developer/gnome/gettext \
pkg:/developer/swig \
pkg:/editor/gnu-emacs/gnu-emacs-gtk \
pkg:/library/desktop/gobject/gobject-introspection \
pkg:/library/idnkit/header-idnkit \
pkg:/library/libconfuse \
pkg:/library/motif \
pkg:/system/input-method/ibus \
pkg:/system/input-method/ibus/table \
pkg:/system/input-method/library/libdatrie \
pkg:/system/input-method/library/libthai \
pkg:/system/input-method/library/m17n \
pkg:/system/input-method/scim \
pkg:/system/library/iconv/unicode \
pkg:/system/library/liblayout \
pkg:/library/gnome/base-libs

Get the source

Code Block
mkdir /ssd/g11n-build
cd /ssd/g11n-build

hg clone http://hg.openindiana.org/aszeszo/g11n
hg clone ssh://anon@hg.opensolaris.org//hg/nv-g11n/g11n-spec
hg clone http://hg.openindiana.org/aszeszo/inputmethod
hg clone ssh://anon@hg.opensolaris.org//hg/nv-g11n/messages

All of these are obsolete.  Clone these repositories instead:

Code Block
titleClone the source
hg clone https://hg.openindiana.org/sustaining/oi_151a/g11n/g11n
hg clone https://hg.openindiana.org/upstream/oracle/g11n/g11n-spec
hg clone https://hg.openindiana.org/sustaining/oi_151a/g11n/inputmethod
hg clone https://hg.openindiana.org/upstream/oracle/g11n/messages

Build g11n bits

Code Block
cd /ssd/g11n-build/g11n

export PATH=/opt/sunstudio12.1/bin:/usr/bin
export SRC=$PWD

# download files with missing sources
mkdir proto
cd proto
sh ../g11n/g11n-downloads.sh
cd ..

make install

The build works better this way:

Code Block
titleRevised build g11n bits
    $ cd g11n-build/g11n
    /* patch g11n-downloads.sh */
    $ ksh
      $ export PATH=/opt/sunstudio12.1/bin:/usr/bin
      $ export SRC=$PWD
      # download files with missing sources
      $ mkdir proto
      $ cd proto
      $ sh ../g11n-downloads.sh
      $ cd ..
      $ make install

Note that many of the font files are not found.  Change the SOURCE_URL in Makefiles to correct this situation.

Build g11n-spec

Code Block
 cd /ssd/g11n-build/g11n-spec

 export L10N_BUILDNUM=148

# apply the patch below and then run:

 ./build-g11n-spec.sh

Note that most of the patch is no longer necessary.  The patch will not apply without changes.

Code Block
diff --git a/build-g11n-spec.sh b/build-g11n-spec.sh
--- a/build-g11n-spec.sh
+++ b/build-g11n-spec.sh
@@ -73,7 +73,7 @@
 
 # Explicitly specifying location to enable to use pkgtool (pkgbuild)
 # not yet in jdsbld.
-PKGTOOL="/opt/pkgbuild/bin/pkgtool"
+PKGTOOL="pkgtool"
 
 # IPS repos are created in $PKGDEST if defined in environment,
 # otherwise in $BLDDIR (build.$MACH).
@@ -84,10 +84,10 @@
 export PKGBUILD_SRC_IPS_SERVER="file://$SRC_IPS_REPODIR/"
 
 rm -rf "$IPS_REPODIR"
-pkgrepo create --version 3 "$PKGBUILD_IPS_SERVER"
+pkgrepo create "$PKGBUILD_IPS_SERVER"
 pkgrepo set -s "$PKGBUILD_IPS_SERVER" publisher/prefix=${PUBLISHER}
 rm -rf "$SRC_IPS_REPODIR"
-pkgrepo create --version 3 "$PKGBUILD_SRC_IPS_SERVER"
+pkgrepo create "$PKGBUILD_SRC_IPS_SERVER"
 pkgrepo set -s "$PKGBUILD_SRC_IPS_SERVER" publisher/prefix=${PUBLISHER}
 
 for spec in $SPECFILES
@@ -126,7 +126,7 @@
     PKGBUILDARGS="$CMD --nonotify --download --topdir=$BLDDIR --specdirs=$SPECDIRS "
     PKGBUILDARGS="$PKGBUILDARGS --sourcedirs=$SRCDIRS --patchdirs=$PATCHDIRS"
     PKGBUILDARGS="$PKGBUILDARGS --logdir=$BLDDIR/log"
-    PKGBUILDARGS="$PKGBUILDARGS --pkgformat=ips"
+    PKGBUILDARGS="$PKGBUILDARGS --ips"
     PKGBUILDARGS="$PKGBUILDARGS --halt-on-errors"
 
     [[ -z "$DOWNLOADS" ]] || PKGBUILDARGS+=" --tar=$DOWNLOADS"
diff --git a/icu/icu.depend b/icu/icu.depend
--- a/icu/icu.depend
+++ b/icu/icu.depend
@@ -1,10 +1,10 @@
 #
 # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
 #
-Requires: SUNWcar
-Requires: SUNWkvm
-Requires: SUNWcsr
-Requires: SUNWcsu
-Requires: SUNWcsl
-Requires: SUNWlibms
-Requires: SUNWlibC
+#Requires: SUNWcar
+#Requires: SUNWkvm
+#Requires: SUNWcsr
+#Requires: SUNWcsu
+#Requires: SUNWcsl
+#Requires: SUNWlibms
+#Requires: SUNWlibC
diff --git a/include/default-depend.inc b/include/default-depend.inc
--- a/include/default-depend.inc
+++ b/include/default-depend.inc
@@ -3,8 +3,8 @@
 #
 # Copyright (c) 2003 Sun Microsystems, Inc.
 #
-Requires: SUNWcar
-Requires: SUNWkvm
-Requires: SUNWcsr
-Requires: SUNWcsu
-Requires: SUNWcsl
+#Requires: SUNWcar
+#Requires: SUNWkvm
+#Requires: SUNWcsr
+#Requires: SUNWcsu
+#Requires: SUNWcsl

Build messages

Code Block
cd /ssd/g11n-build/messages
export SRC=$PWD
make install

Note that for the messages build to work, you will first have to do a manual install of /usr/jdk/packages/javax.help-2.0/lib/jhall.jar .

Build inputmethod stuff

Part 1

Code Block
cd /ssd/g11n-build/inputmethod/iiim/build
./build-iiim.sh

Note that before running the script, you should modify it to obtain the source from http://dlc.openindiana.org/oi-build/source-archives/im-sdk.tar.bz2 .

Part 2

Code Block
cd /ssd/g11n-build/inputmethod/sunpinyin
./build-sunpinyin.sh

Part 3

Generate sunpinyin-ime-1.0.tar.gz and sunpinyin-ime-2.0.tar.gz tarballs (instructions in /ssd/g11n-build/inputmethod/README)

Code Block
 cd /ssd/g11n-build/inputmethod/specs
mkdir -p build.`uname -p`/SOURCES
. /opt/dtbld/bin/env.sh
export L10N_BUILDNUM=148
./build-im.sh

It is worth removing --halt-on-errors from PKGBUILDARGS in build-im.sh when figuring out build dependency issues.

Note that many of the source archives are at different URLs now.  You must change the URLs in the spec file to overcome these errors.  As well, some source archives are no longer available.  In these cases, you must omit those spec files from the shell script.  You must also install two IPS packages: system/input-method/library/libchewing system/input-method/library/libhangul .  You must install two Svr4 packages: SUNWgob2 SUNWibus-table-devel .  These are only available in build.*/PKGS after a run of build-im.sh .

Package everything up

Code Block
cd /ssd/g11n-build/g11n

export SRC=$PWD
export L10N_BUILDNUM=148
export CLOSED_BUILD=\#
export PKGARCHIVE=$SRC
export PKGPUBLISHER_REDIST=l10n-nightly
perl -pi -e "s/(L10N_BUILDNUM=).*/\1\ ${L10N_BUILDNUM}/" Makefile.buildnum

Copy contents of /ssd/g11n-build/messages/proto and /ssd/g11n-build/proto to /ssd/g11n-build/g11n/proto, and then move X11 into the right location:

Code Block
mv /ssd/g11n-build/g11n/proto/i386/fileroot/lib/X11 /ssd/g11n-build/g11n/proto/i386/fileroot/usr/lib

Publish the packages

Code Block
cd pkg
make install

Consolidate the repositories

Code Block
cp -rP ../../g11n-spec/build.`uname -p`/repo.spec/publisher/*/{file,pkg} $SRC/repo.redist

cp -rP ../../inputmethod/specs/build.`uname -p`/repo.imspec/publisher/*/file $SRC/repo.redist
cp -rP ../../inputmethod/specs/build.`uname -p`/repo.imspec/publisher/*/pkg/system* $SRC/repo.redist/pkg
cp -rP ../../inputmethod/specs/build.`uname -p`/repo.imspec/publisher/*/pkg/developer* $SRC/repo.redist/pkg

# then run the command below to update the repository

/usr/lib/pkg.depotd -p 10000 -d $SRC/repo.redist --add-content --exit-ready

The final repository can be found in

Code Block
/ssd/g11n-build/g11n/repo.redist