Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Exiv2 #3503

Merged
merged 4 commits into from
Aug 17, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions E/Exiv2/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 = "Exiv2"
version = v"0.27.4"

# Collection of sources required to complete build
sources = [
ArchiveSource("https://github.com/Exiv2/exiv2/archive/refs/tags/v$(version).tar.gz", "9fb2752c92f63c9853e0bef9768f21138eeac046280f40ded5f37d06a34880d9")
]

# Bash recipe for building across all platforms
script = raw"""

cd $WORKSPACE/srcdir/exiv2-*

if [[ "${target}" == *-linux-musl ]]; then
# Delete libexpat to prevent it from being picked up by mistake
rm /usr/lib/libexpat.so*
fi

mkdir build
cd build/

cmake .. \
-DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
-DEXIV2_BUILD_SAMPLES=OFF \
-DIconv_INCLUDE_DIR=${includedir}

make -j${nproc}
make install
"""

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


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

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="Zlib_jll", uuid="83775a58-1f1d-513f-b197-d71354ab007a"))
Dependency(PackageSpec(name="Expat_jll", uuid="2e619515-83b5-522b-bb60-26c02a35a201"))
giordano marked this conversation as resolved.
Show resolved Hide resolved
Dependency(PackageSpec(name="libpng_jll", uuid="b53b4c65-9356-5827-b1ea-8c7a1a84506f"))
Dependency(PackageSpec(name="Gettext_jll", uuid="78b55507-aeef-58d4-861c-77aaff3498b1"))
Crghilardi marked this conversation as resolved.
Show resolved Hide resolved
Dependency(PackageSpec(name="Libiconv_jll", uuid="94ce4f54-9a6c-5748-9c1c-f9c7231a4531"))
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")
Crghilardi marked this conversation as resolved.
Show resolved Hide resolved