mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
Gtk4 libadwaita and friends (#12496)
* Update harfbuzz to 10.2.0, and enable glib header * gtk4: Add a new package This is based on the gtk3 recipe and uses the in-process Wayland server. It currently requires the XDG_RUNTIME_DIR environment variable to be defined. Haiku doesn’t do that by default yet, see data/system/boot/SetupEnvironment line 87 in haiku’s tree. The missing include guards have been reported upstream and should be removed in the next version, see https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8179 I have only tested it with the few gtk demos being built altogether, gtk4-demo, gtk4-widget-factory, etc. Programs which use a custom GtkHeaderBar opt-out from the Haiku window decorations and instead draw a quite ugly shadow around them, it should be possible to patch that out but for a first version that’s not really necessary. This depends on harfbuzz being built against glib, see https://github.com/haikuports/haikuports/pull/11716 * Bunch of things to build libadwaita Co-authored-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> Co-authored-by: Alexander Richards <electrodeyt@gmail.com> Co-authored-by: Schrijvers Luc <begasus@gmail.com> --------- Co-authored-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> Co-authored-by: Alexander Richards <electrodeyt@gmail.com> Co-authored-by: Schrijvers Luc <begasus@gmail.com>
This commit is contained in:
8
x11-libs/gtk4/additional-files/compile-schemas.sh
Normal file
8
x11-libs/gtk4/additional-files/compile-schemas.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
SYSTEM_DATA_DIR="`finddir B_SYSTEM_DATA_DIRECTORY`"
|
||||
NONPACKAGED_DATA_DIR="`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY`"
|
||||
|
||||
mkdir -p $NONPACKAGED_DATA_DIR/glib-2.0/schemas
|
||||
cp -nrf $SYSTEM_DATA_DIR/glib-2.0/schemas/* $NONPACKAGED_DATA_DIR/glib-2.0/schemas
|
||||
|
||||
glib-compile-schemas $NONPACKAGED_DATA_DIR/glib-2.0/schemas
|
||||
177
x11-libs/gtk4/gtk4-4.16.12.recipe
Normal file
177
x11-libs/gtk4/gtk4-4.16.12.recipe
Normal file
@@ -0,0 +1,177 @@
|
||||
SUMMARY="A multi-platform toolkit for creating graphical user interfaces"
|
||||
DESCRIPTION="GTK is a multi-platform toolkit for creating graphical user \
|
||||
interfaces. Offering a complete set of widgets, GTK is suitable for projects \
|
||||
ranging from small one-off projects to complete application suites."
|
||||
HOMEPAGE="https://www.gtk.org"
|
||||
COPYRIGHT="GNOME Desktop"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://download.gnome.org/sources/gtk/4.16/gtk-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="ef31bdbd6f082c4401634a20c850b0050c9bf252ef1e079764ee95a2a0c4c95a"
|
||||
SOURCE_DIR="gtk-$portVersion"
|
||||
PATCHES="gtk4-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="compile-schemas.sh"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
POST_INSTALL_SCRIPTS="
|
||||
$relativePostInstallDir/compile-schemas.sh
|
||||
"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
PROVIDES="
|
||||
gtk4$secondaryArchSuffix = $portVersion compat >= 1
|
||||
cmd:gtk4_demo$commandSuffix
|
||||
cmd:gtk4_demo_application$commandSuffix
|
||||
cmd:gtk4_icon_browser$commandSuffix
|
||||
cmd:gtk4_node_editor$commandSuffix
|
||||
cmd:gtk4_widget_factory$commandSuffix
|
||||
cmd:gtk4_print_editor$commandSuffix
|
||||
cmd:gtk4_path_tool$commandSuffix
|
||||
cmd:gtk4_query_settings$commandSuffix
|
||||
cmd:gtk4_builder_tool$commandSuffix
|
||||
cmd:gtk4_rendernode_tool$commandSuffix
|
||||
cmd:gtk4_image_tool$commandSuffix
|
||||
cmd:gtk4_update_icon_cache$commandSuffix
|
||||
cmd:gtk4_encode_symbolic_svg$commandSuffix
|
||||
cmd:gtk4_launch$commandSuffix
|
||||
lib:libgtk_4$secondaryArchSuffix = 1.1600.12 compat >= 1
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
adwaita_icon_theme
|
||||
haiku_svg_icon_theme
|
||||
iso_codes
|
||||
lib:libcairo$secondaryArchSuffix
|
||||
lib:libcairo_gobject$secondaryArchSuffix
|
||||
lib:libepoxy$secondaryArchSuffix
|
||||
lib:libfontconfig$secondaryArchSuffix
|
||||
lib:libfribidi$secondaryArchSuffix
|
||||
lib:libgdk_pixbuf_2.0$secondaryArchSuffix
|
||||
lib:libgirepository_1.0$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgraphene_1.0$secondaryArchSuffix
|
||||
lib:libharfbuzz$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libpango_1.0$secondaryArchSuffix
|
||||
lib:libpangocairo_1.0$secondaryArchSuffix
|
||||
lib:libpangoft2_1.0$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:librsvg_2$secondaryArchSuffix
|
||||
lib:libtiff$secondaryArchSuffix
|
||||
lib:libwayland_client$secondaryArchSuffix
|
||||
lib:libwayland_server$secondaryArchSuffix
|
||||
lib:libxkbcommon$secondaryArchSuffix
|
||||
lib:wayland_server_inproc$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
gtk4${secondaryArchSuffix}_devel
|
||||
devel:libgtk_4$secondaryArchSuffix = 1.1600.12 compat >= 1
|
||||
"
|
||||
REQUIRES_devel="
|
||||
gtk4$secondaryArchSuffix == $portVersion base
|
||||
devel:libcairo$secondaryArchSuffix
|
||||
devel:libepoxy$secondaryArchSuffix
|
||||
devel:libgdk_pixbuf_2.0$secondaryArchSuffix
|
||||
devel:libgirepository_1.0$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libgraphene_1.0$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libpango_1.0$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libtiff$secondaryArchSuffix
|
||||
devel:libwayland_client$secondaryArchSuffix
|
||||
devel:libwayland_server$secondaryArchSuffix
|
||||
devel:libxkbcommon$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
harfbuzz${secondaryArchSuffix}_glib
|
||||
iso_codes
|
||||
wayland_protocols
|
||||
devel:libcairo$secondaryArchSuffix
|
||||
devel:libepoxy$secondaryArchSuffix
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libgdk_pixbuf_2.0$secondaryArchSuffix
|
||||
devel:libgirepository_1.0$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libgraphene_1.0$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libpango_1.0$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:librsvg_2$secondaryArchSuffix
|
||||
devel:libtiff$secondaryArchSuffix
|
||||
devel:libwayland_client$secondaryArchSuffix
|
||||
devel:libwayland_server$secondaryArchSuffix
|
||||
devel:libxkbcommon$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:glib_compile_schemas
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:meson
|
||||
cmd:msgfmt$secondaryArchSuffix
|
||||
cmd:ninja
|
||||
cmd:patch
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:sassc
|
||||
cmd:wayland_scanner
|
||||
cmd:update_mime_database$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
CFLAGS="-D_BSD_SOURCE" \
|
||||
LDFLAGS="-lbsd -lgnu -lnetwork" \
|
||||
meson Build \
|
||||
--buildtype=release \
|
||||
--prefix="$prefix" \
|
||||
--libdir="$libDir" \
|
||||
--includedir="$includeDir" \
|
||||
--bindir="$commandBinDir" \
|
||||
--libexecdir="$commandBinDir" \
|
||||
--datadir="$dataDir" \
|
||||
--localedir="$dataDir/locale" \
|
||||
--sysconfdir="$settingsDir" \
|
||||
-Dx11-backend=false \
|
||||
-Dwayland-backend=true \
|
||||
-Dbroadway-backend=false \
|
||||
-Ddocumentation=false \
|
||||
-Dmedia-gstreamer=disabled \
|
||||
-Dvulkan=disabled \
|
||||
-Dbuild-testsuite=false \
|
||||
-Dbuild-examples=false \
|
||||
-Dbuild-tests=false \
|
||||
-Dintrospection=enabled
|
||||
|
||||
ninja -C Build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
ninja install -C Build
|
||||
|
||||
rm -rf $dataDir/{applications,metainfo}
|
||||
rm -rf $dataDir/glib-2.0/schemas/gschemas.compiled
|
||||
rm -rf $dataDir/icons/hicolor/icon-theme.cache
|
||||
|
||||
mkdir -p $postInstallDir
|
||||
cp -f $portDir/additional-files/compile-schemas.sh $postInstallDir
|
||||
chmod -v a+rx $postInstallDir/compile-schemas.sh
|
||||
|
||||
fixPkgconfig
|
||||
prepareInstalledDevelLibs libgtk-4
|
||||
packageEntries devel $developDir
|
||||
}
|
||||
1300
x11-libs/gtk4/patches/gtk4-4.16.12.patchset
Normal file
1300
x11-libs/gtk4/patches/gtk4-4.16.12.patchset
Normal file
File diff suppressed because it is too large
Load Diff
90
x11-libs/libadwaita/libadwaita-1.6.0.recipe
Normal file
90
x11-libs/libadwaita/libadwaita-1.6.0.recipe
Normal file
@@ -0,0 +1,90 @@
|
||||
SUMMARY="Building blocks for modern GNOME applications"
|
||||
DESCRIPTION="Libadwaita is a GTK 4 library that provides widgets and APIs \
|
||||
from the Adwaita design language, complementing GTK itself."
|
||||
HOMEPAGE="https://gitlab.gnome.org/GNOME/libadwaita"
|
||||
COPYRIGHT="GNOME Project"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://gitlab.gnome.org/GNOME/libadwaita/-/archive/$portVersion/libadwaita-$portVersion.tar.bz2"
|
||||
CHECKSUM_SHA256="990e15072dc4000e7cae6f8fd1773c7f41f20825557334172435ec4904b2a6cc"
|
||||
SOURCE_DIR="libadwaita-$portVersion"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
libVersion="1"
|
||||
|
||||
PROVIDES="
|
||||
libadwaita$secondaryArchSuffix = $portVersion
|
||||
cmd:adwaita_1_demo
|
||||
lib:libadwaita_$libVersion$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libadwaita${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libadwaita_$libVersion$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
adwaita_icon_theme
|
||||
lib:libappstream$secondaryArchSuffix
|
||||
lib:libfribidi$secondaryArchSuffix
|
||||
lib:libgio_2.0$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgobject_2.0$secondaryArchSuffix
|
||||
lib:libgraphene_1.0$secondaryArchSuffix
|
||||
lib:libgtk_4$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
lib:libpango_1.0$secondaryArchSuffix
|
||||
"
|
||||
|
||||
REQUIRES_devel="
|
||||
libadwaita$secondaryArchSuffix == $portVersion base
|
||||
devel:libgtk_4$secondaryArchSuffix
|
||||
devel:libappstream$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libgtk_4$secondaryArchSuffix
|
||||
devel:libappstream$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libgio_2.0$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:meson
|
||||
cmd:msgfmt$secondaryArchSuffix
|
||||
cmd:ninja
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:sassc
|
||||
cmd:vapigen
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
meson setup Build \
|
||||
--buildtype=release \
|
||||
--prefix="$prefix" \
|
||||
--libdir="$libDir" \
|
||||
--datadir="$dataDir" \
|
||||
--localedir="$dataDir/locale" \
|
||||
-Dintrospection=enabled \
|
||||
-Dtests=false \
|
||||
-Dexamples=true \
|
||||
-Dvapi=true
|
||||
|
||||
(ninja -C Build || true) > "/$sourceDir/build.log" 2>&1
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
ninja install -C Build
|
||||
|
||||
prepareInstalledDevelLibs libadwaita-$libVersion
|
||||
fixPkgconfig
|
||||
packageEntries devel $developDir
|
||||
}
|
||||
Reference in New Issue
Block a user