-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
144 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
echo "dll2lib" | ||
@echo off | ||
|
||
REM From https://github.com/GBillotey/Fractalshades/blob/master/win_build/dll2lib.bat | ||
|
||
REM Usage: dll2lib [32|64] some-file.dll | ||
REM | ||
REM Generates some-file.lib from some-file.dll, making an intermediate | ||
REM some-file.def from the results of dumpbin /exports some-file.dll. | ||
REM | ||
REM Requires 'dumpbin' and 'lib' in PATH - run from VS developer prompt. | ||
REM | ||
REM Script inspired by http://stackoverflow.com/questions/9946322/how-to-generate-an-import-library-lib-file-from-a-dll | ||
REM See also https://gist.github.com/Trass3r/8d0232a66b098530d07b0e48df6ad5ef | ||
SETLOCAL | ||
set PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\" | ||
if "%1"=="32" (set machine=x86) else (set machine=x64) | ||
set mypath=%~p2 | ||
cd %mypath% | ||
set dll_file=%~f2 | ||
set dll_file_no_ext=%~n2 | ||
set exports_file=%dll_file_no_ext%-exports.txt | ||
set def_file=%dll_file_no_ext%.def | ||
set lib_file=%dll_file_no_ext%.lib | ||
set lib_name=%dll_file_no_ext% | ||
|
||
dumpbin /exports %dll_file% > %exports_file% | ||
|
||
echo LIBRARY %lib_name% > %def_file% | ||
echo EXPORTS >> %def_file% | ||
for /f "skip=19 tokens=1,4" %%A in (%exports_file%) do if NOT "%%B" == "" (echo %%B @%%A >> %def_file%) | ||
|
||
lib /def:%def_file% /out:%lib_file% /machine:%machine% | ||
|
||
REM Clean up temporary intermediate files | ||
del %exports_file% %def_file% %dll_file_no_ext%.exp | ||
|
||
ren %lib_file% %3.lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/sh | ||
|
||
set -e -x | ||
|
||
GMP_VERSION=6.3.0 | ||
MPFR_VERSION=4.2.1 | ||
MPC_VERSION=1.3.1 | ||
|
||
# OSTYPE: msys | ||
PREFIX=/ucrt64 | ||
|
||
if [ ! -f finish_before_ci_build ] | ||
then | ||
# -- build GMP -- | ||
curl -s -O https://ftp.gnu.org/gnu/gmp/gmp-${GMP_VERSION}.tar.xz | ||
tar -xf gmp-${GMP_VERSION}.tar.xz | ||
cd gmp-${GMP_VERSION} | ||
# config.guess uses microarchitecture and configfsf.guess doesn't | ||
# We replace config.guess with configfsf.guess to avoid microarchitecture | ||
# specific code in common code. | ||
rm config.guess && mv configfsf.guess config.guess && chmod +x config.guess | ||
./configure --enable-fat \ | ||
--enable-shared \ | ||
--disable-static | ||
make -j6 | ||
make install | ||
cd ../ | ||
|
||
# -- build MPFR | ||
curl -s -O https://ftp.gnu.org/gnu/mpfr/mpfr-${MPFR_VERSION}.tar.gz | ||
tar -xf mpfr-${MPFR_VERSION}.tar.gz | ||
cd mpfr-${MPFR_VERSION} | ||
./configure --enable-shared \ | ||
--disable-static | ||
make -j6 | ||
make install | ||
cd ../ | ||
# -- build MPC -- | ||
curl -s -O https://ftp.gnu.org/gnu/mpc/mpc-${MPC_VERSION}.tar.gz | ||
tar -xf mpc-${MPC_VERSION}.tar.gz | ||
cd mpc-${MPC_VERSION} | ||
./configure --enable-shared \ | ||
--disable-static | ||
make -j6 | ||
make install | ||
cd ../ | ||
|
||
# -- copy headers -- | ||
cp $PREFIX/include/{gmp,mpfr,mpc}.h gmpy2/ | ||
|
||
touch finish_before_ci_build | ||
else | ||
(cd gmp-*[0-9] && make install) | ||
(cd mpfr-*[0-9] && make install) | ||
(cd mpc-*[0-9] && make install) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#dest_dir=$1 | ||
#wheel=$2 | ||
#wheel unpack --dest ${dest_dir} ${wheel} | ||
#cp /gmp/include/{gmp,mpfr,mpc}.h ${dest_dir}/gmpy2-*/gmpy2/ | ||
#(cd ${dest_dir} && wheel pack gmpy2-*[0-9]) | ||
#cp ${dest_dir}/gmpy2-*.whl ${wheel} | ||
#rm -rf ${dest_dir}/* | ||
#delvewheel repair ${wheel} -w ${dest_dir} --add-path ../gmpy2.libs | ||
# cleanup libs from before_ci_build*.sh | ||
(cd gmp-*[0-9] && make uninstall) | ||
(cd mpfr-*[0-9] && make uninstall) | ||
(cd mpc-*[0-9] && make uninstall) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters