inherit qt5-qmake

VERSION=<VERSION>

SRC_URI="http://github.com/markummitchell/engauge-digitizer/archive/v${VERSION}.zip"
SRC_DIR="engauge-digitizer-${VERSION}"
NAME="engauge-digitizer"
RELEASE=1
CATEGORY="Math"
LOG_DIR=/tmp
LOG4CPP_HOME=${S}/dev/cygport/log4cpp_null
FFTW_HOME=/usr
# CYGQMAKE5_ARGS is forwarded by cygqmake5() in qt5-qmake.cygclass. Note FFTW_HOME is set above to where cygwin installer put fftw3
CYGQMAKE5_ARGS="CONFIG+=cygport CONFIG+=log4cpp_null"
SUMMARY="Convert graph images to numeric data"
DESCRIPTION="Engauge Digitizer digitizes images of graphs into numbers"
HOMEPAGE="http://github.com/markummitchell/engauge-digitizer"
PATCH_URI="
	engauge-digitizer-no-undefined.patch
	engauge-digitizer-webkit.patch
"

DIFF_EXCLUDES="engauge.qch engauge.qhc"

src_compile() {
	      cd ${B}
	      qt5_qmake_compile
	      cd ${S}/help
	      dos2unix build.bash
	      ./build.bash
	      cp -r ../bin/documentation ${B}/bin
}

src_install() {
	      dobin ${B}/bin/engauge-digitizer.exe
	      mkdir -p ${D}/usr/share/doc/engauge-digitizer
	      cp ${B}/bin/documentation/* ${D}/usr/share/doc/engauge-digitizer
}