glade: adopted port

This commit is contained in:
Tim Biermann 2023-08-18 19:52:33 +02:00
parent 5fab4d5275
commit c46322956d
3 changed files with 51 additions and 17 deletions

View File

@ -1,5 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF36qtKGfMs/ogsRL1U32hkJK1ahhia57f3zHXh0KRPlmzt0EBJ5tCzIxRleH9FALj5JOiMgTmYZvvRtv41MsqDQU=
SHA256 (Pkgfile) = 39d2ebb66bc971be07cc882c3785c76c073558ee5727790894221ea82147f4d5
RWSagIOpLGJF338zpMDEeBna5Is7/rqQWG0UdRXIkr+vRhvT1PlhMArzbNSTWICqLPiUqhs1fV5qGIcIGoBy+aSCnacH/l7d8As=
SHA256 (Pkgfile) = 85d650b030d7d31c42a52911cf6ee342e2217920c06eba834c70b1d0b336b01e
SHA256 (.footprint) = 585a7028407439ee22f442ea338328568efed8c10b765aab60878277944d2a53
SHA256 (glade-3.40.0.tar.xz) = 31c9adaea849972ab9517b564e19ac19977ca97758b109edc3167008f53e3d9c
SHA256 (fix-build.diff) = 0dd99583c4b7b6327e84a909614f46ec0062dbc9f67be733ea97dc294e40317b

View File

@ -1,26 +1,33 @@
# Description: GTK Interface Builder.
# URL: https://glade.gnome.org/
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: gtk3 itstool xorg-libxcursor xorg-libxcomposite xorg-libxinerama
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: gtk3 xorg-libxcomposite xorg-libxcursor xorg-libxinerama
# Optional: docbook-xsl gtk-doc python3-gobject webkitgtk
name=glade
version=3.40.0
release=1
source=(https://download.gnome.org/sources/$name/${version::4}/$name-$version.tar.xz)
release=2
source=(https://download.gnome.org/sources/$name/${version::4}/$name-$version.tar.xz
fix-build.diff)
build() {
prt-get isinst gtk-doc || PKGMK_GLADE+=' -D gtk_doc=false'
prt-get isinst libxslt docbook-xsl || PKGMK_GLADE+=' -D man=false'
prt-get isinst gtk-doc || PKGMK_GLADE+=' -D gtk_doc=false'
prt-get isinst libxslt docbook-xsl || PKGMK_GLADE+=' -D man=false'
sed -i -e "/^subdir.*'po'/d" \
-e "/^subdir.*'help'/d" \
$name-$version/meson.build
meson setup build $name-$version ${PKGMK_GLADE} \
--prefix=/usr \
--buildtype=plain \
-D gladeui=true
sed -i -e "/^subdir.*'po'/d" \
-e "/^subdir.*'help'/d" \
$name-$version/meson.build
meson compile -C build -j ${JOBS-1}
DESTDIR=$PKG meson install -C build
patch -Np1 -d $name-$version -i $SRC/fix-build.diff
meson setup $name-$version build $PKGMK_GLADE \
--prefix=/usr \
--buildtype=plain \
--wrap-mode nodownload \
-D b_lto=true \
-D b_pie=true \
-D gladeui=true
meson compile -C build -j ${JOBS-1}
DESTDIR=$PKG meson install -C build
}

26
glade/fix-build.diff Normal file
View File

@ -0,0 +1,26 @@
diff --git i/src/meson.build w/src/meson.build
index 40c730a0..56f4e47d 100644
--- i/src/meson.build
+++ w/src/meson.build
@@ -1,18 +1,18 @@
fs = import('fs')
if fs.exists('../.git')
- vcs_tag(input: 'version.h.in', output: 'version.h')
+ version_h = vcs_tag(input: 'version.h.in', output: 'version.h')[0]
else
config = configuration_data()
config.set ('VCS_TAG', glade_version)
- configure_file(
+ version_h = configure_file(
input: 'version.h.in',
output: 'version.h',
configuration: config
)
endif
-sources = files(
+sources = [version_h] + files(
'glade-intro.c',
'glade-preferences.c',
'glade-settings.c',