From 0227af7ba03ce8528b3d6f814475c1ceae19bbfa Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 7 Nov 2023 09:35:40 +0100 Subject: Initial commit Signed-off-by: Florian Schmaus --- LICENSE | 15 +++++++++++++++ bootstrap-tex4ht | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ populate-distdir | 16 ++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 LICENSE create mode 100755 bootstrap-tex4ht create mode 100755 populate-distdir diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7f7781a --- /dev/null +++ b/LICENSE @@ -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 . 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 -- cgit v1.2.3-65-gdbad