Skip to content

Commit

Permalink
[libgeotiff] build against latest PROJ (#9586)
Browse files Browse the repository at this point in the history
* [libgeotiff] build against latest PROJ

* Set preferred_gcc_version=v"8"

* Disable freebsd and set optional deps
  • Loading branch information
visr authored Oct 10, 2024
1 parent 2383e3f commit 9989299
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions L/libgeotiff/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,42 @@ using BinaryBuilder, Pkg

name = "libgeotiff"
upstream_version = v"1.7.3"
version_offset = v"0.1.0"
version_offset = v"0.2.0"
version = VersionNumber(upstream_version.major * 100 + version_offset.major,
upstream_version.minor * 100 + version_offset.minor,
upstream_version.patch * 100 + version_offset.patch)

# Collection of sources required to complete build
sources = [
ArchiveSource("https://github.com/OSGeo/libgeotiff/releases/download/$upstream_version/libgeotiff-$upstream_version.tar.gz",
"ba23a3a35980ed3de916e125c739251f8e3266be07540200125a307d7cf5a704"),
GitSource("https://github.com/OSGeo/libgeotiff.git",
"d2c72dba35ac9d1af2201191064ca4cbe7f57f11"),
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/libgeotiff-*/
cd $WORKSPACE/srcdir/libgeotiff/libgeotiff
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DWITH_JPEG=ON \
-DWITH_ZLIB=ON \
..
make -j${nproc}
make install
install_license ../LICENSE
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()
# Disable until the dependencies are available for this platform
filter!(p -> !(Sys.isfreebsd(p) && arch(p) == "aarch64"), platforms)

# The products that we will ensure are always built
products = [
Expand All @@ -45,12 +50,15 @@ products = [

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency("PROJ_jll"; compat="901.300.0"),
Dependency("Libtiff_jll"; compat="4.5.1"),
Dependency("JpegTurbo_jll"; compat="3.0.1"),
Dependency("LibCURL_jll"; compat="7.73,8"),
Dependency("Libtiff_jll"; compat="4.7"),
Dependency("PROJ_jll"; compat="902.500"),
Dependency("Zlib_jll"; compat="1.3"),
]

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

# Build trigger: 1

0 comments on commit 9989299

Please sign in to comment.