Diff qwt-6.1.5 with a qwt-6.2.0-r1

/usr/portage/x11-libs/qwt/qwt-6.2.0-r1.ebuild 2023-10-09 14:52:35.924368512 +0300
1
# Copyright 1999-2021 Gentoo Authors
1
# Copyright 1999-2022 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6
inherit qmake-utils
6
DOCS_BUILDER="doxygen"
7
DOCS_DIR="doc"
8
DOCS_CONFIG_NAME="Doxyfile"
9
DOCS_DEPEND="media-gfx/graphviz"
10

  
11
inherit qmake-utils docs
7 12

  
8 13
DESCRIPTION="2D plotting library for Qt5"
9 14
HOMEPAGE="https://qwt.sourceforge.io/"
10 15
SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.bz2"
11 16

  
12
LICENSE="qwt mathml? ( LGPL-2.1 Nokia-Qt-LGPL-Exception-1.1 )"
13
KEYWORDS="amd64 ~arm ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
14
SLOT="6/1.5"
15
IUSE="designer doc examples mathml opengl svg"
17
LICENSE="qwt"
18
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
19
SLOT="6/2.0"
20
IUSE="designer doc examples opengl svg"
16 21

  
17 22
DEPEND="
18 23
	dev-qt/qtconcurrent:5
......
29 34
"
30 35
RDEPEND="${DEPEND}"
31 36

  
32
DOCS=( CHANGES-6.1 README )
37
# tests require package to be already installed
38
RESTRICT="test"
33 39

  
34
PATCHES=(
35
	"${FILESDIR}"/${PN}-6.0.2-invalid-read.patch
36
	"${FILESDIR}"/${PN}-6.1.1-pc-destdir.patch
37
)
40
DOCS=( CHANGES-6.2 README )
38 41

  
39 42
src_prepare() {
40 43
	default
......
44 47
		QWT_INSTALL_HEADERS = "${EPREFIX}/usr/include/qwt6"
45 48
		QWT_INSTALL_DOCS = "${EPREFIX}/usr/share/doc/${PF}"
46 49
		QWT_CONFIG += QwtPlot QwtWidgets QwtPkgConfig
50
		VER_MAJ = $(ver_cut 1)
51
		VER_MIN = $(ver_cut 2)
52
		VER_PAT = $(ver_cut 3)
47 53
		VERSION = ${PV/_*}
54
		QWT_VER_MAJ = $(ver_cut 1)
55
		QWT_VER_MIN = $(ver_cut 2)
56
		QWT_VER_PAT = $(ver_cut 3)
48 57
		QWT_VERSION = ${PV/_*}
49 58
	EOF
50 59

  
51 60
	use designer && echo "QWT_CONFIG += QwtDesigner" >> qwtconfig.pri
52
	use mathml && echo "QWT_CONFIG += QwtMathML" >> qwtconfig.pri
53 61
	use opengl && echo "QWT_CONFIG += QwtOpenGL" >> qwtconfig.pri
54 62
	use svg && echo "QWT_CONFIG += QwtSvg" >> qwtconfig.pri
55 63

  
56 64
	cat > qwtbuild.pri <<-EOF || die
57 65
		QWT_CONFIG += qt warn_on thread release no_keywords
66
		DEFINES += QWT_MOC_INCLUDE=1
58 67
	EOF
59 68

  
60 69
	echo "QWT_CONFIG += QwtDll" >> qwtconfig.pri
......
67 76
		-e 's/target doc/target/' \
68 77
		-e "/^TARGET/s:(qwt):(qwt6-qt5):g" \
69 78
		-e "/^TARGET/s:qwt):qwt6-qt5):g" \
79
		-e "s:QWT_SONAME=libqwt.so:QWT_SONAME=libqwt6-qt5.so:g" \
70 80
		-i src/src.pro || die
71 81

  
72 82
	sed \
73 83
		-e '/qwtAddLibrary/s:(qwt):(qwt6-qt5):g' \
74 84
		-e '/qwtAddLibrary/s:qwt):qwt6-qt5):g' \
75
		-i qwt.prf designer/designer.pro examples/examples.pri \
76
		textengines/mathml/qwtmathml.prf textengines/textengines.pri || die
85
		-i qwt.prf designer/designer.pro examples/examples.pri || die
77 86
}
78 87

  
79 88
src_configure() {
......
82 91

  
83 92
src_compile() {
84 93
	default
94
	# need doxyfilter.sh in PATH
95
	PATH="${PATH}:${S}/doc/" docs_compile
85 96
}
86 97

  
87 98
src_test() {
88
	cd examples || die
89
	eqmake5 examples.pro
99
	cd tests || die
100
	eqmake5 tests.pro
90 101
	emake
91 102
}
92 103

  
93 104
src_install() {
94 105
	emake INSTALL_ROOT="${D}" install
95

  
96
	if use mathml; then
97
		sed \
98
			-e "s: -L\"${WORKDIR}\".* -lqwt6: -lqwt6:g" \
99
			-i "${ED}"/usr/$(get_libdir)/pkgconfig/qwtmathml.pc || die
100
	fi
101

  
102
	if use doc; then
103
		local HTML_DOCS=( doc/html/. )
104
	else
105
		rm -r "${ED}"/usr/share/doc/${PF}/html || die
106
	fi
107

  
108 106
	einstalldocs
109 107

  
110 108
	mkdir -p "${ED}"/usr/share/man/ || die
Thank you!