Skip to content

Commit 22e93f5

Browse files
authored
[GtkSourceView] Add builder (#347)
* [GtkSourceView] Add builder * [GtkSourceView] Don't build tests We don't want them and they are also broken when building for Windows
1 parent 706e250 commit 22e93f5

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

G/GtkSourceView/build_tarballs.jl

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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
4+
5+
name = "GtkSourceView"
6+
version = v"4.4.0"
7+
8+
# Collection of sources required to build GtkSourceView
9+
sources = [
10+
"https://download.gnome.org/sources/gtksourceview/4.4/gtksourceview-$(version).tar.xz" =>
11+
"9ddb914aef70a29a66acd93b4f762d5681202e44094d2d6370e51c9e389e689a",
12+
"./bundled",
13+
]
14+
15+
# Bash recipe for building across all platforms
16+
script = raw"""
17+
cd $WORKSPACE/srcdir/gtksourceview-*/
18+
19+
# We need to run native `xmllint` and `glib-compile-resources`
20+
apk add libxml2-utils glib-dev
21+
22+
# Don't build broken tests
23+
atomic_patch -p1 ../patches/meson_build_no_tests.patch
24+
25+
mkdir build && cd build
26+
meson .. \
27+
-Dgir=false \
28+
--cross-file="${MESON_TARGET_TOOLCHAIN}"
29+
ninja -j${nproc}
30+
ninja install
31+
"""
32+
33+
# These are the platforms we will build for by default, unless further
34+
# platforms are passed in on the command line
35+
platforms = supported_platforms()
36+
37+
# The products that we will ensure are always built
38+
products = [
39+
LibraryProduct("libgtksourceview-4", :libgtksourceview),
40+
]
41+
42+
# Dependencies that must be installed before this package can be built
43+
dependencies = [
44+
"Glib_jll",
45+
"GTK3_jll",
46+
"FriBidi_jll",
47+
]
48+
49+
# Build the tarballs, and possibly a `build.jl` as well.
50+
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--- a/meson.build
2+
+++ b/meson.build
3+
@@ -265,8 +265,8 @@
4+
subdir('data')
5+
subdir('docs')
6+
subdir('po')
7+
-subdir('tests')
8+
-subdir('testsuite')
9+
+# subdir('tests')
10+
+# subdir('testsuite')
11+
12+
summary = [
13+
'',

0 commit comments

Comments
 (0)