diff options
author | Florian Schmaus <flow@gentoo.org> | 2023-11-07 09:35:40 +0100 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2023-11-07 09:35:46 +0100 |
commit | 0227af7ba03ce8528b3d6f814475c1ceae19bbfa (patch) | |
tree | f5caad9bde5dd95fbfc06a5b6f469fc6a7ebc1da | |
download | tex-0227af7ba03ce8528b3d6f814475c1ceae19bbfa.tar.gz tex-0227af7ba03ce8528b3d6f814475c1ceae19bbfa.tar.bz2 tex-0227af7ba03ce8528b3d6f814475c1ceae19bbfa.zip |
Initial commit
Signed-off-by: Florian Schmaus <flow@gentoo.org>
-rw-r--r-- | LICENSE | 15 | ||||
-rwxr-xr-x | bootstrap-tex4ht | 49 | ||||
-rwxr-xr-x | populate-distdir | 16 |
3 files changed, 80 insertions, 0 deletions
@@ -0,0 +1,15 @@ +Gentoo tex-dev - Code to package TeX on Gentoo +Copyright (C) 1999-2023 Gentoo Authors + +This program 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 program 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. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <https://www.gnu.org/licenses/>. diff --git a/bootstrap-tex4ht b/bootstrap-tex4ht new file mode 100755 index 0000000..303dbe0 --- /dev/null +++ b/bootstrap-tex4ht @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +set -eu +set -x +: ${WORKDIR:=/var/tmp/tex4ht-sources-bootstrap} +if [[ ! -d "${WORKDIR}" ]]; then + mkdir "${WORKDIR}" +fi +cd "${WORKDIR}" +if [[ ! -d tex4ht-svn ]]; then + svn checkout https://svn.gnu.org.ua/sources/tex4ht tex4ht-svn +fi +pushd tex4ht-svn +TEX4HT_SVN_VERSION=$(svnversion) +popd +if [[ ! -d texmf-dist ]]; then + wget wget https://mirrors.ctan.org/systems/texlive/tlnet/archive/tex4ht.tar.xz + unp tex4ht.tar.xz +fi +if [[ ! -d bin ]]; then + wget https://mirrors.ctan.org/systems/texlive/tlnet/archive/tex4ht.x86_64-linux.tar.xz + unp tex4ht.x86_64-linux.tar.xz +fi +TEX4HT_BIN_DIR="${WORKDIR}/bin/x86_64-linux" + +pushd tex4ht-svn/trunk/lit +# In theory, we only want the sources that are generated by the +# 't4ht.c', 'tex4ht.c', and 'jar' targets. However, that make +# invocation fails, so we simply make everything. +# PATH="${TEX4HT_BIN_DIR}:${PATH}" make do_java=0 t4ht.c tex4ht.c jar +PATH="${TEX4HT_BIN_DIR}:${PATH}" make do_java=0 +popd +if [[ -d tex4ht-sources ]]; then + rm -rf tex4ht-sources +fi +mkdir tex4ht-sources +mkdir tex4ht-sources/c +mkdir tex4ht-sources/java +mkdir tex4ht-sources/java/tex4ht + +mv tex4ht-svn/trunk/lit/*.c tex4ht-sources/c +mv tex4ht-svn/trunk/lit/*.java tex4ht-sources/java/tex4ht +mv tex4ht-svn/trunk/lit/work.dir/src/* tex4ht-sources/java/ + +pushd tex4ht-sources +XZ_OPT='-T0 -9' tar -acf ../tex4ht-sources-${TEX4HT_SVN_VERSION}.tar.xz . +popd + +OUTPUT=$(realpath tex4ht-sources-${TEX4HT_SVN_VERSION}.tar.xz) +echo "Created $OUTPUT" diff --git a/populate-distdir b/populate-distdir new file mode 100755 index 0000000..75e4042 --- /dev/null +++ b/populate-distdir @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -euo pipefail + +SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) + +: ${TEX_OVERLAY_PATH:=$(portageq get_repo_path / tex-overlay) +: ${DISTDIR:="${SCRIPT_DIR}/distdir"} + +if [[ ! -d "${DISTDIR}" ]]; then + mkdir "${DISTDIR}" +fi + +export DISTDIR + +find "${TEX_OVERLAY_PATH}" -type f -name '*.ebuild' -print0 |\ + xargs --null -I {} ebuild {} manifest fetch |