Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit c2384a7

Browse files
committed
Updated tarball, add spkg-src and fix instructions
1 parent 7592b4a commit c2384a7

File tree

4 files changed

+50
-7
lines changed

4 files changed

+50
-7
lines changed

build/pkgs/mpir/SPKG.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ See http://www.mpir.org
2525
- We currently don't use anything of GMP's/MPIR's CC setting, and matching
2626
with the current compiler (`$CC`) is perhaps suboptimal.
2727
* Remove some files / directories not needed for Sage from upstream:
28-
rm -rf src/build.vc* # Microsoft Visual C build files
29-
rm -rf src/yasm/Mkfiles/{dj,vc*} # DJGPP, Microsoft Visual C
30-
(Saves 13 of 40 MB uncompressed.)
28+
- build.vc* directories (Microsoft Visual C build files)
29+
* 3.0.0-644faf502c56f97d9accd301965fc57d6ec70868
30+
was created by running the spkg-src script.

build/pkgs/mpir/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=mpir-VERSION.tar.bz2
2-
sha1=1f7081c2f4a83fb4e9e3453bbafb6aa18f1c5d5a
3-
md5=308f4a981c0a2e796aa41ff3ac805b81
4-
cksum=2473237225
2+
sha1=30044be9f48ce15ddfc8871bde14e363fe2f46ea
3+
md5=55e9e31d6371b30dd046f16333c84499
4+
cksum=1799000157
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.1.p0
1+
3.0.0-644faf502c56f97d9accd301965fc57d6ec70868

build/pkgs/mpir/spkg-src

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [ -z "$SAGE_DISTFILES" ]; then
6+
echo >&2 "SAGE_DISTFILES undefined ... exiting"
7+
echo >&2 "Maybe run 'sage --sh'?"
8+
exit 1
9+
fi
10+
11+
set -e
12+
13+
PACKAGEVERSION=`cat $SAGE_ROOT/build/pkgs/mpir/package-version.txt`
14+
MPIRVERSION=mpir-`echo $PACKAGEVERSION | sed 's/-.*//'`
15+
TARBALLVERSION="mpir-$PACKAGEVERSION"
16+
17+
# Get the sources
18+
cd "$SAGE_DISTFILES"
19+
rm -rf mpir
20+
git clone https://github.com/wbhart/mpir.git mpir
21+
cd mpir
22+
git checkout 644faf502c56f97d9accd301965fc57d6ec70868
23+
24+
# Add auto-generated files
25+
./autogen.sh
26+
27+
# Create the tarball
28+
./configure
29+
make dist-bzip2
30+
31+
# Unpack the tarball, remove some unwanted stuff
32+
tar xjf $MPIRVERSION.tar.bz2
33+
find $MPIRVERSION -name 'build.vc*' -prune -exec rm -r {} \;
34+
35+
# Repackage the tarball and put it in SAGE_DISTFILES
36+
mv $MPIRVERSION $TARBALLVERSION
37+
tar c $TARBALLVERSION | bzip2 --best >../$TARBALLVERSION.tar.bz2
38+
sage-package fix-checksum mpir
39+
40+
# Cleanup
41+
cd "$SAGE_DISTFILES"
42+
rm -rf mpir
43+
echo "New MPIR tarball is ready in $SAGE_DISTFILES/$TARBALLVERSION.tar.bz2"

0 commit comments

Comments
 (0)