commit a69475b0c7a8d9309eb456bac5cfbbb6bfbb613b Author: EnumDev Date: Thu May 8 17:14:10 2025 +0300 Initial Commit diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..48af98c --- /dev/null +++ b/pkg.info @@ -0,0 +1,9 @@ +name: gtk3 +description: GObject-based multi-platform GUI toolkit version 3 +version: 3.24.41 +url: https://www.gtk.org/ +license: LGPL2.1-or-later +architecture: any +depends: ["adwaita-icon-theme","at-spi2-core","cairo","fontconfig","fribidi","gdk-pixbuf","glib","glibc","harfbuzz","libepoxy","libglvnd","libx11","libxcomposite","libxcursor","libxdamage","libxext","libxfixes","libxi","libxinerama","libxkbcommon","libxrandr","libxrender","pango","shared-mime-info","wayland"] +make_depends: ["gobject-introspection","gtk-doc","hicolor-icon-theme","meson","sassc","wayland-protocols"] +type: source diff --git a/pre_remove.sh b/pre_remove.sh new file mode 100644 index 0000000..1676a58 --- /dev/null +++ b/pre_remove.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +rm -f "$BPM_ROOT"/usr/lib/gtk-3.0/3.0.0/immodules.cache diff --git a/source-files/gtk3-query-immodules.bpmhook b/source-files/gtk3-query-immodules.bpmhook new file mode 100644 index 0000000..ebc5053 --- /dev/null +++ b/source-files/gtk3-query-immodules.bpmhook @@ -0,0 +1,5 @@ +trigger_operations: ["install", "upgrade", "remove"] +target_type: "path" +targets: ["usr/lib/gtk-3.0/3.0.0/immodules/*.so"] +depends: ["gtk3"] +run: "/usr/bin/gtk-query-immodules-3.0 --update-cache" diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..4cc83db --- /dev/null +++ b/source.sh @@ -0,0 +1,35 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +DOWNLOAD="https://download.gnome.org/sources/gtk+/${BPM_PKG_VERSION%.*}/gtk+-${BPM_PKG_VERSION}.tar.xz" +FILENAME="${DOWNLOAD##*/}" + +# The prepare function is executed in the root of the temp directory +# This function is used for downloading files and putting them into the correct location +prepare() { + wget "$DOWNLOAD" + tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" +} + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + mkdir build + cd build + + meson setup --prefix=/usr --libdir=/usr/lib --buildtype=release -Dman=false -Dgtk_doc=false -Dbroadway_backend=true .. + ninja +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + cd build + + DESTDIR="$BPM_OUTPUT" ninja install + + install -Dm644 "$BPM_WORKDIR"/*.bpmhook -t "$BPM_OUTPUT"/var/lib/bpm/hooks/ + + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/gtk3/COPYING +}