Skip to content

Commit 92431a1

Browse files
ViralBShahgiordano
andauthored
[OpenModelica 1.24.0] New build (#8987)
--------- Co-authored-by: Viral B. Shah <[email protected]> Co-authored-by: Mosè Giordano <[email protected]>
1 parent 075ccae commit 92431a1

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

O/OpenModelica/build_tarballs.jl

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
using BinaryBuilder, Pkg
2+
3+
name = "OpenModelica"
4+
version = v"1.24.3"
5+
6+
sources = [
7+
GitSource("https://github.com/OpenModelica/OpenModelica.git",
8+
"fcf63c83c7e8d66b7c5da922376ec54a5f1faad7"),
9+
]
10+
11+
# Bash recipe for building across all platforms
12+
script = raw"""
13+
cd $WORKSPACE/srcdir
14+
mv OpenModelica OM-ignore
15+
git clone https://github.com/OpenModelica/OpenModelica.git
16+
cd OpenModelica
17+
git checkout 904c4c783a5fa6eb9e99e4a98bdb0cca1d619303
18+
git submodule update --force --init --recursive
19+
20+
apk --update --no-chown add openjdk17-jdk
21+
22+
cmake -S . -B build_cmake -DCMAKE_INSTALL_PREFIX=$prefix \
23+
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
24+
-DCMAKE_BUILD_TYPE=Release \
25+
-DBLA_VENDOR=libopenblas \
26+
-DBLAS_LIBRARIES="-L${libdir} -lopenblas" \
27+
-DLAPACK_LIBRARIES="-L${libdir} -lopenblas" \
28+
-DOM_ENABLE_GUI_CLIENTS=OFF \
29+
-DOM_OMC_ENABLE_IPOPT=OFF \
30+
-DHAVE_MMAP_DEV_ZERO=0 \
31+
-DHAVE_MMAP_DEV_ZERO_EXITCODE__TRYRUN_OUTPUT=""
32+
33+
cmake --build build_cmake --parallel ${nprocs} --target install
34+
35+
install_license OSMC-License.txt
36+
"""
37+
38+
# These are the platforms we will build for by default, unless further
39+
# platforms are passed in on the command line
40+
platforms = [
41+
Platform("x86_64", "linux"; libc="glibc", cxxstring_abi="cxx11"),
42+
]
43+
platforms = expand_cxxstring_abis(platforms)
44+
45+
# The products that we will ensure are always built
46+
products = [
47+
ExecutableProduct("omc", :omc),
48+
# ExecutableProduct("OMShell-terminal", :OMShell_terminal),
49+
]
50+
51+
# Dependencies that must be installed before this package can be built
52+
dependencies = [
53+
BuildDependency("OpenCL_Headers_jll"),
54+
Dependency("CompilerSupportLibraries_jll"),
55+
Dependency("OpenBLAS32_jll"),
56+
Dependency("flex_jll"),
57+
Dependency("LibCURL_jll"),
58+
Dependency("util_linux_jll"),
59+
Dependency("boost_jll"; compat="=1.76.0"),
60+
Dependency("LLVMOpenMP_jll"),
61+
Dependency("OpenCL_jll"),
62+
Dependency("Expat_jll"),
63+
Dependency("Libiconv_jll"),
64+
Dependency("Gettext_jll")
65+
]
66+
67+
# Build the tarballs, and possibly a `build.jl` as well.
68+
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
69+
julia_compat="1.10", clang_use_lld=false, preferred_gcc_version=v"10")

0 commit comments

Comments
 (0)