# Template file for 'qcustomplot'
pkgname=qcustomplot
version=2.1.1
revision=1
build_style=qmake
hostmakedepends="qt6-base"
makedepends="qt6-base-devel"
short_desc="Qt C++ widget for plotting and data visualization"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://www.qcustomplot.com"
distfiles="https://www.qcustomplot.com/release/${version}/QCustomPlot-source.tar.gz"
checksum=5e2d22dec779db8f01f357cbdb25e54fbcf971adaee75eae8d7ad2444487182f

pre_configure() {
	cat >qcustomplot.pro <<-EOF
	QT += core gui
	QT += widgets printsupport
	DEFINES += QCUSTOMPLOT_COMPILE_LIBRARY
	TEMPLATE = lib
	CONFIG += release build_all shared
	VERSION = ${version}
	TARGET = qcustomplot-qt6
	QMAKE_TARGET_PRODUCT = "QCustomPlot"
	QMAKE_TARGET_DESCRIPTION = "Plotting library for Qt"
	QMAKE_TARGET_COMPANY = "www.qcustomplot.com"
	QMAKE_TARGET_COPYRIGHT = "Copyright (C) by Emanuel Eichhammer"
	SOURCES += qcustomplot.cpp
	HEADERS += qcustomplot.h

	target.path = \$\$[QT_INSTALL_LIBS]
	headers.files = qcustomplot.h
	headers.path = \$\$[QT_INSTALL_HEADERS]
	INSTALLS += target headers
	EOF
}
