# Description: Panorama photo stitcher
# URL: http://hugin.sourceforge.net/
# Maintainer: Erich Eckner, crux at eckner dot net
# Depends on: wxgtk enblend-enfuse exiv2 libpano13 python glew desktop-file-utils swig

name=hugin
version=2022.0.0
release=1
source=("https://downloads.sourceforge.net/project/${name}/${name}/${name}-${version%.*}/${name}-${version}.tar.bz2")

build() {

	cd "${SRC}/${name}-${version}"
	install -d build
	cd build
	cmake .. \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DENABLE_LAPACK=yes \
		-DBUILD_HSI=ON \
		-DUSE_GDKBACKEND_X11=ON \
		-DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-gtk3

	make
	make DESTDIR="${PKG}" install
        rm -rf ${PKG}/usr/share/locale
	find "${PKG}" \( -name '*README*' -o -name '*COPYING*' \) -delete

}