Skip to content

Instantly share code, notes, and snippets.

@wyatt8740
Created April 2, 2017 21:42
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wyatt8740/cbcb1ac2fbeb94c2e6fec86186b1e311 to your computer and use it in GitHub Desktop.
Save wyatt8740/cbcb1ac2fbeb94c2e6fec86186b1e311 to your computer and use it in GitHub Desktop.
Downloads latest debian GTK3 source, patches to fix annoyances, and compiles.
#! /bin/bash
# for this to work correctly, make an empty directory and put this shellscript inside it, along with the patch 'gtk3_make_filechooser_not_suck.patch'.
# Running this in a directory with a previous gtk source tree or any other files or directories may make this script behave unexpectedly!
# the patch file is found at:
# https://gist.github.com/wyatt8740/ae82550264564e2bba49b58d3e07f0f5.
# raw patch file (direct link):
# https://gist.github.com/wyatt8740/ae82550264564e2bba49b58d3e07f0f5/raw/bc5bc32d15e852ba92a8b0b710e01960c371ba8b/gtk3_make_filechooser_not_suck.patch
# This script does not perform installation as that requires root privileges. A 'make install' should suffice.
# The configure flags are, as far as I can tell, the ones used by Debian for official builds. I initially had built it without broadway or wayland and started getting
# segfaults with some debian-packaged programs, so they are important to leave intact.
apt-get source libgtk-3-dev
SRCDIR=$(find * -maxdepth 0 -type d)
echo "$SRCDIR"
cd "$SRCDIR"
echo "Running patch command:"
echo "patch -p2 < ../gtk3_make_filechooser_not_suck.patch"
echo "$PWD"
patch -p2 < ../gtk3_make_filechooser_not_suck.patch
echo "Attempted patch. If any errors occured, type ctrl+c."
echo "Otherwise,"
read -rsp $'Press any key to continue...\n' -n1 key
echo "running configure script."
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--libdir=/usr/lib/x86_64-linux-gnu \
--enable-broadway-backend \
--enable-wayland-backend \
--enable-x11-backend \
--enable-gtk-doc \
--enable-man \
--enable-shared \
--enable-cloudprint \
--enable-introspection \
--disable-static \
--enable-colord
echo "configure done, running make"
make
echo "make done. Now you need to run 'make install'."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment