Skip to content

Commit 76aff6e

Browse files
committed
Add libtommath 1.3.0
1 parent 1be3202 commit 76aff6e

File tree

7 files changed

+529
-0
lines changed

7 files changed

+529
-0
lines changed

ci_config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,16 @@
778778
"windows": false
779779
}
780780
},
781+
"libtommath": {
782+
"_comment": "MSVC build fails because it doesn't optimize away unreachable code leaving undefined symbols.",
783+
"build_options": [
784+
"libtommath:tests=true",
785+
"libtommath:buildtype=release"
786+
],
787+
"build_on": {
788+
"windows": false
789+
}
790+
},
781791
"libupnp": {
782792
"_comment": "Requires some special pthread library",
783793
"build_on": {

releases.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,6 +2459,14 @@
24592459
"1.17-1"
24602460
]
24612461
},
2462+
"libtommath": {
2463+
"dependency_names": [
2464+
"libtommath"
2465+
],
2466+
"versions": [
2467+
"1.3.0-1"
2468+
]
2469+
},
24622470
"libunibreak": {
24632471
"dependency_names": [
24642472
"libunibreak"

subprojects/libtommath.wrap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[wrap-file]
2+
directory = libtommath-1.3.0
3+
source_url = https://github.com/libtom/libtommath/releases/download/v1.3.0/ltm-1.3.0.tar.xz
4+
source_filename = libtommath-1.3.0.tar.xz
5+
source_hash = 296272d93435991308eb73607600c034b558807a07e829e751142e65ccfa9d08
6+
patch_directory = libtommath
7+
8+
[provide]
9+
dependency_names = libtommath
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/sh
2+
# Build the libtommath PDF manual from LaTeX sources
3+
# This script is called by meson with the following environment variables set:
4+
# LATEX, PDFLATEX, MAKEINDEX, SED, DATE, STAT
5+
#
6+
# Requires GNU coreutils (for date -d and stat) and GNU sed (for sed -b)
7+
8+
set -e
9+
10+
INPUT="$1"
11+
OUTDIR="$2"
12+
OUTPUT="$3"
13+
14+
cd "$OUTDIR"
15+
cp "$INPUT" bn.tex
16+
cp bn.tex bn.bak
17+
touch --reference=bn.tex bn.bak
18+
19+
# Create deterministic PDF timestamp
20+
(printf "%s" "\\def\\fixedpdfdate{"; "$DATE" +'D:%Y%m%d%H%M%S%:z' -d @$("$STAT" --format=%Y bn.tex) | "$SED" "s/:\\([0-9][0-9]\\)$/\'\\1\'}/g") > bn-deterministic.tex
21+
printf "%s\\n" "\\pdfinfo{" >> bn-deterministic.tex
22+
printf "%s\\n" " /CreationDate (\\fixedpdfdate)" >> bn-deterministic.tex
23+
printf "%s\\n}\\n" " /ModDate (\\fixedpdfdate)" >> bn-deterministic.tex
24+
cat bn.tex >> bn-deterministic.tex
25+
mv bn-deterministic.tex bn.tex
26+
touch --reference=bn.bak bn.tex
27+
28+
# Build the manual
29+
echo "hello" > bn.ind
30+
"$LATEX" bn > /dev/null
31+
"$LATEX" bn > /dev/null
32+
"$MAKEINDEX" bn
33+
"$LATEX" bn > /dev/null
34+
"$PDFLATEX" bn > /dev/null
35+
36+
# Make PDF ID deterministic
37+
"$SED" -b -i 's,^/ID \[.*\]$,/ID [<0> <0>],g' bn.pdf
38+
39+
# Rename to desired output name
40+
mv bn.pdf "$OUTPUT"
41+
42+
# Cleanup
43+
mv bn.bak bn.tex
44+
rm -f bn.aux bn.dvi bn.log bn.idx bn.lof bn.out bn.toc bn.ilg bn.ind bn.tex || true

0 commit comments

Comments
 (0)