2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-21 23:00:06 -07:00

gtk+3: vendor libepoxy

This commit is contained in:
Dylan Araps 2021-08-09 07:46:48 +03:00
parent f3829cc66d
commit 18f46efc43
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
4 changed files with 53 additions and 25 deletions

View File

@ -2,36 +2,49 @@
patch -p1 < no-fribidi.patch
# GTK+3 on Wayland requires gsettings-desktop-schemas
# for gsettings to work correctly. Under X11 it made
# use of xsettings but this is no longer the case.
(
cd schemas
meson \
--prefix=/usr \
-Dintrospection=false \
. output
ninja -C output
ninja -C output install
)
# Remove configure check for atk-bridge and fribidi.
# Remove configure check for atk-bridge and fribidi. Funny enough, atk-bridge
# is not requires under wayland and there are ifdefs in place to ensure this.
# The build system forces the dependency anyway so we must remove it.
sed -e 's/\(ATK_PACKAGES="atk\) atk-bridge-2.0"/\1"/' \
-e 's/fribidi >= 0\.19\.7//g' \
configure > _
mv -f _ configure
# Remove atk-bridge code.
sed '/<atk-bridge.h>/d;/atk_bridge_adaptor_init/d' \
gtk/a11y/gtkaccessibility.c > _
mv -f _ gtk/a11y/gtkaccessibility.c
# Don't build GTK examples/demos/testsuite.
sed 's/demos tests testsuite examples//;s/docs \(m4macros\)/\1/' Makefile.in > _
mv -f _ Makefile.in
# Build libepoxy for gtk+3's sole use. This is the only package that requires
# the library. While the build system supports building this as a subproject,
# it is broken so we must do it ourselves.
(
cd libepoxy
meson \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
-Ddefault_library=static \
-Dhas-dlvsym=false \
-Degl=yes \
-Dtests=false \
-Dglx=no \
-Dx11=false \
. output
ninja -C output
DESTDIR=$PWD ninja -C output install
)
# Point gtk+3 to the vendored libepoxy.
export PKG_CONFIG_PATH=$PWD/libepoxy/usr/lib/pkgconfig
export CFLAGS="$CFLAGS -L$PWD/libepoxy/usr/lib"
export CFLAGS="$CFLAGS -I$PWD/libepoxy/usr/include"
# While gtk+3 supports meson, the meson build is strictly speaking broken.
# It forces X11 in various places and the usage of -Werror causes various build
# failures (which according to upstream should not occur on x86_64).
sh ./configure \
--prefix=/usr \
--sysconfdir=/etc \
@ -52,7 +65,21 @@ sh ./configure \
make
make install
# We don't compile with librsvg which leads to this
# utility solely causing compiler errors for some
# packages. It has no use at all.
# GTK+3 on Wayland requires gsettings-desktop-schemas for gsettings to work
# correctly. Under X11 it made use of xsettings but this is no longer the case.
(
cd schemas
meson \
--prefix=/usr \
-Dintrospection=false \
. output
ninja -C output
ninja -C output install
)
# We don't compile with librsvg which leads to this utility solely causing
# compiler errors for some packages. It has no use at all.
rm -f "$1/usr/bin/gtk-encode-symbolic-svg"

View File

@ -1,3 +1,4 @@
f57ec4ade8f15cab0c23a80dcaee85b876e70a8823d9105f067ce335a8268caa
7b57e54220110f00ee768536138f80e155e44b0f90d912610802c72a25a59510
cf05e4901778c434aef68bb7dc01bea2bce15440c0cecb777fb446f04db6fe0d
e44b643a9ec01ea153817602241d6d7e6fd2d121b3ce4e29f99a87d8836a3ff0

View File

@ -4,7 +4,6 @@ fontconfig
freetype-harfbuzz
gdk-pixbuf
glib
libepoxy
libxkbcommon
meson make
pango

View File

@ -1,3 +1,4 @@
https://download.gnome.org/sources/gtk+/MAJOR.MINOR/gtk+-VERSION.tar.xz
https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/archive/40.0/gsettings-desktop-schemas-40.0.tar.gz schemas
https://github.com/anholt/libepoxy/releases/download/1.5.8/libepoxy-1.5.8.tar.xz libepoxy
patches/no-fribidi.patch