4848 PATCH_GMP_ARM64=yes
4949 shift
5050 ;;
51+ --use-gmp-github-mirror)
52+ USE_GMP_GITHUB_MIRROR=yes
53+ shift
54+ ;;
5155 * )
5256 2>&1 echo " unrecognised argument:" $key
5357 exit 1
@@ -82,17 +86,22 @@ if [ $USE_GMP = "gmp" ]; then
8286 # #
8387 # ----------------------------------------------------------------------- #
8488
85- curl -O https://gmplib.org/download/gmp/gmp-$GMPVER .tar.xz
89+ if [ $USE_GMP_GITHUB_MIRROR = " yes" ]; then
90+ # Needed in GitHub Actions because it is blocked from gmplib.org
91+ git clone https://github.com/oscarbenjamin/gmp_mirror.git
92+ cp gmp_mirror/gmp-$GMPVER .tar.xz .
93+ else
94+ curl -O https://gmplib.org/download/gmp/gmp-$GMPVER .tar.xz
95+ fi
96+
8697 tar xf gmp-$GMPVER .tar.xz
8798 cd gmp-$GMPVER
8899
89100 #
90101 # See https://github.com/aleaxit/gmpy/issues/350
91102 #
92- # We need to patch GMP for OSX arm64 (Apple M1) hardware. This patch is
93- # from the GMP repo but was applied after the release of GMP 6.2.1.
94- # Hopefully when a newer version of GMP is released we will not need to
95- # apply this patch any more.
103+ # We need to patch GMP for OSX arm64 (Apple M1) hardware for GMP 6.2.1.
104+ # Now with GMP 6.3.0 this should not be needed any more.
96105 #
97106 if [ $PATCH_GMP_ARM64 = " yes" ]; then
98107 echo
@@ -103,6 +112,7 @@ if [ $USE_GMP = "gmp" ]; then
103112 fi
104113
105114 # Show the output of configfsf.guess
115+ chmod +x configfsf.guess
106116 ./configfsf.guess
107117 ./configure --prefix=$PREFIX \
108118 --enable-fat\
0 commit comments