Skip to content

Commit 2da8a5c

Browse files
New recipe: gflags v2.2.2 (#4751)
* Add gflags build_tarball.jl * Fix dirname * Update G/gflags/build_tarballs.jl Co-authored-by: Mosè Giordano <[email protected]> Co-authored-by: Mosè Giordano <[email protected]>
1 parent f99f620 commit 2da8a5c

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

G/gflags/build_tarballs.jl

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Note that this script can accept some limited command-line arguments, run
2+
# `julia build_tarballs.jl --help` to see a usage message.
3+
using BinaryBuilder, Pkg
4+
5+
name = "gflags"
6+
version = v"2.2.2"
7+
8+
# Collection of sources required to complete build
9+
sources = [
10+
GitSource("https://github.com/gflags/gflags.git", "986e8eed00ded8168ef4eaa6f925dc6be50b40fa")
11+
]
12+
13+
# Bash recipe for building across all platforms
14+
script = raw"""
15+
cd $WORKSPACE/srcdir/gflags/
16+
mkdir build
17+
cd build
18+
cmake -DCMAKE_INSTALL_PREFIX=${prefix} \
19+
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
20+
-DCMAKE_BUILD_TYPE=Release \
21+
-DBUILD_SHARED_LIBS=ON \
22+
..
23+
make -j${nproc}
24+
make install
25+
"""
26+
27+
# These are the platforms we will build for by default, unless further
28+
# platforms are passed in on the command line
29+
platforms = supported_platforms()
30+
platforms = expand_cxxstring_abis(platforms)
31+
32+
# The products that we will ensure are always built
33+
products = [
34+
LibraryProduct("libgflags", :gflags),
35+
LibraryProduct("libgflags_nothreads", :gflags_nt)
36+
]
37+
38+
# Dependencies that must be installed before this package can be built
39+
dependencies = Dependency[
40+
]
41+
42+
# Build the tarballs, and possibly a `build.jl` as well.
43+
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6")

0 commit comments

Comments
 (0)