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

# source: james
TARBALL=fontforge-20150824.tar.gz
MD5SUM=74c49c73822d642b0511718d8eeb2210
SRC_URL=https://github.com/fontforge/fontforge/releases/download/20150824/$TARBALL
BUNDLE=

SLACKREQ='libspiro libuninameslist libpng libtiff libjpeg-turbo libxml2
freetype2 libX11 cairo pango python glib giflib' # 
SLACKDESC="fontforge: fontforge $PKGVER (Font editor)  
fontforge:  
fontforge: Create and edit fonts in many formats: OpenType, TrueType, AAT, 
fontforge: PostScript, Multiple Master, CID-Keyed, SVG and various bitmap 
fontforge: formats.  
fontforge: 
fontforge: 
fontforge: 
fontforge: 
fontforge: 
fontforge: http://fontforge.github.io/en-US/ 
"
SLACKINSTALL='update-mime-database ./usr/share/mime'

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/fontforge*
	
	# enable copying of desktop file but prevent build to meddle with /usr/share/mime here
	# let install do it later
	./configure $CONFFLAGS --disable-static --enable-tile-path \
		ac_cv_path_UPDATE_DESKTOP_DATABASE=/usr/bin/true \
		ac_cv_path_UPDATE_MIME_DATABASE=/usr/bin/true &&
	make $MAKEFLAGS && make install &&
	cp desktop/icons/48x48/apps/fontforge.png /usr/share/pixmaps &&
	pkg_build_slackdesc	
}

### fontforge configure options

<< "EOF"
sh-4.2# ./configure --help
`configure' configures fontforge 2.0.20140101 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/fontforge]
  --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-shared[=PKGS]  build shared libraries [default=yes]
  --enable-static[=PKGS]  build static libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-ltdl-install   install libltdl
  --enable-real=TYPE      TYPE is float or double; sets the floating point
                          type used internally [default=double]
  --disable-programs      do not build "fontforge" and related programs (but
                          do build libraries and possibly the Python
                          extensions)
  --enable-debug          Turn on debug build and FONTFORGE_DEBUG conditional
                          code
  --disable-native-scripting
                          disable the legacy fontforge scripting language
  --disable-python-scripting
                          disable Python scripting
  --disable-python-extension
                          do not build the Python extension modules "psMat"
                          and "fontforge", even if they were included in this
                          source distribution
  --enable-freetype-debugger[=DIR]
                          use freetype's internal debugger within fontforge;
                          requires source code of the freetype library with
                          which fontforge will be linked. You need to set DIR
                          to the top directory of the freetype sources, or
                          alternatively set the environment variable
                          FREETYPE_SOURCE (see below)
  --enable-debug-raw-points
                          add a raw mode to the points window of the debugger
  --enable-tile-path      enable a 'tile path' command (a variant of 'expand
                          stroke')
  --enable-windows-cross-compile
                          enable cross compile for windows extra support
  --enable-theme-2012     use old circa 2012 icons instead of using the tango
                          default icons
  --enable-gb12345        build the GB12345 encoding plugin
  --enable-maintainer-tools
                          build programs used normally only by fontforge
                          maintainers and developers
  --disable-rpath         do not hardcode runtime library paths
  --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
  --enable-python-even    enable a menu entry for Even
  --enable-gtk2-use       Try to detect and use gtk2

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-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-ltdl    use the GNU ltdl sources included here
  --with-ltdl-include=DIR use the ltdl headers installed in DIR
  --with-ltdl-lib=DIR     use the libltdl.la installed in DIR
  --with-x                use the X Window System
  --with-freetype-source[=DIR]
                          synonym for --enable-freetype-debugger
  --without-giflib        build without GIF or LIBUNGIF support
  --without-libjpeg       build without JPEG support
  --without-libpng        build without PNG support
  --without-libtiff       build without TIFF support
  --without-cairo         build without Cairo graphics (use regular X graphics
                          instead)
  --without-libspiro      build without support for Spiro contours
  --without-libuninameslist
                          build without Unicode Name or Annotation support
  --without-libzmq        build without libzmq
  --without-libreadline   build without READLINE support
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
  --with-pythonbinary[=/path/to/python2.7]


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
  XMKMF       Path to xmkmf, Makefile generator for X Window System
  SDK         (Macintosh only) path to software development kit; defaults to /
  CARBON      (Macintosh only) path to Carbon; defaults to
              SDK/System/Library/Frameworks/Carbon.framework/Carbon
  COCOA       (Macintosh only) path to Cocoa; defaults to
              SDK//System/Library/Frameworks/Cocoa.framework/Cocoa
  CORESERVICES
              (Macintosh only) path to CoreServices; defaults to
              SDK/System/Library/Frameworks/CoreServices.framework/CoreServices
  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
  PYTHON      the Python interpreter
  PYTHON_CFLAGS
              C compiler flags for PYTHON, overriding pkg-config
  PYTHON_LIBS linker flags for PYTHON, overriding pkg-config
  ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config
  ZLIB_LIBS   linker flags for ZLIB, overriding pkg-config
  GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
  GLIB_LIBS   linker flags for GLIB, overriding pkg-config
  PANGO_CFLAGS
              C compiler flags for PANGO, overriding pkg-config
  PANGO_LIBS  linker flags for PANGO, overriding pkg-config
  FREETYPE_CFLAGS
              C compiler flags for FREETYPE, overriding pkg-config
  FREETYPE_LIBS
              linker flags for FREETYPE, overriding pkg-config
  LIBXML_CFLAGS
              C compiler flags for LIBXML, overriding pkg-config
  LIBXML_LIBS linker flags for LIBXML, overriding pkg-config
  FREETYPE_SOURCE
              directory where freetype source code is located for
              --enable-freetype-debugger; however, if
              --enable-freetype-debugger=DIR is specified, then DIR overrides
              the setting of FREETYPE_SOURCE
  GIFLIB_CFLAGS
              C compiler flags for GIFLIB, overriding automatic detection
  GIFLIB_LIBS Linker flags for GIFLIB, overriding automatic detection
  LIBJPEG_CFLAGS
              C compiler flags for LIBJPEG, overriding automatic detection
  LIBJPEG_LIBS
              Linker flags for LIBJPEG, overriding automatic detection
  LIBPNG_CFLAGS
              C compiler flags for LIBPNG, overriding automatic detection
  LIBPNG_LIBS Linker flags for LIBPNG, overriding automatic detection
  LIBTIFF_CFLAGS
              C compiler flags for LIBTIFF, overriding automatic detection
  LIBTIFF_LIBS
              Linker flags for LIBTIFF, overriding automatic detection
  LIBCAIRO_CFLAGS
              C compiler flags for LIBCAIRO, overriding automatic detection
  LIBCAIRO_LIBS
              Linker flags for LIBCAIRO, overriding automatic detection
  LIBSPIRO_CFLAGS
              C compiler flags for LIBSPIRO, overriding automatic detection
  LIBSPIRO_LIBS
              Linker flags for LIBSPIRO, overriding automatic detection
  LIBUNINAMESLIST_CFLAGS
              C compiler flags for LIBUNINAMESLIST, overriding automatic
              detection
  LIBUNINAMESLIST_LIBS
              Linker flags for LIBUNINAMESLIST, overriding automatic detection
  LIBZMQ_CFLAGS
              C compiler flags for LIBZMQ, overriding pkg-config
  LIBZMQ_LIBS linker flags for LIBZMQ, overriding pkg-config
  LIBUUID_CFLAGS
              C compiler flags for LIBUUID, overriding pkg-config
  LIBUUID_LIBS
              linker flags for LIBUUID, overriding pkg-config
  LIBREADLINE_CFLAGS
              C compiler flags for LIBREADLINE, overriding automatic detection
  LIBREADLINE_LIBS
              Linker flags for LIBREADLINE, overriding automatic detection
  PANGOCAIRO_CFLAGS
              C compiler flags for PANGOCAIRO, overriding pkg-config
  PANGOCAIRO_LIBS
              linker flags for PANGOCAIRO, overriding pkg-config
  GTK2_CFLAGS C compiler flags for GTK2, overriding pkg-config
  GTK2_LIBS   linker flags for GTK2, 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.

Report bugs to <fontforge-devel@lists.sourceforge.net>.
fontforge home page: <https://github.com/fontforge/fontforge>.

EOF
