Skip to content

Commit

Permalink
[Leptonica] Upgrade to v1.81.1 and build for experimental platforms (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano authored Jul 10, 2021
1 parent 159e359 commit 9d3df94
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions L/Leptonica/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
using BinaryBuilder, Pkg

name = "Leptonica"
version = v"1.79.0"
version = v"1.81.1"

# Collection of sources required to build Leptonica
sources = [
ArchiveSource("http://www.leptonica.org/source/leptonica-$(version).tar.gz",
"045966c9c5d60ebded314a9931007a56d9d2f7a6ac39cb5cc077c816f62300d8"),
ArchiveSource("https://github.com/DanBloomberg/leptonica/releases/download/$(version)/leptonica-$(version).tar.gz",
"0f4eb315e9bdddd797f4c55fdea4e1f45fca7e3b358a2fc693fd957ce2c43ca9"),
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/leptonica-*/
export CPPFLAGS="-I$prefix/include"
cd $WORKSPACE/srcdir/leptonica*/
export CPPFLAGS="-I${includedir}"
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target}
make -j${nproc}
make install
Expand All @@ -23,7 +23,7 @@ install_license leptonica-license.txt

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()
platforms = supported_platforms(; experimental=true)

# The products that we will ensure are always built
products = [
Expand All @@ -42,14 +42,16 @@ products = [

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="Giflib_jll", uuid="59f7168a-df46-5410-90c8-f2779963d0ec"))
Dependency(PackageSpec(name="JpegTurbo_jll", uuid="aacddb02-875f-59d6-b918-886e6ef4fbf8"))
Dependency(PackageSpec(name="libpng_jll", uuid="b53b4c65-9356-5827-b1ea-8c7a1a84506f"))
Dependency(PackageSpec(name="Libtiff_jll", uuid="89763e89-9b03-5906-acba-b20f662cd828"))
Dependency(PackageSpec(name="libwebp_jll", uuid="c5f90fcd-3b7e-5836-afba-fc50a0988cb2"))
Dependency(PackageSpec(name="Zlib_jll", uuid="83775a58-1f1d-513f-b197-d71354ab007a"))
Dependency(PackageSpec(name="OpenJpeg_jll", uuid="643b3616-a352-519d-856d-80112ee9badc"))
Dependency(PackageSpec(name="Giflib_jll", uuid="59f7168a-df46-5410-90c8-f2779963d0ec")),
Dependency(PackageSpec(name="JpegTurbo_jll", uuid="aacddb02-875f-59d6-b918-886e6ef4fbf8")),
Dependency(PackageSpec(name="libpng_jll", uuid="b53b4c65-9356-5827-b1ea-8c7a1a84506f")),
Dependency(PackageSpec(name="Libtiff_jll", uuid="89763e89-9b03-5906-acba-b20f662cd828")),
Dependency(PackageSpec(name="libwebp_jll", uuid="c5f90fcd-3b7e-5836-afba-fc50a0988cb2")),
Dependency(PackageSpec(name="Zlib_jll", uuid="83775a58-1f1d-513f-b197-d71354ab007a")),
# Leptonica has a runtime check on the minor version of OpenJpeg, because why not:
# https://github.com/DanBloomberg/leptonica/blob/68d2cc15b955192f65772689d258a6d10dba52f5/src/jp2kio.c#L268-L272
Dependency("OpenJpeg_jll"; compat="~2.4.0"),
]

# Build the tarballs.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")

0 comments on commit 9d3df94

Please sign in to comment.