On Fri, May 15, 2015 at 08:02:52PM +0100, Ken Moffat wrote:
> 
> For the modules I build on the desktop, I can probably provide some
> notes - but they are for my use cases.  I'll reply to this in a
> while when I'm back at a desktop system (the netbook is too
> restrictive to manage this comfortable).
> 
I build a few modules early on:

SGMLSpm gets built as my first main step after booting the new
system - I build all of what is in chapters 45 and 46 (I'm an editor
- I need this stuff).

XML-Simple gets built on the way to building Xorg.

Image::ExifTool (not in the book) gets built when I'm building tools
to make my photos more presentable (gimp, jhead, ufraw and its deps)

libwww-perl is needed for get-iplayer : I used to use an old version
(5.something) which had far fewer deps, but as an editor I get the
fun of trying to keep up to date :) - I'll attach part of my script.
This happens after AV libs have already been built.

Note that km_build is one of my functions to detect if the step
(usually a package) has been already built, and if not it will run
what I call the client script.  And it will stop if the client
fails.  Note that the reason for attaching it is to show how I
detect that a module is already installed : I only ever have _one_
perl version installed.

Near the end of my main build I install parole and xfburn (although
I very rarely use the latter) - it looks as if URI is needed,
probably for exo, and in a normal build it will already be
installed, but I check anyway:

test -f /usr/lib/perl5/site_perl/*/URI.pm ||
  km_build      URI                     ${KM_SCRIPTS}/perl.d/URI

I also do that if I'm doing a less-minimal xfce install (not full -
I fell out of love with moidori, and for the moment I can avoid
webkitgtk).

After that, there are two desktop scripts which build perl modules -
extra-biber (for biber, obviously) and extra-font-analysis (for
working out what is in fonts, particularly ttf/otf : I keep
promising myself I'm going to get back to doing that!).  I'll attach
the full scripts because the comments and tests might be useful.
The biber script requires that I have already installed texlive -
nowadays I only build the source (although I'll still do at least
one binary install, on a lower-powered machine, when 2015 is
released).  Obviously some of the boilerplate (particularly, the
test for ppc64) is out of date.

Similarly, extra-font-analysis gets built on a completed desktop
system: usually, I only do it on one machine.  Again, most people
will not want this.  For me, 'fret' gets used when I'm looking at a
new font to get an idea of what is in it - and fontforge is used if
I wish to extract a ttf from a ttc (TrueType Font and Collection) so
that I can check what it contains.

ĸen
-- 
Nanny Ogg usually went to bed early. After all, she was an old lady.
Sometimes she went to bed as early as 6 a.m.
# build libwww-perl : it, or some deps, might already exist

test -f /usr/lib/perl5/site_perl/*/Encode/Locale.pm ||
  km_build      Encode-Locale           ${KM_SCRIPTS}/perl.d/Encode-Locale

test -f /usr/lib/perl5/site_perl/*/URI.pm ||
  km_build      URI                     ${KM_SCRIPTS}/perl.d/URI

# HTML-Tagset : no deps
test -f /usr/lib/perl5/site_perl/*/HTML/Tagset.pm ||
  km_build      HTML-Tagset             ${KM_SCRIPTS}/perl.d/HTML-Tagset

# HTTP-Date, IO-HTML, LWP-MediaTypes are deps for HTML-Parser, probably for 
tests
test -f /usr/libperl5/site_perl/*/HTTP/Date.pm ||
  km_build      HTTP-Date               ${KM_SCRIPTS}/perl.d/HTTP-Date

test -f /usr/lib/perl5/site_perl/*/IO/HTML.pm ||
  km_build      IO-HTML                 ${KM_SCRIPTS}/perl.d/IO-HTML

test -f //usr/lib/perl5/site_perl/*/LWP/MediaTypes.pm ||
  km_build      LWP-MediaTypes          ${KM_SCRIPTS}/perl.d/LWP-MediaTypes

test -f /usr/lib/perl5/site_perl/*/*/HTML/Parser.pm ||
  km_build      HTML-Parser             ${KM_SCRIPTS}/perl.d/HTML-Parser

test -f /usr/lib/perl5/site_perl/*/HTTP/Message.pm ||
  km_build      HTTP-Message            ${KM_SCRIPTS}/perl.d/HTTP-Message

test -f /usr/lib/perl5/site_perl/*/HTML/Form.pm ||
  km_build      HTML-Form               ${KM_SCRIPTS}/perl.d/HTML-Form

test -f /usr/lib/perl5/site_perl/*/HTTP/Cookies.pm ||
  km_build      HTTP-Cookies            ${KM_SCRIPTS}/perl.d/HTTP-Cookies

test -f /usr/lib/perl5/site_perl/*/HTTP/Negotiate.pm ||
  km_build      HTTP-Negotiate          ${KM_SCRIPTS}/perl.d/HTTP-Negotiate

test -f /usr/lib/perl5/site_perl/*/Net/HTTP.pm ||
  km_build      Net-HTTP                ${KM_SCRIPTS}/perl.d/Net-HTTP

test -f /usr/lib/perl5/site_perl/*/WWW/RobotRules.pm ||
  km_build      WWW-RobotRules          ${KM_SCRIPTS}/perl.d/WWW-RobotRules

test -f /usr/lib/perl5/site_perl/*/HTTP/Daemon.pl ||
  km_build      HTTP-Daemon             ${KM_SCRIPTS}/perl.d/HTTP-Daemon

test -f /usr/lib/perl5/site_perl/*/File/Listing.pm ||
  km_build      File-Listing            ${KM_SCRIPTS}/perl.d/File-Listing

test -f /usr/libperl5/site_perl/*/LWP.pm ||
  km_build      libwww-perl             ${KM_SCRIPTS}/perl.d/libwww-perl

#!/bin/bash
# try to build biber from source, it uses a shitload of perl
# modules.
# FIXME : Build is scheduled to be removed from the main perl distribution,
# those modules using ./Build.PL will need Module::Build
# KM_TEXMF directory hardcoded for year 
#--------------------------------------------------------------------------
set -e
# KM_STAGE will be general-something or desktopN
export KM_STAGE=desktop-biber

# work out where the script lives, to find its directory, and hence its clients
# strip off last '/' and the following name
KM_SCRIPTS=${0%/*}
echo "will look for client scripts in $KM_SCRIPTS"

. /misc/hostfile
. /misc/packages

#make the functions script noisy to report what it will do
KM_VERBOSE=verbose
. ${KM_SCRIPTS}/functions
# and quieten it for the rest of the build
unset KM_VERBOSE

# report which branch we are on
km_show_branch
# start timing now that the functions have been read
km_set_start

# ppc64 cannot build glibc if all 32-bit (makeinfo problem)
# so ensure it is pretending to be ppc32.
if [ $(uname -m) = "ppc64" ]; then
        echo "please use linux32 before trying to run this"
        exit 2
fi

# sanity check the type of build
if [ -z "$KM_BOX" ]; then
        echo "KM_BOX, for the type of build, is not set, run aborted"
        exit 1
else
        case "$KM_BOX" in
                desktop|laptop|virtual)
                        ;;
                *)
                        echo "KM_BOX is set to $KM_BOX but this is a desktop 
build"
                        exit 1
                        ;;
        esac
fi

CFLAGS='-O2'
CXXFLAGS='-O2'
export CFLAGS CXXFLAGS LDFLAGS

# set $KM_ARCH to ppc if appropriate, for ppc (endian) patches
KM_ARCH=`uname -m`

test -n "$KM_HOST"

# prefer to build in /scratch, if possible
echo "testing if /scratch/working exists" &&
if [ -d /scratch ]; then
        mountpoint /scratch >/dev/null 2>&1 || mountpoint /scratch/working 
>/dev/null 2>&1
        if [ $? -ne 0 ]; then
                echo "please mount /scratch"
                exit 2
        else
                mkdir -p /scratch/working
                KM_WHERE=/scratch/working
        fi
else
        KM_WHERE=/usr/src
fi &&

# need to export variables here
export KM_ARCH KM_BOX KM_HOST KM_LOGDIRECTORY KM_SCRIPTS KM_WHERE
export LC_ALL=C

mkdir -pv $KM_LOGDIR

# libwww-perl might have already been built, so test each of its dependencies

test -f /usr/lib/perl5/site_perl/*/Encode/Locale.pm ||
  km_build      Encode-Locale           ${KM_SCRIPTS}/perl.d/Encode-Locale

test -f /usr/lib/perl5/site_perl/*/URI.pm ||
  km_build      URI                     ${KM_SCRIPTS}/perl.d/URI

# HTML-Tagset : no deps
test -f /usr/lib/perl5/site_perl/*/HTML/Tagset.pm ||
  km_build      HTML-Tagset             ${KM_SCRIPTS}/perl.d/HTML-Tagset

# HTTP-Date, IO-HTML, LWP-MediaTypes are deps for HTML-Parser, probably for 
tests
test -f /usr/lib/perl5/site_perl/*/HTTP/Date.pm ||
  km_build      HTTP-Date               ${KM_SCRIPTS}/perl.d/HTTP-Date

test -f /usr/lib/perl5/site_perl/*/IO/HTML.pm ||
  km_build      IO-HTML                 ${KM_SCRIPTS}/perl.d/IO-HTML

test -f //usr/lib/perl5/site_perl/*/LWP/MediaTypes.pm ||
  km_build      LWP-MediaTypes          ${KM_SCRIPTS}/perl.d/LWP-MediaTypes

test -f /usr/lib/perl5/site_perl/*/*/HTML/Parser.pm ||
  km_build      HTML-Parser             ${KM_SCRIPTS}/perl.d/HTML-Parser

test -f /usr/lib/perl5/site_perl/*/HTTP/Message.pm ||
  km_build      HTTP-Message            ${KM_SCRIPTS}/perl.d/HTTP-Message

test -f /usr/lib/perl5/site_perl/*/HTML/Form.pm ||
  km_build      HTML-Form               ${KM_SCRIPTS}/perl.d/HTML-Form

test -f /usr/lib/perl5/site_perl/*/HTTP/Cookies.pm ||
  km_build      HTTP-Cookies            ${KM_SCRIPTS}/perl.d/HTTP-Cookies

test -f /usr/lib/perl5/site_perl/*/HTTP/Negotiate.pm ||
  km_build      HTTP-Negotiate          ${KM_SCRIPTS}/perl.d/HTTP-Negotiate

test -f /usr/lib/perl5/site_perl/*/Net/HTTP.pm ||
  km_build      Net-HTTP                ${KM_SCRIPTS}/perl.d/Net-HTTP

test -f /usr/lib/perl5/site_perl/*/WWW/RobotRules.pm ||
  km_build      WWW-RobotRules          ${KM_SCRIPTS}/perl.d/WWW-RobotRules

test -f /usr/lib/perl5/site_perl/*/HTTP/Daemon.pm ||
  km_build      HTTP-Daemon             ${KM_SCRIPTS}/perl.d/HTTP-Daemon

test -f /usr/lib/perl5/site_perl/*/File/Listing.pm ||
  km_build      File-Listing            ${KM_SCRIPTS}/perl.d/File-Listing

test -f /usr/libi/perl5/site_perl/*/LWP.pm ||
  km_build      libwww-perl             ${KM_SCRIPTS}/perl.d/libwww-perl

# now start the things which are only used by biber in my builds
# LWP::Protocol::https is in BLFS - needs openssl, but that is always present.
km_build        Net-SSLeay              ${KM_SCRIPTS}/perl.d/Net-SSLeay

km_build        IO-Socket-SSL           ${KM_SCRIPTS}/perl.d/IO-Socket-SSL

km_build        Mozilla-CA              ${KM_SCRIPTS}/perl.d/Mozilla-CA

km_build        LWP-Protocol-https      ${KM_SCRIPTS}/perl.d/LWP-Protocol-https

# Top-level deps, in ASCII-order, with their deps preceding them.
# Business-ISBN needs Business-ISBN-Data
km_build        Business-ISBN-Data      ${KM_SCRIPTS}/perl.d/Business-ISBN-Data

km_build        Business-ISBN           ${KM_SCRIPTS}/perl.d/Business-ISBN

# tests for Business-ISMN require Tie-Cycle
km_build        Tie-Cycle               ${KM_SCRIPTS}/perl.d/Tie-Cycle

km_build        Business-ISMN           ${KM_SCRIPTS}/perl.d/Business-ISMN

km_build        Business-ISSN           ${KM_SCRIPTS}/perl.d/Business-ISSN

# Data-Compare needs File-Find-Rule which needs Number-Compare and Text-Glob
km_build        Number-Compare          ${KM_SCRIPTS}/perl.d/Number-Compare

km_build        Text-Glob               ${KM_SCRIPTS}/perl.d/Text-Glob

km_build        File-Find-Rule          ${KM_SCRIPTS}/perl.d/File-Find-Rule

km_build        Data-Compare            ${KM_SCRIPTS}/perl.d/Data-Compare

km_build        Data-Dump               ${KM_SCRIPTS}/perl.d/Data-Dump

km_build        Date-Simple             ${KM_SCRIPTS}/perl.d/Date-Simple

km_build        Encode-EUCJPASCII       ${KM_SCRIPTS}/perl.d/Encode-EUCJPASCII

km_build        Encode-JIS2K            ${KM_SCRIPTS}/perl.d/Encode-JIS2K

km_build        Encode-HanExtra         ${KM_SCRIPTS}/perl.d/Encode-HanExtra

km_build        File-Slurp              ${KM_SCRIPTS}/perl.d/File-Slurp

km_build        IPC-Run3                ${KM_SCRIPTS}/perl.d/IPC-Run3

# List::AllUtils requires Test-Warnings and List-MoreUtils for its testsuite.
km_build        Test-Warnings           ${KM_SCRIPTS}/perl.d/Test-Warnings

km_build        Exporter-Tiny           ${KM_SCRIPTS}/perl.d/Exporter-Tiny

km_build        List-MoreUtils          ${KM_SCRIPTS}/perl.d/List-MoreUtils

echo "checking verion of List::Util is at least 1.31"
# List-AllUtils fails at runtime if List::Util is too old -
# on perl-5.18.2 it is too old.  Update Scalar-List-Utils
LISTUTILS=$(strings /usr/lib/perl5/5.*/*/auto/List/Util/Util.so | grep v5 -A 1 
| tail -n 1)
NEEDED=1.31
UPDATE=$(echo $LISTUTILS $NEEDED | awk '{ print $1 < $2 }')
test $UPDATE = "0" ||
  km_build      Scalar-List-Utils       ${KM_SCRIPTS}/perl.d/Scalar-List-Utils

km_build        List-AllUtils           ${KM_SCRIPTS}/perl.d/List-AllUtils

km_build        Log-Log4perl            ${KM_SCRIPTS}/perl.d/Log-Log4perl

km_build        Regexp-Common           ${KM_SCRIPTS}/perl.d/Regexp-Common

# Text-BibTeX needs Config-Autoconf, which requires Capture-Tiny for its 
testsuite,
# and ExtUtils-LibBuilder
km_build        Capture-Tiny            ${KM_SCRIPTS}/perl.d/Capture-Tiny

km_build        Config-AutoConf         ${KM_SCRIPTS}/perl.d/Config-AutoConf

km_build        ExtUtils-LibBuilder     ${KM_SCRIPTS}/perl.d/ExtUtils-LibBuilder

km_build        Text-BibTeX             ${KM_SCRIPTS}/perl.d/Text-BibTeX

km_build        Text-Roman              ${KM_SCRIPTS}/perl.d/Text-Roman

# Unicode::Collate used to be a conditional version update from the version in 
perl,
# but 5.20.2 is still shipping 1.04 and current is 1.11, so update always.
 km_build       Unicode-Collate         ${KM_SCRIPTS}/perl.d/Unicode-Collate

# Unicode::GCString is part of Unicode-LineBreak, requires MIME-Charset which 
wants
# Encode-JISX0213, and that needs Encode-ISO2022 for its tests.
km_build        Encode-ISO2022          ${KM_SCRIPTS}/perl.d/Encode-ISO2022

km_build        Encode-JISX0213         ${KM_SCRIPTS}/perl.d/Encode-JISX0213

km_build        MIME-Charset            ${KM_SCRIPTS}/perl.d/MIME-Charset

km_build        Unicode-LineBreak       ${KM_SCRIPTS}/perl.d/Unicode-LineBreak

# XML-LibXML-Simple wants XML-LibXML which uses libxml2 and wants 
XML-NamespaceSupport
# and XML-SAX which wants XML-NamespaceSupport and XML-SAX-Base
# these first three are in BLFS as deps of XML:;Simple
# XML-LibXML-Simple also wants File-Slurp-Tiny for its tests.
km_build        XML-NamespaceSupport    
${KM_SCRIPTS}/perl.d/XML-NamespaceSupport

km_build        XML-SAX-Base            ${KM_SCRIPTS}/perl.d/XML-SAX-Base

km_build        XML-SAX                 ${KM_SCRIPTS}/perl.d/XML-SAX

km_build        XML-LibXML              ${KM_SCRIPTS}/perl.d/XML-LibXML

km_build        File-Slurp-Tiny         ${KM_SCRIPTS}/perl.d/File-Slurp-Tiny

km_build        XML-LibXML-Simple       ${KM_SCRIPTS}/perl.d/XML-LibXML-Simple

km_build        XML-LibXSLT             ${KM_SCRIPTS}/perl.d/XML-LibXSLT

km_build        XML-Writer              ${KM_SCRIPTS}/perl.d/XML-Writer

# perl reports in ASCII order, so autovivification is the last top-level dep!
km_build        autovivification        ${KM_SCRIPTS}/perl.d/autovivification

km_build        File-Which              ${KM_SCRIPTS}/perl.d/File-Which

# biblatex-biber-3.0 wants Test-Differences for testing, which needs
# Text-Diff for testing, which needs Algorithm-Diff for its own testing
km_build        Algorithm-Diff          ${KM_SCRIPTS}/perl.d/Algorithm-Diff

km_build        Text-Diff               ${KM_SCRIPTS}/perl.d/Text-Diff

km_build        Test-Differences        ${KM_SCRIPTS}/perl.d/Test-Differences

# Test-:Pod for testing
km_build        Test-Pod                ${KM_SCRIPTS}/perl.d/Test-Pod

# Test-Pod-Coverage for testing, requires Pod-Coverage for its testsuite,
# which requires Devel-Symdump for its own testsuite.
km_build        Devel-Symdump           ${KM_SCRIPTS}/perl.d/Devel-Symdump

km_build        Pod-Coverage            ${KM_SCRIPTS}/perl.d/Pod-Coverage

km_build        Test-Pod-Coverage       ${KM_SCRIPTS}/perl.d/Test-Pod-Coverage

# 'su' drops the extended PATH, so reinstate it (needed to get texhash)
set +e
echo "looking for texhash"
which texhash
if [ $? -ne 0 ]; then
        if [ -f /opt/texlive/20*/bin/*/texhash ]; then
                MYTEXES=$(ls -d /opt/texlive/20*/bin/*)
                PATH=$PATH:$MYTEXES
                echo PATH now set to $PATH
                export PATH
        else
                exit 1
        fi
else
        echo "texhash is already on PATH"
fi
set -e

export KM_TEXMF=/opt/texlive/2014/texmf-dist    

# matching biblatex, the prepackaged version
km_build        biblatex                ${KM_SCRIPTS}/tex.d/biblatex

km_build        biblatex-biber          ${KM_SCRIPTS}/perl.d/biblatex-biber

km_driverscript_timings

Attachment: extra-font-analysis.sh
Description: Bourne shell script

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to