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

Wizard recipe: libgmime-v3.2.15 #9427

Merged
48 changes: 48 additions & 0 deletions L/libgmime/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 = "libgmime"
AlexKlo marked this conversation as resolved.
Show resolved Hide resolved
version = v"3.2.15"

# Collection of sources required to complete build
sources = [
ArchiveSource("https://github.com/jstedfast/gmime/releases/download/$(version)/gmime-$(version).tar.xz", "84cd2a481a27970ec39b5c95f72db026722904a2ccf3fdbd57b280cf2d02b5c4")
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir
cd gmime-3.2.15/
giordano marked this conversation as resolved.
Show resolved Hide resolved
echo '#define ICONV_ISO_INT_FORMAT "iso-%u-%u"' > iconv-detect.h
echo '#define ICONV_ISO_STR_FORMAT "iso-%u-%s"' >> iconv-detect.h
echo '#define ICONV_SHIFT_JIS "shift-jis"' >> iconv-detect.h
echo '#define ICONV_10646 "UCS-4BE"' >> iconv-detect.h

export LDFLAGS="$LDFLAGS -liconv"
giordano marked this conversation as resolved.
Show resolved Hide resolved
CMAKE_EXE_LINKER_FLAGS="-Wl,--copy-dt-needed-entries"
export CMAKE_EXE_LINKER_FLAGS
giordano marked this conversation as resolved.
Show resolved Hide resolved

./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} ac_cv_have_iconv_detect_h=yes
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 = supported_platforms(exclude=[Platform("aarch64", "FreeBSD")])


# The products that we will ensure are always built
products = [
LibraryProduct(["libgmime-3", "libgmime-3.0"], :libgmime)
]

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="Glib_jll", uuid="7746bdde-850d-59dc-9ae8-88ece973131d"))
giordano marked this conversation as resolved.
Show resolved Hide resolved
Dependency(PackageSpec(name="Libiconv_jll", uuid="94ce4f54-9a6c-5748-9c1c-f9c7231a4531"))
AlexKlo marked this conversation as resolved.
Show resolved Hide resolved
]

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