Commit 3504297e authored by Mohammad Akhlaghi's avatar Mohammad Akhlaghi
Browse files

In progress: building TeXLive from source started

Until now, we weren't actually building TeXLive from source, but using the
TeXLive manager to download appropriate binaries. This doesn't allow us to
actually keep the source of the LaTeX packages (and build them offline for
example). For a fully (including the PDF) reproducible project, it is thus
necessary to have a controlled build of TeXLive packages from source.

With this commit this work has started. It is just important to note that
this work is not yet finished: we only install the base TeX installation,
we don't even have `latex' yet. Also the installation is set to be in a
non-standard directory (`$(idir)/textest') for testing purposes (so it
doesn't conflict with other installed software, enabling easy
checks).

Because of these in-completeness issues, the `./configure' script will
crash after the base TeXLive installation has been finished.
parent 9901c3b2
No preview for this file type
......@@ -36,7 +36,10 @@
# Programs and libraries.
top-level-programs = gnuastro
top-level-programs =
# TeXLive packages.
top-level-tex = texlive
# Python libraries/modules.
top-level-python = astropy
top-level-python =
......@@ -107,6 +107,14 @@ yaml-version = 0.2.2
# TeXLive packages
# ----------------
texlive-version = 20190410
# Python packages
# ---------------
#
......
......@@ -48,7 +48,7 @@ ibidir = $(BDIR)/software/installed/version-info/proglib
# Set the top-level software to build.
all: $(foreach p, $(top-level-programs), $(ibidir)/$(p)) \
$(foreach p, $(top-level-python), $(ipydir)/$(p)) \
$(itidir)/texlive
$(foreach p, $(top-level-tex), $(itidir)/$(p))
# Other basic environment settings: We are only including the host
# operating system's PATH environment variable (after our own!) for the
......@@ -102,6 +102,7 @@ downloadwrapper = ./reproduce/analysis/bash/download-multi-try
# Mini-environment software
include reproduce/software/make/tex.mk
include reproduce/software/make/python.mk
......@@ -836,7 +837,7 @@ $(itidir)/texlive-ready-tlmgr: $(tdir)/install-tl-unx.tar.gz \
# To keep things modular and simple, we'll break up the installation of TeX
# Live itself (only very basic TeX and LaTeX) and the installation of its
# necessary packages into two packages.
$(itidir)/texlive: reproduce/software/config/installation/texlive.mk \
$(itidir)/texlive-old: reproduce/software/config/installation/texlive.mk \
$(itidir)/texlive-ready-tlmgr
# To work with TeX live installation, we'll need the internet.
......
# Build TeX and its packages.
#
# ------------------------------------------------------------------------
# !!!!! IMPORTANT NOTES !!!!!
#
# This Makefile will be run by the initial `./configure' script. It is not
# included into the reproduction pipe after that.
#
# ------------------------------------------------------------------------
#
# Copyright (C) 2019 Mohammad Akhlaghi <mohammad@akhlaghi.org>
#
# This Makefile is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This Makefile is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# A copy of the GNU General Public License is available at
# <http://www.gnu.org/licenses/>.
# Tarballs
# --------
#
# All the necessary tarballs are defined and prepared with this rule.
#
# Note that we want the tarballs to follow the convention of NAME-VERSION
# before the `tar.XX' prefix. For those programs that don't follow this
# convention, but include the name/version in their tarball names with
# another format, we'll do the modification before the download so the
# downloaded file has our desired format.
textarballs = $(foreach t, texlive-$(texlive-version).tar.xz \
, $(tdir)/$(t) )
$(textarballs): $(tdir)/%:
if [ -f $(DEPENDENCIES-DIR)/$* ]; then
cp $(DEPENDENCIES-DIR)/$* $@
else
# Remove all numbers, `-' and `.' from the tarball name so we can
# search more easily only with the program name.
n=$$(echo $* | sed -e's/[0-9\-]/ /g' -e's/\./ /g' \
| awk '{print $$1}' )
# Set the top download link of the requested tarball.
mergenames=1
if [ $$n = texlive ]; then
mergenames=0
y=$(texlive-version)
year="$${y:0:4}"
w=ftp://tug.org/texlive/historic/$$year/texlive-$(texlive-version)-source.tar.xz
else
echo; echo; echo;
echo "'$$n' not recognized as a dependency name to download."
echo; echo; echo;
exit 1
fi
# Download the requested tarball. Note that some packages may not
# follow our naming convention (where the package name is merged
# with its version number). In such cases, `w' will be the full
# address, not just the top directory address. But since we are
# storing all the tarballs in one directory, we want it to have
# the same naming convention, so we'll download it to a temporary
# name, then rename that.
if [ $$mergenames = 1 ]; then tarballurl=$$w/"$*"
else tarballurl=$$w
fi
# Download using the script specially defined for this job.
touch $(lockdir)/download
downloader="wget --no-use-server-timestamps -O"
$(downloadwrapper) "$$downloader" $(lockdir)/download \
$$tarballurl $@
fi
# Dependencies of TeXLive
# -----------------------
# Basic TeXLive installation.
$(itidir)/texlive: $(tdir)/texlive-$(texlive-version).tar.xz \
$(ibidir)/libpng \
$(ibidir)/pixman \
$(ibidir)/cairo
################################
instdir=$(idir)/textest
################################
unpackdir=texlive-$(texlive-version)-source
rm -rf $(ddir)/$$unpackdir
cd $(ddir)
tar xf $<
mkdir $$unpackdir/build
cd $$unpackdir/build
../configure SHELL=$(ibdir)/bash \
--prefix=$$instdir \
--mandir=$$instdir/man \
--bindir=$$instdir/bin \
--libdir=$$instdir/lib \
--infodir=$$instdir/share/info \
--without-x \
--with-system-gmp \
--with-system-zlib \
--with-system-mpfr \
--with-system-cairo \
--with-system-libpng \
--with-system-pixman \
--enable-shared \
--disable-pmx \
--disable-m-tx \
--disable-vlna \
--disable-xetex \
--disable-autosp \
--disable-devnag \
--disable-lacheck \
--disable-axodraw2 \
--disable-texdoctk \
--disable-ptex \
--disable-ptex-synctex \
--disable-eptex \
--disable-eptex-synctex \
--disable-uptex \
--disable-uptex-synctex \
--disable-euptex \
--disable-euptex-synctex \
--disable-aleph \
--disable-native-texlive-build \
--disable-luatex \
--disable-luajittex \
--disable-xetex \
--disable-xetex-synctex \
--disable-mflua \
--disable-mfluajit \
--disable-synctex \
--disable-afm2pl \
--disable-chktex \
--disable-cjkutils \
--disable-detex \
--disable-dtl \
--disable-dvi2tty \
--disable-dvidvi \
--disable-dviljk \
--disable-dviout-util \
--disable-dvipng \
--disable-debug \
--disable-dvipos \
--disable-dvipsk \
--disable-dvisvgm \
--disable-gregorio \
--disable-gsftopk \
--disable-lcdf-typetools \
--disable-cfftot1 \
--disable-mmafm \
--disable-mmpfb \
--disable-otfinfo \
--disable-otftotfm \
--disable-t1dotlessj \
--disable-t1lint \
--disable-t1rawafm \
--disable-t1reencode \
--disable-t1testpage \
--disable-ttftotype42 \
--disable-auto-cfftot1 \
--disable-auto-t1dotlessj \
--disable-auto-ttftotype42 \
--disable-makeindexk \
--disable-makejvf \
--disable-mendexk \
--disable-musixtnt \
--disable-ps2pk \
--disable-psutils \
--disable-seetexk \
--disable-tex4htk \
--disable-ttf2pk2 \
--disable-ttfdump \
--disable-upmendex \
--disable-xdvik
make -j$(numthreads) V=1
echo; echo "UP-TO-HERE Delibarate Crash"; echo
exit 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment