summaryrefslogtreecommitdiff
path: root/repo/gtk2/gtk2.xibuild
blob: 5630f18d7d1ba0dd77a62c9e52934b46b37b0f9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh

NAME="gtk2"
DESC="The GTK+ Toolkit (v2)"

MAKEDEPS=" meson ninja atk at-spi2-atk toybox cairo gobject-introspection fontconfig fribidi gdk-pixbuf glib harfbuzz libepoxy intltool libx11 libxcomposite libxcursor libxdamage libxext libxfixes libxi libxinerama libxkbcommon libxrandr musl pango shared-mime-info wayland libtool"

MAJ=2
PKG_VER=24.33
SOURCE="https://download.gnome.org/sources/gtk+/$MAJ.${PKG_VER%.*}/gtk+-$MAJ.$PKG_VER.tar.xz"

prepare () {
    # don't build demos
	sed -e "s/^\(SRC_SUBDIRS =.*\)demos\(.*\)$/\1\2/" -i Makefile.am Makefile.in
    #aclocal -I m4
    #autoreconf
    #automake --add-missing
}

build () {
    ./configure \
        --prefix=/usr \
        --sysconfdir=/etc \
        --localstatedir=/var \
        --with-xinput=yes \
        --without-libjasper \
        --with-included-loaders=png \
        --with-gdktarget=x11 \
        --enable-man 

    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
    make
}

package () {
    make DESTDIR=$PKG_DEST install
}

postinstall () {
    /usr/bin/gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
    /usr/bin/gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders
}