Сравнение qwt-6.2.0-r1 с qwt-6.2.0-r3

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

  
4 4
EAPI=8
......
8 8
DOCS_CONFIG_NAME="Doxyfile"
9 9
DOCS_DEPEND="media-gfx/graphviz"
10 10

  
11
inherit qmake-utils docs
11
inherit docs multibuild qmake-utils
12 12

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

  
17 17
LICENSE="qwt"
18 18
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
19 19
SLOT="6/2.0"
20
IUSE="designer doc examples opengl svg"
20
IUSE="designer doc examples opengl polar +qt5 qt6 svg"
21 21

  
22 22
DEPEND="
23
	dev-qt/qtconcurrent:5
24
	dev-qt/qtcore:5
25
	dev-qt/qtgui:5
26
	dev-qt/qtprintsupport:5
27
	dev-qt/qtwidgets:5
28
	designer? ( dev-qt/designer:5 )
29
	opengl? (
30
		dev-qt/qtopengl:5
31
		virtual/opengl
23
	qt5? (
24
		dev-qt/qtconcurrent:5
25
		dev-qt/qtcore:5
26
		dev-qt/qtgui:5
27
		dev-qt/qtprintsupport:5
28
		dev-qt/qtwidgets:5
29
		designer? ( dev-qt/designer:5 )
30
		opengl? (
31
				dev-qt/qtopengl:5
32
				virtual/opengl
33
		)
34
		svg? ( dev-qt/qtsvg:5 )
35
	)
36
	qt6? (
37
		dev-qt/qtbase:6[concurrent,gui,cups,widgets]
38
		designer? ( dev-qt/qttools:6[designer] )
39
		opengl? (
40
			dev-qt/qtbase:6[opengl]
41
			virtual/opengl
42
		)
43
		svg? ( dev-qt/qtsvg:6 )
32 44
	)
33
	svg? ( dev-qt/qtsvg:5 )
34 45
"
35 46
RDEPEND="${DEPEND}"
36 47

  
......
39 50

  
40 51
DOCS=( CHANGES-6.2 README )
41 52

  
53
pkg_setup() {
54
	MULTIBUILD_VARIANTS=( $(usev qt5) $(usev qt6) )
55
}
56

  
42 57
src_prepare() {
58
	my_src_prepare() {
59
		cat > qwtconfig.pri <<-EOF || die
60
			QWT_INSTALL_LIBS = "${EPREFIX}/usr/$(get_libdir)"
61
			QWT_INSTALL_HEADERS = "${EPREFIX}/usr/include/qwt6"
62
			QWT_INSTALL_DOCS = "${EPREFIX}/usr/share/doc/${PF}"
63
			QWT_CONFIG += QwtPlot QwtWidgets QwtPkgConfig
64
			VER_MAJ = $(ver_cut 1)
65
			VER_MIN = $(ver_cut 2)
66
			VER_PAT = $(ver_cut 3)
67
			VERSION = ${PV/_*}
68
			QWT_VER_MAJ = $(ver_cut 1)
69
			QWT_VER_MIN = $(ver_cut 2)
70
			QWT_VER_PAT = $(ver_cut 3)
71
			QWT_VERSION = ${PV/_*}
72
		EOF
73

  
74
		use designer && echo "QWT_CONFIG += QwtDesigner" >> qwtconfig.pri
75
		use opengl && echo "QWT_CONFIG += QwtOpenGL" >> qwtconfig.pri
76
		use polar && echo "QWT_CONFIG += QwtPolar" >> qwtconfig.pri
77
		use svg && echo "QWT_CONFIG += QwtSvg" >> qwtconfig.pri
78

  
79
		cat > qwtbuild.pri <<-EOF || die
80
			QWT_CONFIG += qt warn_on thread release no_keywords
81
			DEFINES += QWT_MOC_INCLUDE=1
82
		EOF
83

  
84
		echo "QWT_CONFIG += QwtDll" >> qwtconfig.pri
85

  
86
		cat >> qwtconfig.pri <<-EOF || die
87
			QWT_INSTALL_PLUGINS   = "${EPREFIX}/usr/$(get_libdir)/${MULTIBUILD_VARIANT}/plugins/designer"
88
			QWT_INSTALL_FEATURES  = "${EPREFIX}/usr/$(get_libdir)/${MULTIBUILD_VARIANT}/mkspecs/features"
89
		EOF
90
		sed \
91
			-e 's/target doc/target/' \
92
			-e "/^TARGET/s:(qwt):(qwt6-${MULTIBUILD_VARIANT}):g" \
93
			-e "/^TARGET/s:qwt):qwt6-${MULTIBUILD_VARIANT}):g" \
94
			-e "s:QWT_SONAME=libqwt.so:QWT_SONAME=libqwt6-${MULTIBUILD_VARIANT}.so:g" \
95
			-i src/src.pro || die
96

  
97
		sed \
98
			-e "/qwtAddLibrary/s:(qwt):(qwt6-${MULTIBUILD_VARIANT}):g" \
99
			-e "/qwtAddLibrary/s:qwt):qwt6-${MULTIBUILD_VARIANT}):g" \
100
			-i qwt.prf designer/designer.pro examples/examples.pri || die
101
	}
43 102
	default
44

  
45
	cat > qwtconfig.pri <<-EOF || die
46
		QWT_INSTALL_LIBS = "${EPREFIX}/usr/$(get_libdir)"
47
		QWT_INSTALL_HEADERS = "${EPREFIX}/usr/include/qwt6"
48
		QWT_INSTALL_DOCS = "${EPREFIX}/usr/share/doc/${PF}"
49
		QWT_CONFIG += QwtPlot QwtWidgets QwtPkgConfig
50
		VER_MAJ = $(ver_cut 1)
51
		VER_MIN = $(ver_cut 2)
52
		VER_PAT = $(ver_cut 3)
53
		VERSION = ${PV/_*}
54
		QWT_VER_MAJ = $(ver_cut 1)
55
		QWT_VER_MIN = $(ver_cut 2)
56
		QWT_VER_PAT = $(ver_cut 3)
57
		QWT_VERSION = ${PV/_*}
58
	EOF
59

  
60
	use designer && echo "QWT_CONFIG += QwtDesigner" >> qwtconfig.pri
61
	use opengl && echo "QWT_CONFIG += QwtOpenGL" >> qwtconfig.pri
62
	use svg && echo "QWT_CONFIG += QwtSvg" >> qwtconfig.pri
63

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

  
69
	echo "QWT_CONFIG += QwtDll" >> qwtconfig.pri
70

  
71
	cat >> qwtconfig.pri <<-EOF || die
72
		QWT_INSTALL_PLUGINS   = "${EPREFIX}$(qt5_get_plugindir)/designer"
73
		QWT_INSTALL_FEATURES  = "${EPREFIX}$(qt5_get_mkspecsdir)/features"
74
	EOF
75
	sed \
76
		-e 's/target doc/target/' \
77
		-e "/^TARGET/s:(qwt):(qwt6-qt5):g" \
78
		-e "/^TARGET/s:qwt):qwt6-qt5):g" \
79
		-e "s:QWT_SONAME=libqwt.so:QWT_SONAME=libqwt6-qt5.so:g" \
80
		-i src/src.pro || die
81

  
82
	sed \
83
		-e '/qwtAddLibrary/s:(qwt):(qwt6-qt5):g' \
84
		-e '/qwtAddLibrary/s:qwt):qwt6-qt5):g' \
85
		-i qwt.prf designer/designer.pro examples/examples.pri || die
103
	multibuild_copy_sources
104
	multibuild_foreach_variant run_in_build_dir my_src_prepare
86 105
}
87 106

  
88 107
src_configure() {
89
	eqmake5
108
	my_src_configure() {
109
		case ${MULTIBUILD_VARIANT} in
110
			qt5) eqmake5 ;;
111
			qt6) eqmake6 ;;
112
		esac
113
	}
114
	multibuild_foreach_variant run_in_build_dir my_src_configure
90 115
}
91 116

  
92 117
src_compile() {
93
	default
118
	multibuild_foreach_variant run_in_build_dir emake
119

  
94 120
	# need doxyfilter.sh in PATH
95 121
	PATH="${PATH}:${S}/doc/" docs_compile
96 122
}
97 123

  
98 124
src_test() {
99
	cd tests || die
100
	eqmake5 tests.pro
101
	emake
125
	my_src_test() {
126
		cd "${BUILD_DIR}"/tests || die
127
		case ${MULTIBUILD_VARIANT} in
128
			qt5) eqmake5 tests.pro ;;
129
			qt6) eqmake6 tests.pro ;;
130
		esac
131
		emake
132
	}
133
	multibuild_foreach_variant my_src_test
102 134
}
103 135

  
104 136
src_install() {
105
	emake INSTALL_ROOT="${D}" install
137
	multibuild_foreach_variant run_in_build_dir emake INSTALL_ROOT="${D}" install
106 138
	einstalldocs
107 139

  
108 140
	mkdir -p "${ED}"/usr/share/man/ || die
Спасибо!