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

# source: james, patches from SFR and others
TARBALL=inkscapelite-${PKGVER}.tar.bz2
MD5SUM=816615d99d1d9673a14c1465c2467924
SRC_URL=https://distro.ibiblio.org/fatdog/source/800/$TARBALL
BUNDLE=

SLACKREQ='libpopt gtk2 libart'
SLACKDESC="inkscapelite: inkscapelite $PKGVER (SVG Editor)
inkscapelite: 
inkscapelite: Inkscapelite is an early version of Inkscape. It was the last version 
inkscapelite: of Inkscape written in C, before it got rewritten in C++. It can edit 
inkscapelite: files created by itself, and other simple SVG files; it will choke on 
inkscapelite: more complex SVG files. The most important virtue of inkscapelite is 
inkscapelite: its size - hence the name.
inkscapelite: 
inkscapelite: This package conflicts with the newer version of Inkscape. 
inkscapelite: DO NOT install both at the same time.
inkscapelite:
"
SLACKCON=inkscape

#PKG_NOSTRIP=yes

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/inkscape* &&
	patch -Np1 -i ../pkg/inklite.patch &&
	patch -Np1 -i ../pkg/text-tool-crash.patch &&
	patch -Np1 -i ../pkg/ruler-font.patch &&
	# newer freetype
	sed -i -e 's|freetype2/ftoutln.h|freetype2/freetype/ftoutln.h|' \
		-e 's|freetype2/ftbbox.h|freetype2/freetype/ftbbox.h|'      \
		src/libnrtype/nr-type-ft2.c
}

### default pkg_package
### build
pkg_build() {
	export CFLAGS="-O0 -g"
	cd /tmp/inkscapelite* &&
	./configure $CONFFLAGS &&
	sed -i -e '/^sys_lib_search_path_spec/ s|lib|lib64|g' \
	       -e '/^sys_lib_dlsearch_path_spec/ s|lib|lib64|g' \
	       libtool &&
	make $MAKEFLAGS && make install &&
	pkg_build_slackdesc
}


