2
2
# `julia build_tarballs.jl --help` to see a usage message.
3
3
using BinaryBuilder, Pkg
4
4
5
- name = " SCIP"
5
+ name = " SCIP_PaPILO"
6
+
6
7
upstream_version = v " 9.2.1"
7
8
version = VersionNumber (upstream_version. major * 100 , upstream_version. minor * 100 , upstream_version. patch * 100 )
8
9
@@ -12,72 +13,114 @@ sources = [
12
13
" https://scipopt.org/download/release/scipoptsuite-$(upstream_version) .tgz" ,
13
14
" 41b71a57af773403e9a6724f78c37d8396ac4b6b270a9bbf3716d67f1af12edf"
14
15
),
16
+ ArchiveSource (
17
+ " https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.13.sdk.tar.xz" ,
18
+ " a3a077385205039a7c6f9e2c98ecdf2a720b2a819da715e03e0630c75782c1e4"
19
+ ),
20
+ DirectorySource (" ./bundled/" )
15
21
]
16
22
17
23
# Bash recipe for building across all platforms
18
24
script = raw """
19
- # needed for now
20
- # clock_gettime requires linking to librt -lrt with old glibc
21
- # remove when CMake accounts for this
22
- if [[ " ${target}" == *86*-linux-gnu ]]; then
23
- export LDFLAGS="-lrt "
24
- elif [[ " ${target}" == *-mingw* ]]; then
25
- # this is required to link to bliss on mingw
26
- export LDFLAGS=-L${libdir}
25
+ # This requires macOS 10.13
26
+ if [[ "${target}" == x86_64-apple-darwin* ]]; then
27
+ pushd $WORKSPACE/srcdir/MacOSX10.*.sdk
28
+ rm -rf /opt/ ${target}/${target}/sys-root/System
29
+ cp -ra usr/* "/opt/${target}/${target}/sys-root/usr/. "
30
+ cp -ra System "/opt/ ${target}/${target}/sys-root/."
31
+ export MACOSX_DEPLOYMENT_TARGET=10.13
32
+ popd
27
33
fi
28
34
29
35
cd scipoptsuite*
30
36
37
+ # for soplex threadlocal
38
+ export CXXFLAGS="-DTHREADLOCAL=''"
39
+
40
+ # Enable large file support on mingw
41
+ if [[ "${target}" == *-mingw* ]]; then
42
+ export CXXFLAGS="-Wa,-mbig-obj"
43
+ fi
44
+
45
+ # Patch to fix linking with gfortran's library on mingw
46
+ # https://github.com/JuliaPackaging/Yggdrasil/pull/8224#issuecomment-2034941690
47
+ atomic_patch -p0 $WORKSPACE/srcdir/patches/papilo_cmake.patch
48
+
31
49
mkdir build
32
50
cd build/
33
51
cmake -DCMAKE_INSTALL_PREFIX=$prefix\
34
52
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN}\
35
53
-DCMAKE_BUILD_TYPE=Release\
36
- -DPAPILO=0\
37
54
-DZIMPL=OFF\
38
- -DGCG=0\
39
55
-DUG=0\
40
56
-DAMPL=0\
57
+ -DGCG=0\
41
58
-DBOOST=ON\
42
59
-DSYM=snauty\
43
60
-DTPI=tny\
44
61
-DIPOPT_DIR=${prefix} \
45
62
-DIPOPT_LIBRARIES=${libdir} \
63
+ -DBLISS_INCLUDE_DIR=${includedir} \
64
+ -DBLISS_LIBRARY=bliss \
65
+ -DBUILD_TESTING=OFF \
46
66
..
47
- make -j${nproc}
67
+ make -j${nproc} scip
68
+ make papilo-executable
69
+
48
70
make install
71
+ cp bin/papilo${exeext} "${bindir}/papilo${exeext}"
49
72
50
- mkdir -p ${prefix}/share/licenses/SCIP
51
- for dir in scip soplex; do
52
- cp $WORKSPACE/srcdir/scipoptsuite*/${dir}/LICENSE ${prefix}/share/licenses/SCIP /LICENSE_${dir}
73
+ mkdir -p ${prefix}/share/licenses/SCIP_PaPILO
74
+ for dir in scip soplex gcg ; do
75
+ cp $WORKSPACE/srcdir/scipoptsuite*/${dir}/LICENSE ${prefix}/share/licenses/SCIP_PaPILO /LICENSE_${dir}
53
76
done
54
- cp $WORKSPACE/srcdir/scipoptsuite*/papilo/COPYING ${prefix}/share/licenses/SCIP /LICENSE_papilo
77
+ cp $WORKSPACE/srcdir/scipoptsuite*/papilo/COPYING ${prefix}/share/licenses/SCIP_PaPILO /LICENSE_papilo
55
78
"""
56
79
57
80
# These are the platforms we will build for by default, unless further
58
81
# platforms are passed in on the command line
59
- platforms = expand_cxxstring_abis (supported_platforms ())
82
+ platforms = expand_gfortran_versions (expand_cxxstring_abis (supported_platforms (; experimental= true )))
83
+
84
+ # Filter out the aarch64 FreeBSD and RISC-V architectures because oneTBB isn't available there yet.
85
+ filter! (p -> ! (Sys. isfreebsd (p) && arch (p) == " aarch64" ), platforms)
86
+ filter! (p -> ! (Sys. islinux (p) && arch (p) == " riscv64" ), platforms)
87
+
60
88
filter! (platforms) do p
61
- ! (Sys . isfreebsd ( p) && arch (p) == " aarch64 " ) && ! occursin ( " riscv " , arch (p))
89
+ libgfortran_version ( p) >= v " 4 "
62
90
end
63
91
92
+
64
93
# The products that we will ensure are always built
65
94
products = [
95
+ ExecutableProduct (" papilo" , :papilo ),
96
+ ExecutableProduct (" scip" , :scip ),
66
97
LibraryProduct (" libscip" , :libscip ),
67
- ExecutableProduct (" scip" , :scipexe ),
68
- LibraryProduct (" libsoplexshared" , :libsoplex ),
69
98
]
70
99
71
- # Dependencies that must be installed before this package can be built
72
100
dependencies = [
101
+ Dependency (PackageSpec (name= " bliss_jll" , uuid= " 508c9074-7a14-5c94-9582-3d4bc1871065" ), compat= " =0.77.0" ),
73
102
Dependency (PackageSpec (name= " boost_jll" , uuid= " 28df3c45-c428-5900-9ff8-a3135698ca75" ); compat= " =1.79.0" ),
74
103
Dependency (PackageSpec (name= " Bzip2_jll" , uuid= " 6e34b625-4abd-537c-b88f-471c36dfa7a0" ); compat= " 1.0.9" ),
75
104
Dependency (PackageSpec (name= " CompilerSupportLibraries_jll" , uuid= " e66e0078-7015-5450-92f7-15fbd957f2ae" )),
76
- Dependency (PackageSpec (name= " GMP_jll" , uuid= " 781609d7-10c4-51f6-84f2-b8444358ff6d" ), v " 6.2.1" ),
77
- Dependency (PackageSpec (name= " Ipopt_jll" , uuid= " 9cc047cb-c261-5740-88fc-0cf96f7bdcc7" ); compat= " 300.1400.1400" ),
105
+ Dependency (PackageSpec (name= " GMP_jll" , uuid= " 781609d7-10c4-51f6-84f2-b8444358ff6d" ); compat= " 6.2.1" ),
106
+ Dependency (PackageSpec (name= " Ipopt_jll" , uuid= " 9cc047cb-c261-5740-88fc-0cf96f7bdcc7" ); compat= " =300.1400.1400" ),
107
+ Dependency (PackageSpec (name= " OpenBLAS32_jll" , uuid= " 656ef2d0-ae68-5445-9ca0-591084a874a2" ); compat= " 0.3.10" ),
108
+ Dependency (PackageSpec (name= " oneTBB_jll" , uuid= " 1317d2d5-d96f-522e-a858-c73665f53c3e" ); compat= " 2022.0.0" ),
78
109
Dependency (PackageSpec (name= " Readline_jll" , uuid= " 05236dd9-4125-5232-aa7c-9ec0c9b2c25a" )),
79
110
Dependency (PackageSpec (name= " Zlib_jll" , uuid= " 83775a58-1f1d-513f-b197-d71354ab007a" )),
80
111
]
81
112
82
113
# Build the tarballs, and possibly a `build.jl` as well.
83
- build_tarballs (ARGS , name, version, sources, script, platforms, products, dependencies; preferred_gcc_version = v " 12" , julia_compat= " 1.6" )
114
+ build_tarballs (
115
+ ARGS ,
116
+ name,
117
+ version,
118
+ sources,
119
+ script,
120
+ platforms,
121
+ products,
122
+ dependencies;
123
+ preferred_gcc_version= v " 10" ,
124
+ julia_compat= " 1.6" ,
125
+ clang_use_lld= false ,
126
+ )
0 commit comments