Skip to content

Commit

Permalink
New Recipe: Pfapack v0.1.0 (#4754)
Browse files Browse the repository at this point in the history
* Add Pfapack77 Build

* .so is Default

* Fix: DLL is in bin/ Under Windows

* Update P/Pfapack/build_tarballs.jl

libblastrampoline starts from 1.7

Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>

* Correct to Predefined EnvVars

* Update P/Pfapack/build_tarballs.jl

Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>

* Adjust Deps, Platforms, etc.

* Update P/Pfapack/build_tarballs.jl

Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>

* Update build_tarballs.jl

Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
  • Loading branch information
xrq-phys and giordano authored Apr 14, 2022
1 parent 9d058ca commit 3128588
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions P/Pfapack/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg

name = "Pfapack"
version = v"0.1.0"

# Collection of sources required to complete build
sources = [
GitSource("https://github.com/xrq-phys/Pfapack.git", "0c71536b9641a0c8f4da67b373e3d4d5514561ab")
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir
cd Pfapack
cmake fortran \
-DCMAKE_INSTALL_PREFIX=${prefix} \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release
make -j${nproc} VERBOSE=1
make install
# Manual conversion from static to dynamic lib.
# Avoid linking libgfortran (these .f files make no reference to Fortran libs.)
cc -shared -Wl,-force_load,${prefix}/lib/libpfapack.a \
-o ${libdir}/libpfapack.${dlext} \
-L${libdir} -lblastrampoline -lm
# Copy license file
install_license LapackLicence
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
# No need to expand Fortran version since there code make no call to
# standard Fortran libraries
platforms = supported_platforms()


# The products that we will ensure are always built
products = [
LibraryProduct("libpfapack", :libpfapack)
]

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="libblastrampoline_jll", uuid="8e850b90-86db-534c-a0d3-1478176c7d93"))
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.7")

0 comments on commit 3128588

Please sign in to comment.