2019-07-27 09:18:06 -06:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2021-07-07 09:42:01 -06:00
|
|
|
patch -p1 < no-fribidi.patch
|
2021-08-29 22:01:09 -06:00
|
|
|
patch -p1 < fix-firefox.patch
|
2021-07-09 04:38:22 -06:00
|
|
|
|
2021-08-08 22:46:48 -06:00
|
|
|
# Remove configure check for atk-bridge and fribidi. Funny enough, atk-bridge
|
2021-08-08 22:49:37 -06:00
|
|
|
# is not required under wayland and there are ifdefs in place to ensure this.
|
2021-08-08 22:46:48 -06:00
|
|
|
# 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
|
|
|
|
|
|
|
|
# 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.
|
2021-07-09 04:38:22 -06:00
|
|
|
(
|
2021-08-08 22:46:48 -06:00
|
|
|
cd libepoxy
|
2021-07-09 04:38:22 -06:00
|
|
|
|
|
|
|
meson \
|
|
|
|
--prefix=/usr \
|
2021-08-08 22:46:48 -06:00
|
|
|
--sysconfdir=/etc \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
-Ddefault_library=static \
|
|
|
|
-Degl=yes \
|
|
|
|
-Dtests=false \
|
|
|
|
-Dglx=no \
|
|
|
|
-Dx11=false \
|
2021-07-09 04:38:22 -06:00
|
|
|
. output
|
|
|
|
|
|
|
|
ninja -C output
|
2019-11-17 18:17:44 -07:00
|
|
|
|
2021-08-08 22:46:48 -06:00
|
|
|
DESTDIR=$PWD ninja -C output install
|
|
|
|
)
|
2019-07-27 10:35:15 -06:00
|
|
|
|
2021-08-08 22:46:48 -06:00
|
|
|
# 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"
|
2020-01-12 01:20:48 -07:00
|
|
|
|
2021-08-08 22:46:48 -06:00
|
|
|
# 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).
|
2021-07-28 03:39:29 -06:00
|
|
|
sh ./configure \
|
2019-07-27 09:18:06 -06:00
|
|
|
--prefix=/usr \
|
2019-07-27 09:24:23 -06:00
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
2021-07-08 01:40:03 -06:00
|
|
|
--enable-wayland-backend \
|
|
|
|
--disable-x11-backend \
|
2019-07-27 10:17:49 -06:00
|
|
|
--disable-schemas-compile \
|
2019-07-27 09:18:06 -06:00
|
|
|
--disable-cups \
|
|
|
|
--disable-papi \
|
|
|
|
--disable-cloudprint \
|
2020-01-12 01:20:48 -07:00
|
|
|
--disable-glibtest \
|
2020-05-11 23:39:46 -06:00
|
|
|
--disable-nls \
|
2020-02-07 16:40:04 -07:00
|
|
|
--disable-installed-tests \
|
2019-07-27 09:18:06 -06:00
|
|
|
--enable-introspection=no \
|
|
|
|
--enable-colord=no \
|
|
|
|
--enable-gtk-doc-html=no
|
|
|
|
|
|
|
|
make
|
2021-07-17 20:26:28 -06:00
|
|
|
make install
|
2020-05-03 11:59:23 -06:00
|
|
|
|
2021-08-08 22:46:48 -06:00
|
|
|
# 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.
|
2020-05-17 01:39:05 -06:00
|
|
|
rm -f "$1/usr/bin/gtk-encode-symbolic-svg"
|
2021-08-08 22:46:48 -06:00
|
|
|
|
2021-08-08 23:08:11 -06:00
|
|
|
# Remove epoxy references from installed pkg-config files. The build system
|
|
|
|
# should have done this for us as it is statically linked.
|
|
|
|
for f in "$1/usr/lib/pkgconfig/"*.pc; do
|
|
|
|
sed 's/epoxy >= 1.4//' "$f" > _
|
|
|
|
mv -f _ "$f"
|
|
|
|
done
|