diff options
author | Karl Berry <karl@freefriends.org> | 2019-12-19 22:11:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-12-19 22:11:59 +0000 |
commit | 8876a8021514f190d676e4e5261f1084a66754d3 (patch) | |
tree | 9a496107a312a1acbbdb06ea0e1657c285109729 /Master/texmf-dist/scripts/pgf | |
parent | 693eacf895c01285e2992460bb489142ead8ae8a (diff) |
pgf (19dec19)
git-svn-id: svn://tug.org/texlive/trunk@53187 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/pgf')
-rw-r--r-- | Master/texmf-dist/scripts/pgf/Makefile.pgf_release | 144 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/pgf/pgfrevisionfile.sh | 43 |
2 files changed, 187 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/pgf/Makefile.pgf_release b/Master/texmf-dist/scripts/pgf/Makefile.pgf_release new file mode 100644 index 00000000000..611a6171536 --- /dev/null +++ b/Master/texmf-dist/scripts/pgf/Makefile.pgf_release @@ -0,0 +1,144 @@ +# release script which generates a TDS zip file. +# +# DO NOT invoke this from a pgf directory, +# use +# make -f pgf/scripts/pgf/Makefile.pgf_release +# +# use +# make -f pgf/scripts/pgf/Makefile.pgf_release upload USER=cfeuersaenger +# to (a) create a current snapshot as-is and (b) upload it to +# http://pgf.sourceforge.net/ +# +# Note that the index.php on sourceforge expects VERSION=_CVS . +# + +VERSION=_$(shell git --git-dir=pgf/.git describe --abbrev=0 --tags) + +USER=cfeuersaenger + +ZIP=pgf$(VERSION).tds.zip +CTANZIP=pgf$(VERSION).ctan.flatdir.zip +PDF=pgf$(VERSION).pdf +CHANGELOG=pgf$(VERSION).ChangeLog + +files: zip ctanzip pdf $(CHANGELOG) + +zip: $(ZIP) + +pdf: $(PDF) + +upload: $(ZIP) $(PDF) $(CHANGELOG) + scp $^ $(USER),pgf@web.sourceforge.net:htdocs/ + +FORCE: + +$(ZIP): FORCE + # collect into /tmp/pgf: + rm -fr /tmp/pgf /tmp/$@ + rsync --copy-links \ + --exclude=CVS \ + --exclude=.git \ + --exclude='.*.sw?' \ + --exclude='*.aux' \ + --exclude='*.log' \ + --exclude='*~' \ + --exclude='*.bbl' \ + --exclude='*.blg' \ + --exclude='*.idx' \ + --exclude='*.ilg' \ + --exclude='*.log' \ + --exclude='*.ind' \ + --exclude='*.toc' \ + --exclude='*.out' \ + --exclude='*.djs' \ + --exclude='*.tmp' \ + --exclude='*.tuo' \ + --exclude='*.tui' \ + --exclude='*.top' \ + --exclude='*.pgf' \ + --exclude='*.mp' \ + --exclude='.#*' \ + --exclude='.gitignore' \ + --exclude='.cvsignore' \ + --exclude='Makefile.pgf_release' \ + -r pgf /tmp + # cleanup docs: + cp /tmp/pgf/doc/generic/pgf/version-for-luatex/en/pgfmanual.pdf /tmp/pgf/doc/generic/pgf/pgfmanual.pdf + make -C /tmp/pgf/doc/generic/pgf/version-for-dvipdfm/en clean + make -C /tmp/pgf/doc/generic/pgf/version-for-dvipdfmx/en clean + make -C /tmp/pgf/doc/generic/pgf/version-for-dvips/en clean + make -C /tmp/pgf/doc/generic/pgf/version-for-tex4ht/en clean + make -C /tmp/pgf/doc/generic/pgf/version-for-vtex/en clean + make -C /tmp/pgf/doc/generic/pgf/version-for-xetex/en clean + make -C /tmp/pgf/doc/generic/pgf/version-for-luatex/en clean + make -C /tmp/pgf/doc/generic/pgf/version-for-pdftex/en clean + # now restructure to get TDS: + cd /tmp/pgf; \ + rm -f README.md; \ + rm -f .travis.yml; \ + rm -f .gitignore; \ + rm -rf .github; \ + rm -rf ci; \ + rm -rf experiments; \ + rm -rf scripts; \ + rm -f doc/generic/pgf/version-for-dvips/en/pgfmanual-test*; \ + rm -f doc/generic/pgf/version-for-dvisvgm/en/color.cfg; \ + rm README; \ + mv README-3.0.0 doc/generic/pgf; + # clean-up tests: + make -C /tmp/pgf/source/generic/pgf/testsuite/external clean + rm -f /tmp/pgf/source/generic/pgf/testsuite/mathtest/pgfmathtestsuite.pdf + # generate FILES file: + cd /tmp && find pgf -type f > /tmp/pgf/doc/generic/pgf/FILES + # generate zip archive: + cd /tmp/pgf && zip -r /tmp/$@ * + # copy archive to make target: + cp /tmp/$@ $@ + # show file size(s) + find `pwd` -maxdepth 1 \( -name '$(@:.zip=)*' \) -ls + +ctanzip: $(CTANZIP) + +# code to satisfy http://www.ctan.org/upload ... +$(CTANZIP): $(ZIP) + cd /tmp && zip -r $(abspath $@) pgf pgf.tds.zip + rm -fr /tmp/pgf /tmp/pgf.ctan.tmp $@ + mkdir -p /tmp/pgf /tmp/pgf.ctan.tmp + cd /tmp/pgf.ctan.tmp && unzip $(abspath $(ZIP)) + mv /tmp/pgf.ctan.tmp/doc/generic/pgf/README /tmp/pgf + mv /tmp/pgf.ctan.tmp/doc/generic/pgf /tmp/pgf/doc + cp $(ZIP) /tmp/pgf.tds.zip + mkdir /tmp/pgf/tex + mkdir /tmp/pgf/source + find /tmp/pgf.ctan.tmp/tex \( -type f ! -name '*.lua' \) -exec mv -i {} /tmp/pgf/tex \; + # + # try to make the .lua files "browsable" without throwing all in one dir... + mkdir -p /tmp/pgf/lua/graphdrawing /tmp/pgf/lua/luamath /tmp/pgf/lua/generic + cd /tmp/pgf.ctan.tmp/tex/generic/pgf/graphdrawing/lua && find -name '*.lua' | rsync -r --include-from - . /tmp/pgf/lua/graphdrawing + cd /tmp/pgf.ctan.tmp/tex/generic/pgf/libraries/luamath && find -name '*.lua' | rsync -r --include-from - . /tmp/pgf/lua/luamath + cd /tmp/pgf.ctan.tmp/tex/generic/pgf/lua && find -name '*.lua' | rsync -r --include-from - . /tmp/pgf/lua/generic + # + find /tmp/pgf.ctan.tmp/tex -name '*.lua' -delete + find /tmp/pgf.ctan.tmp/source \( -type f ! -name Makefile \) -exec mv -i {} /tmp/pgf/source \; + find /tmp/pgf.ctan.tmp/source -name 'Makefile' -delete + # + # I suppose this here is more or less empty anyway, but who cares: + find /tmp/pgf.ctan.tmp/doc -type f -exec mv -i {} /tmp/pgf/doc \; + # + # CTAN wishes to not have empty directories (version-for-*/en/plots): + find /tmp/pgf/doc -type d -exec rmdir {} \; > /dev/null 2>&1 || true + # + @# for some reason, CVS checks out some of the math*.tex files as executable which confuses the CTAN file checker: + find /tmp/pgf/tex -type f -exec chmod 06444 {} \; + rm /tmp/pgf/doc/INSTALL + echo "Please search for pgf.tds.zip and install that one into a local texmf branch (which is typically simpler). This release is intended to satisfy CTAN package browsing policies." > /tmp/pgf/INSTALL_NOTES + @NUM_FILES=$$(find /tmp/pgf.ctan.tmp/ -type f |wc -l); \ + if [ $$NUM_FILES -gt 0 ]; then echo "INTERNAL FAILURE: $$NUM_FILES FILES LEFT OVER IN /tmp/pgf.ctan.tmp! All must be included into $@. Left-overs:"; find /tmp/pgf.ctan.tmp/ -type f; exit 1; fi + cd /tmp && zip -r $(abspath $@) pgf pgf.tds.zip + +$(CHANGELOG): FORCE + cp pgf/doc/generic/pgf/ChangeLog $(CHANGELOG) + +$(PDF): pgf/doc/generic/pgf/version-for-luatex/en/pgfmanual.pdf + cp $< $@ + diff --git a/Master/texmf-dist/scripts/pgf/pgfrevisionfile.sh b/Master/texmf-dist/scripts/pgf/pgfrevisionfile.sh new file mode 100755 index 00000000000..b2f596ce734 --- /dev/null +++ b/Master/texmf-dist/scripts/pgf/pgfrevisionfile.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# it generates tex/generic/pgf/pgf.revision.tex which, in turn, will be loaded +# by pgf.sty +# +# The resulting macros define the current version of pgf. + +set -e + +LATEST_TAG=`git describe --abbrev=0 --tags` +REVISION=`git describe --tags HEAD` + + +rm -f tex/generic/pgf/pgf.revision.tex +echo '\begingroup' >> tex/generic/pgf/pgf.revision.tex +echo '\catcode`\-=12' >> tex/generic/pgf/pgf.revision.tex +echo '\catcode`\/=12' >> tex/generic/pgf/pgf.revision.tex +echo '\catcode`\.=12' >> tex/generic/pgf/pgf.revision.tex +echo '\catcode`\:=12' >> tex/generic/pgf/pgf.revision.tex +echo '\catcode`\+=12' >> tex/generic/pgf/pgf.revision.tex +echo '\catcode`\-=12' >> tex/generic/pgf/pgf.revision.tex + +# this is the REVISION, i.e. the unique hash of the changeset. +echo '\gdef\pgfrevision{'"$REVISION}" >> tex/generic/pgf/pgf.revision.tex + +# this is the public version name. It corresponds to the latest tag name in the git repo. +echo '\gdef\pgfversion{'"$LATEST_TAG}" >> tex/generic/pgf/pgf.revision.tex + +# this is the commit date of the latest tag, i.e. the date when \pgfversion has been committed. +# It is NOT the date of \pgfrevision. +echo -n '\gdef\pgfversiondatetime{' >> tex/generic/pgf/pgf.revision.tex +git log -n 1 "$LATEST_TAG" --pretty=format:"%ci" >> tex/generic/pgf/pgf.revision.tex +echo '}' >> tex/generic/pgf/pgf.revision.tex + +echo -n '\gdef\pgfrevisiondatetime{' >> tex/generic/pgf/pgf.revision.tex +git log -n 1 "$REVISION" --pretty=format:"%ci" >> tex/generic/pgf/pgf.revision.tex +echo '}' >> tex/generic/pgf/pgf.revision.tex + +# convert to latex format YYYY/MM/DD : +echo '\gdef\pgf@glob@TMPa#1-#2-#3 #4\relax{#1/#2/#3}' >> tex/generic/pgf/pgf.revision.tex +echo '\xdef\pgfversiondate{\expandafter\pgf@glob@TMPa\pgfversiondatetime\relax}' >> tex/generic/pgf/pgf.revision.tex +echo '\xdef\pgfrevisiondate{\expandafter\pgf@glob@TMPa\pgfrevisiondatetime\relax}' >> tex/generic/pgf/pgf.revision.tex +echo '\endgroup' >> tex/generic/pgf/pgf.revision.tex +exit 0 |