### this file is sourced not run
PKGVER=3.18.7
PKGBUILD=1
PKGARCH=x86_64

# source: BLFS 7.9
TARBALL=gtk+-$PKGVER.tar.xz
MD5SUM=8c31990af6b966fe42238be63690921a
SRC_URL=http://ftp.gnome.org/pub/gnome/sources/gtk+/3.18/$TARBALL
BUNDLE=

SLACKREQ='at-spi2-atk gdk-pixbuf libepoxy pango cups libxkbcommon libjson-glib librest'
SLACKDESC="gtk3: gtk3 $PKGVER (GTK GUI Toolkit)
gtk3:  
gtk3: The GTK+ 3 package contains libraries used for creating graphical user 
gtk3: interfaces for applications. 
gtk3: 
gtk3: This is version 3 of the library. It is not compatible with GTK2, but
gtk3: it can be installed side-by-side with it.
gtk3: 
gtk3: 
gtk3: 
gtk3:
"
SLACKINSTALL='glib-compile-schemas ./usr/share/glib-2.0/schemas'

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	export CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CAST_CHECKS"
	CONFFLAGS="$CONFFLAGS \
		--enable-broadway-backend --enable-x11-backend \
		--disable-wayland-backend \
		--enable-introspection \
		--disable-schemas-compile \
		--with-x"
	pkg_build_autoconf && pkg_build_slackdesc &&
	
	# gtk2 compat
	mv /usr/bin/gtk{,3}-update-icon-cache &&
	mv /usr/share/man/man1/gtk{,3}-update-icon-cache.1 &&
	
	# multilib
	mv -v /usr/bin/gtk-query-immodules-3.0{,-64} &&
	ln -sfv multiarch_wrapper /usr/bin/gtk-query-immodules-3.0 &&
	mv -v /usr/share/gir-1.0/* /usr/share/gir-1.0-64 &&
	rm -r /usr/share/gir-1.0/
	
<< "INFO-ONLY"

Configuration Information

GTK+ 3 themes change the way a GTK+ 3 application looks. 
An icon theme can be used to change the icons that appear on the application's toolbar. 
If you have installed a GTK+ 3 theme (eg gnome-themes-standard-3.18.0), 
an icon theme (such as oxygen-icons-15.04.3) and/or a font 
(such as DejaVu fonts), you can set your prefences in ~/.config/gtk-3.0/settings.ini 
or the default system wide configuration file (as the root user), in /etc/gtk-3.0/settings.ini

mkdir -p /etc/gtk-3.0
> /etc/gtk-3.0/settings.ini cat << "EOF"
[Settings]
gtk-theme-name = Adwaita
gtk-icon-theme-name = oxygen
gtk-font-name = DejaVu Sans 12
gtk-cursor-theme-size = 18
gtk-toolbar-style = GTK_TOOLBAR_BOTH_HORIZ
gtk-xft-antialias = 1
gtk-xft-hinting = 1
gtk-xft-hintstyle = hintslight
gtk-xft-rgba = rgb
gtk-cursor-theme-name = Adwaita
EOF

There are many settings keys, some with default values. 
You can find them at Settings: GTK+ 3 Reference Manual. 
There are many more themes available at http://gnome-look.org/ and other places.
INFO-ONLY
}


<< "EOF"
sh-4.3# ./configure --help
`configure' configures gtk+ 3.18.7 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/gtk+]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

X features:
  --x-includes=DIR    X include files are in DIR
  --x-libraries=DIR   X library files are in DIR

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-silent-rules   less verbose build output (undo: "make V=1")
  --disable-silent-rules  verbose build output (undo: "make V=0")
  --disable-maintainer-mode
                          disable make rules and dependencies not useful (and
                          sometimes confusing) to the casual installer
  --enable-dependency-tracking
                          do not reject slow dependency extractors
  --disable-dependency-tracking
                          speeds up one-time build
  --enable-static[=PKGS]  build static libraries [default=no]
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --disable-largefile     omit support for large files
  --enable-debug=[no/minimum/yes]
                          turn on debugging [default=debug_default]
  --enable-installed-tests
                          Install test programs (default: no)
  --enable-xkb            support XKB extension [default=maybe]
  --enable-xinerama       support Xinerama extension [default=maybe]
  --enable-xrandr         support XRandR extension [default=maybe]
  --enable-xfixes         support XFixes extension [default=maybe]
  --enable-xcomposite     support X Composite extension [default=maybe]
  --enable-xdamage        support X Damage extension [default=maybe]
  --enable-x11-backend    enable the X11 gdk backend
  --enable-win32-backend  enable the Win32 gdk backend
  --enable-quartz-backend enable the quartz gdk backend
  --enable-broadway-backend
                          enable the broadway (HTML5) gdk backend
  --enable-wayland-backend
                          enable the wayland gdk backend
  --enable-mir-backend    enable the Mir gdk backend
  --enable-quartz-relocation
                          enable bundle-based relocation functions
  --enable-explicit-deps=[yes/no/auto]
                          use explicit dependencies in .pc files
                          [default=auto]
  --disable-glibtest      do not try to compile and run a test GLIB program
  --disable-modules       disable dynamic module loading
  --disable-cups          disable cups print backend
  --disable-papi          disable papi print backend
  --disable-cloudprint    disable cloudprint print backend
  --enable-test-print-backend
                          build test print backend
  --disable-schemas-compile
                          Disable regeneration of gschemas.compiled on install
  --enable-introspection=[no/auto/yes]
                          Enable introspection for this build
  --enable-colord=[yes/no/auto]
                          build colord support code [default=auto]
  --enable-gtk-doc        use gtk-doc to build documentation [[default=no]]
  --enable-gtk-doc-html   build documentation in html format [[default=yes]]
  --enable-gtk-doc-pdf    build documentation in pdf format [[default=no]]
  --enable-man            generate man pages [default=auto]
  --disable-doc-cross-references
                          cross reference symbols from other libraries
                          [default=yes]
  --disable-Bsymbolic     avoid linking with -Bsymbolic

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                          both]
  --with-aix-soname=aix|svr4|both
                          shared library versioning (aka "SONAME") variant to
                          provide on AIX, [default=aix].
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
                          compiler's sysroot if not specified).
  --with-included-immodules=MODULE1,MODULE2,...
                          build the specified input methods into gtk
  --with-x                use the X Window System
  --with-html-dir=PATH    path to installed docs
  --with-xml-catalog=CATALOG
                          path to xml catalog to use

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CPP         C preprocessor
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  LT_SYS_LIBRARY_PATH
              User-defined run-time library search path.
  CXXCPP      C++ preprocessor
  CCAS        assembler compiler command (defaults to CC)
  CCASFLAGS   assembler compiler flags (defaults to CFLAGS)
  PKG_CONFIG  path to pkg-config utility
  PKG_CONFIG_PATH
              directories to add to pkg-config's search path
  PKG_CONFIG_LIBDIR
              path overriding pkg-config's built-in search path
  BASE_DEPENDENCIES_CFLAGS
              C compiler flags for BASE_DEPENDENCIES, overriding pkg-config
  BASE_DEPENDENCIES_LIBS
              linker flags for BASE_DEPENDENCIES, overriding pkg-config
  CAIRO_BACKEND_CFLAGS
              C compiler flags for CAIRO_BACKEND, overriding pkg-config
  CAIRO_BACKEND_LIBS
              linker flags for CAIRO_BACKEND, overriding pkg-config
  CAIRO_CFLAGS
              C compiler flags for CAIRO, overriding pkg-config
  CAIRO_LIBS  linker flags for CAIRO, overriding pkg-config
  GMODULE_CFLAGS
              C compiler flags for GMODULE, overriding pkg-config
  GMODULE_LIBS
              linker flags for GMODULE, overriding pkg-config
  PKG_CONFIG_FOR_BUILD
              path to build system's pkg-config utility
  XMKMF       Path to xmkmf, Makefile generator for X Window System
  GDK_DEP_CFLAGS
              C compiler flags for GDK_DEP, overriding pkg-config
  GDK_DEP_LIBS
              linker flags for GDK_DEP, overriding pkg-config
  ATK_CFLAGS  C compiler flags for ATK, overriding pkg-config
  ATK_LIBS    linker flags for ATK, overriding pkg-config
  GTK_DEP_CFLAGS
              C compiler flags for GTK_DEP, overriding pkg-config
  GTK_DEP_LIBS
              linker flags for GTK_DEP, overriding pkg-config
  REST_CFLAGS C compiler flags for REST, overriding pkg-config
  REST_LIBS   linker flags for REST, overriding pkg-config
  JSON_GLIB_CFLAGS
              C compiler flags for JSON_GLIB, overriding pkg-config
  JSON_GLIB_LIBS
              linker flags for JSON_GLIB, overriding pkg-config
  COLORD_CFLAGS
              C compiler flags for COLORD, overriding pkg-config
  COLORD_LIBS linker flags for COLORD, overriding pkg-config
  GTKDOC_DEPS_CFLAGS
              C compiler flags for GTKDOC_DEPS, overriding pkg-config
  GTKDOC_DEPS_LIBS
              linker flags for GTKDOC_DEPS, overriding pkg-config

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

EOF
