about summary refs log tree commit diff stats
path: root/core/ports.html
diff options
context:
space:
mode:
Diffstat (limited to 'core/ports.html')
-rw-r--r--core/ports.html101
1 files changed, 84 insertions, 17 deletions
diff --git a/core/ports.html b/core/ports.html
index e921351..9d2f989 100644
--- a/core/ports.html
+++ b/core/ports.html
@@ -76,10 +76,11 @@
         # /etc/pkgmk.conf: pkgmk(8) configuration
         #
 
-        export CFLAGS="-O2 -g -march=x86-64 -pipe"
+        export CFLAGS="-O2 -march=x86-64"
         export CXXFLAGS="${CFLAGS}"
 
-        # export MAKEFLAGS="-j2"
+        export JOBS=$(nproc)
+        export MAKEFLAGS="-j $JOBS"
 
         case ${PKGMK_ARCH} in
                 "64"|"")
@@ -96,14 +97,16 @@
                         ;;
         esac
 
-        #PKGMK_SOURCE_MIRRORS=(http://machine.example.org/ports/distfiles/)
+        PKGMK_SOURCE_MIRRORS=(https://hive.gnu.systems/mirror-3.4/distfiles/)
         # PKGMK_SOURCE_DIR="$PWD"
         PKGMK_SOURCE_DIR="/usr/ports/distfiles"
         # PKGMK_PACKAGE_DIR="$PWD"
         PKGMK_PACKAGE_DIR="/usr/ports/packages"
         # PKGMK_WORK_DIR="$PWD/work"
-        PKGMK_WORK_DIR="/usr/ports/work/$name"
+        PKGMK_WORK_DIR="/usr/ports/work/${name}"
         # PKGMK_DOWNLOAD="no"
+        # PKGMK_IGNORE_SIGNATURE="no"
+        # PKGMK_IGNORE_MD5SUM="no"
         # PKGMK_IGNORE_FOOTPRINT="no"
         # PKGMK_IGNORE_NEW="no"
         # PKGMK_NO_STRIP="no"
@@ -136,19 +139,16 @@
         # note: the order matters: the package found first is used
         prtdir /usr/ports/core
         prtdir /usr/ports/opt
-        prtdir /usr/ports/contrib
-        prtdir /usr/ports/ports
         prtdir /usr/ports/xorg
 
-        # 6c37 team provides a collection with freetype-iu, fontconfig-iu
-        # and cairo-iu ports.
-
         # the following line enables the multilib compat-32 collection
         #prtdir /usr/ports/compat-32
 
         # the following line enables the user maintained contrib collection
-        # prtdir /usr/ports/6c37-dropin
-        # prtdir /usr/ports/6c37
+        prtdir /usr/ports/contrib
+        prtdir /usr/ports/ports
+        prtdir /usr/ports/mate
+        prtdir /usr/ports/kde5
 
         ### use mypackage form local directory
         # prtdir /home/packages/build:mypackage
@@ -157,18 +157,18 @@
         writelog enabled         # (enabled|disabled)
         logmode  overwrite       # (append|overwrite)
         rmlog_on_success yes     # (no|yes)
-        logfile  /usr/ports/pkgbuild/%n-%v-%r.log
+        logfile  /usr/ports/pkgbuild/%n.log
                                    # path, %p=path to port dir, %n=port name
                                    #       %v=version, %r=release
 
         ### use alternate cache file (default: /var/lib/pkg/prt-get.cache
         # cachefile /mnt/nfs/cache
 
-        ### print readme information:
+        ### print README information:
         readme verbose           # (verbose|compact|disabled)
 
         ### prefer higher versions in sysup / diff
-        preferhigher no     # (yes|no)
+        preferhigher yes      # (yes|no)
 
         ### use regexp search
         # useregex no        # (yes|no)
@@ -177,20 +177,87 @@
         ### --install-scripts option
         runscripts yes            # (no|yes)
 
-
         ### expert section ###
 
         ### alternative commands
-        makecommand      sudo -h -u pkgmk fakeroot pkgmk
+        makecommand      sudo -H -u pkgmk fakeroot pkgmk
         addcommand       sudo pkgadd
         removecommand    sudo pkgrm
         runscriptcommand sudo sh
         </pre>
 
+        <h2 id="distcc">1.3.5. Ccache and distcc</h2>
+
+        <p>Ccache avoids same code to be compiled by saving
+        the output from compilers and identifying same
+        input by using hashes and distcc distributes
+        compiling process across machines.</p>
+
+        <p>Don't set native or generic on /etc/pkgmk.conf.</p>
+        <pre>
+        $ prt-get depinst ccache distcc
+        </pre>
+
+        <p>Configure pkgmk and define number of cores available,
+        in this example get dynamically Edit 
+        <a href="conf/pkgmk.conf">/etc/pkgmk.conf</a> and
+        set ccaching directory and instructs to use distcc
+        backend;</p>
+
+        <pre>
+        # ccache settings
+        export PATH="/usr/lib/ccache/:$PATH"
+        export CCACHE_DIR="/usr/ports/ccache"
+        export CCACHE_PREFIX="distcc"
+        export CCACHE_COMPILERCHECK="%compiler% -dumpversion; crux"
+        </pre>
+
+        <p>Set distcc hosts and respective number of
+        cpu cores to send work, hosts names, exp; "worker" must
+        be configured on /etc/hosts.</p>
+
+        <pre>
+        ### compile using distcc without ccache
+        ##export PATH="/usr/lib/distcc/:$PATH"
+        ##export DISTCC_HOSTS="localhost/4,lzo,cpp xborg/4,lzo,cpp"
+        ##export PUMP_BUILD=yes
+
+        # distcc settings
+        export JOBS=$(/usr/bin/distcc -j 2> /dev/null)
+        export DISTCC_DIR="/usr/ports/distcc"
+        export MAKEFLAGS="-j ${JOBS}"
+        export SCONSFLAGS="$MAKEFLAGS"
+
+        # local compile only
+        #export JOBS=$(nproc)
+        #export MAKEFLAGS="-j $JOBS"
+        </pre>
+
+        <p>Configure distcc daemon, edit
+        /etc/rc.d/distccd;</p>
+
+        <pre>
+        #!/usr/bin/env bash
+        #
+        # /etc/rc.d/distccd: start/stop distcc daemon
+        #
+
+        . /etc/distcc.conf
+        if [ -z "$DISTCC_ALLOW" ]; then
+        </pre>
+
+        <p>Create /etc/distcc.conf;</p>
+
+        <pre>
+        DISTCC_ALLOW="10.0.0.0/8"
+        DISTCC_USER="pkgmk"
+        DISTCC_LOG_LEVEL="info"
+        </pre>
+
         <a href="index.html">Core OS Index</a>
         <p>
         This is part of the Hive System Documentation.
-        Copyright (C) 2018
+        Copyright (C) 2019
         Hive Team.
         See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
         for copying conditions.</p>