<commit_before>include ../../Library/GNU.mk

Title=		GLib
Name=		glib
Version=	2.54.3
Site=		https://www.gtk.org
Source=		http://ftp.gnome.org/pub/gnome/sources/glib/2.54/glib-$(Version).tar.xz
License=	GPLv2

BuildRequires += $(BinDir)/pkg-config # pkg-config
BuildRequires += $(LibDir)/libintl.la # gettext
BuildRequires += $(LibDir)/libpcre.la # pcre

EnvExtra += LIBFFI_CFLAGS="-I/usr/include/ffi"
EnvExtra += LIBFFI_LIBS="-L/usr/lib -lffi"

define test_hook
$(BinDir)/gapplication version | grep $(Version)
endef<commit_msg>glib: fix build on macOS Catalina<commit_after>include ../../Library/GNU.mk

Title=		GLib
Name=		glib
Version=	2.54.3
Site=		https://www.gtk.org
Source=		http://ftp.gnome.org/pub/gnome/sources/glib/2.54/glib-$(Version).tar.xz
License=	LGPLv2

BuildRequires += $(BinDir)/pkg-config # pkg-config
BuildRequires += $(LibDir)/libintl.la # static-gettext
BuildRequires += $(LibDir)/libpcre.la # static-pcre

SdkPath = $(shell xcrun --sdk macosx --show-sdk-path)
EnvExtra += LIBFFI_CFLAGS="-I$(SdkPath)/usr/include/ffi"
EnvExtra += LIBFFI_LIBS="-L$(SdkPath)/usr/lib -lffi"

define test_hook
$(BinDir)/gapplication version | grep $(Version)
endef
{'fraction_non_alphanumeric': 0.17566409597257926, 'fraction_numerical': 0.013710368466152529, 'mean_word_length': 4.535545023696683, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7014807', 'n_tokens_mistral': 487, 'n_tokens_neox': 460, 'n_words': 80}