Сравнение qwt-5.2.3_p20210828 с qwt-6.1.5

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

  
4
EAPI=8
4
EAPI=7
5 5

  
6
DOCS_BUILDER="doxygen"
7
DOCS_DIR="doc"
8
DOCS_CONFIG_NAME="Doxyfile"
9
DOCS_DEPEND="
10
	media-gfx/graphviz
11
	virtual/latex-base
12
"
13

  
14
inherit docs cmake
15

  
16
COMMIT="f7519200f102676fb04fb7bd0be555e0a419d378"
6
inherit qmake-utils
17 7

  
18 8
DESCRIPTION="2D plotting library for Qt5"
19
HOMEPAGE="https://qwt.sourceforge.io/ https://github.com/SciDAVis/qwt5-qt5"
20
SRC_URI="https://github.com/SciDAVis/qwt5-qt5/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
21
S="${WORKDIR}/${PN}5-qt5-${COMMIT}"
22

  
23
LICENSE="qwt"
24
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~riscv ~x86"
25
SLOT="5"
26
IUSE="designer examples"
9
HOMEPAGE="https://qwt.sourceforge.io/"
10
SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV}/${P}.tar.bz2"
11

  
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"
27 16

  
28 17
DEPEND="
29 18
	dev-qt/qtconcurrent:5
......
31 20
	dev-qt/qtgui:5
32 21
	dev-qt/qtprintsupport:5
33 22
	dev-qt/qtwidgets:5
34
	dev-qt/qtsvg:5
35 23
	designer? ( dev-qt/designer:5 )
24
	opengl? (
25
		dev-qt/qtopengl:5
26
		virtual/opengl
27
	)
28
	svg? ( dev-qt/qtsvg:5 )
36 29
"
37 30
RDEPEND="${DEPEND}"
38 31

  
32
DOCS=( CHANGES-6.1 README )
33

  
39 34
PATCHES=(
40
	"${FILESDIR}/${P}-install-headers.patch"
35
	"${FILESDIR}"/${PN}-6.0.2-invalid-read.patch
36
	"${FILESDIR}"/${PN}-6.1.1-pc-destdir.patch
41 37
)
42 38

  
39
src_prepare() {
40
	default
41

  
42
	cat > qwtconfig.pri <<-EOF || die
43
		QWT_INSTALL_LIBS = "${EPREFIX}/usr/$(get_libdir)"
44
		QWT_INSTALL_HEADERS = "${EPREFIX}/usr/include/qwt6"
45
		QWT_INSTALL_DOCS = "${EPREFIX}/usr/share/doc/${PF}"
46
		QWT_CONFIG += QwtPlot QwtWidgets QwtPkgConfig
47
		VERSION = ${PV/_*}
48
		QWT_VERSION = ${PV/_*}
49
	EOF
50

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

  
56
	cat > qwtbuild.pri <<-EOF || die
57
		QWT_CONFIG += qt warn_on thread release no_keywords
58
	EOF
59

  
60
	echo "QWT_CONFIG += QwtDll" >> qwtconfig.pri
61

  
62
	cat >> qwtconfig.pri <<-EOF || die
63
		QWT_INSTALL_PLUGINS   = "${EPREFIX}$(qt5_get_plugindir)/designer"
64
		QWT_INSTALL_FEATURES  = "${EPREFIX}$(qt5_get_mkspecsdir)/features"
65
	EOF
66
	sed \
67
		-e 's/target doc/target/' \
68
		-e "/^TARGET/s:(qwt):(qwt6-qt5):g" \
69
		-e "/^TARGET/s:qwt):qwt6-qt5):g" \
70
		-i src/src.pro || die
71

  
72
	sed \
73
		-e '/qwtAddLibrary/s:(qwt):(qwt6-qt5):g' \
74
		-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
77
}
78

  
43 79
src_configure() {
44
	local mycmakeargs=(
45
		-DBUILD_EXAMPLES=$(usex examples)
46
		-DQWT_DESIGNER=$(usex designer)
47
	)
48
	cmake_src_configure
80
	eqmake5
49 81
}
50 82

  
51 83
src_compile() {
52
	cmake_src_compile
53
	docs_compile
84
	default
85
}
86

  
87
src_test() {
88
	cd examples || die
89
	eqmake5 examples.pro
90
	emake
54 91
}
55 92

  
56 93
src_install() {
57
	cmake_src_install
94
	emake INSTALL_ROOT="${D}" install
58 95

  
59
	# avoid file conflict with qwt:6
60
	# https://github.com/gbm19/qwt5-qt5/issues/2
61
	pushd "${ED}/usr/share/man/man3/" || die
62
		for f in *; do
63
			mv ${f} ${f//.3/.5qt5.3} || die
64
		done
65
	popd || die
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
	einstalldocs
109

  
110
	mkdir -p "${ED}"/usr/share/man/ || die
111
	mv "${ED}"/usr/share/doc/${PF}/man/man3 "${ED}"/usr/share/man/ && \
112
		rmdir "${ED}"/usr/share/doc/${PF}/man || die
113

  
114
	if use examples; then
115
		# don't build examples - fix the qt files to build once installed
116
		cat > examples/examples.pri <<-EOF || die
117
			include( qwtconfig.pri )
118
			TEMPLATE     = app
119
			MOC_DIR      = moc
120
			INCLUDEPATH += "${EPREFIX}/usr/include/qwt6"
121
			DEPENDPATH  += "${EPREFIX}/usr/include/qwt6"
122
			LIBS        += -lqwt6
123
		EOF
124
		sed -i -e 's:../qwtconfig:qwtconfig:' examples/examples.pro || die
125
		cp *.pri examples/ || die
126
		insinto /usr/share/${PN}6
127
		doins -r examples
128
	fi
66 129
}
Спасибо!