Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 517866
Collapse All | Expand All

(-)/var/portage/gentoo/x11-libs/qwt/qwt-6.1.0.ebuild (-27 / +95 lines)
Lines 15-27 Link Here
15
LICENSE="qwt mathml? ( LGPL-2.1 Nokia-Qt-LGPL-Exception-1.1 )"
15
LICENSE="qwt mathml? ( LGPL-2.1 Nokia-Qt-LGPL-Exception-1.1 )"
16
KEYWORDS="~alpha amd64 hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
16
KEYWORDS="~alpha amd64 hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
17
SLOT="6"
17
SLOT="6"
18
IUSE="doc examples mathml static-libs svg"
18
IUSE="doc examples mathml +qt4 qt5 static-libs svg"
19
19
20
DEPEND="
20
DEPEND="
21
	!<x11-libs/qwt-5.2.3
21
	!<x11-libs/qwt-5.2.3
22
	|| ( <dev-qt/qtgui-4.8.5:4 dev-qt/designer:4 )
22
	qt4? ( || ( <dev-qt/qtgui-4.8.5:4 dev-qt/designer:4 )
23
	doc? ( !<media-libs/coin-3.1.3[doc] )
23
		svg? ( dev-qt/qtsvg:4 ) )
24
	svg? ( dev-qt/qtsvg:4 )"
24
	qt5? ( dev-qt/qtwidgets:5
25
		dev-qt/qtconcurrent:5
26
		svg? ( dev-qt/qtsvg:5 ) )
27
	doc? ( !<media-libs/coin-3.1.3[doc] )"
25
RDEPEND="${DEPEND}"
28
RDEPEND="${DEPEND}"
26
29
27
S="${WORKDIR}"/${MY_P}
30
S="${WORKDIR}"/${MY_P}
Lines 38-45 Link Here
38
		QWT_CONFIG += QwtPlot QwtWidgets QwtDesigner
41
		QWT_CONFIG += QwtPlot QwtWidgets QwtDesigner
39
		VERSION = ${PV/_*}
42
		VERSION = ${PV/_*}
40
		QWT_VERSION = ${PV/_*}
43
		QWT_VERSION = ${PV/_*}
41
		QWT_INSTALL_PLUGINS   = "${EPREFIX}/usr/$(get_libdir)/qt4/plugins/designer"
42
		QWT_INSTALL_FEATURES  = "${EPREFIX}/usr/share/qt4/mkspecs/features"
43
	EOF
44
	EOF
44
45
45
	use mathml && echo "QWT_CONFIG += QwtMathML" >> qwtconfig.pri
46
	use mathml && echo "QWT_CONFIG += QwtMathML" >> qwtconfig.pri
Lines 49-85 Link Here
49
		QWT_CONFIG += qt warn_on thread release no_keywords
50
		QWT_CONFIG += qt warn_on thread release no_keywords
50
	EOF
51
	EOF
51
52
52
	sed \
53
		-e 's/target doc/target/' \
54
		-e "/^TARGET/s:(qwt):(qwt6):g" \
55
		-i src/src.pro || die
56
57
	sed \
58
		-e '/qwtAddLibrary/s:(qwt):(qwt6):g' \
59
		-i qwt.prf designer/designer.pro examples/examples.pri \
60
		textengines/mathml/qwtmathml.prf textengines/textengines.pri || die
61
62
	MULTIBUILD_VARIANTS=( )
53
	MULTIBUILD_VARIANTS=( )
63
	use static-libs && MULTIBUILD_VARIANTS+=( static )
54
	if use qt4; then
64
	MULTIBUILD_VARIANTS+=( shared )
55
		use static-libs && MULTIBUILD_VARIANTS+=( qt4-static )
65
56
		MULTIBUILD_VARIANTS+=( qt4-shared )
66
	qt4-r2_src_prepare
57
	fi
58
59
	if use qt5; then
60
                use static-libs && MULTIBUILD_VARIANTS+=( qt5-static )
61
                MULTIBUILD_VARIANTS+=( qt5-shared )
62
        fi
67
63
68
	multibuild_copy_sources
64
	multibuild_copy_sources
65
69
	preparation() {
66
	preparation() {
70
		[[ ${MULTIBUILD_VARIANT} == shared ]] && \
67
		if [[ ${MULTIBUILD_VARIANT} == *-shared ]]; then
71
			echo "QWT_CONFIG += QwtDll" >> "${BUILD_DIR}"/qwtconfig.pri
68
			echo "QWT_CONFIG += QwtDll" >> qwtconfig.pri
69
		fi
70
71
		case "${MULTIBUILD_VARIANT}" in
72
			qt4-*)
73
				cat >> qwtconfig.pri <<-EOF
74
					QWT_INSTALL_PLUGINS   = "${EPREFIX}/usr/$(get_libdir)/qt4/plugins/designer"
75
					QWT_INSTALL_FEATURES  = "${EPREFIX}/usr/share/qt4/mkspecs/features"
76
				EOF
77
				sed \
78
					-e 's/target doc/target/' \
79
					-e "/^TARGET/s:(qwt):(qwt6-qt4):g" \
80
					-i src/src.pro || die
81
82
				sed \
83
					-e '/qwtAddLibrary/s:(qwt):(qwt6-qt4):g' \
84
					-i qwt.prf designer/designer.pro examples/examples.pri \
85
					textengines/mathml/qwtmathml.prf textengines/textengines.pri || die
86
87
				qt4-r2_src_prepare
88
			;;
89
			qt5-*)
90
				cat >> qwtconfig.pri <<-EOF
91
					QWT_INSTALL_PLUGINS   = "${EPREFIX}/usr/$(get_libdir)/qt5/plugins/designer"
92
					QWT_INSTALL_FEATURES  = "${EPREFIX}/usr/share/qt5/mkspecs/features"
93
				EOF
94
				sed \
95
					-e 's/target doc/target/' \
96
					-e "/^TARGET/s:(qwt):(qwt6-qt5):g" \
97
					-i src/src.pro || die
98
99
				sed \
100
					-e '/qwtAddLibrary/s:(qwt):(qwt6-qt5):g' \
101
					-i qwt.prf designer/designer.pro examples/examples.pri \
102
					textengines/mathml/qwtmathml.prf textengines/textengines.pri || die
103
			;;
104
		esac
72
	}
105
	}
73
106
74
	multibuild_foreach_variant preparation
107
	multibuild_foreach_variant run_in_build_dir preparation
75
}
108
}
76
109
110
111
77
src_configure() {
112
src_configure() {
78
	multibuild_parallel_foreach_variant run_in_build_dir qt4-r2_src_configure
113
	configuration() {
114
		case "${MULTIBUILD_VARIANT}" in
115
                        qt4-*)
116
				qt4-r2_src_configure
117
                        ;;
118
                        qt5-*)
119
				/usr/lib/qt5/bin/qmake
120
                        ;;
121
                esac
122
123
	}
124
	multibuild_parallel_foreach_variant run_in_build_dir configuration
79
}
125
}
80
126
81
src_compile() {
127
src_compile() {
82
	multibuild_foreach_variant run_in_build_dir qt4-r2_src_compile
128
	compilation() {
129
		case "${MULTIBUILD_VARIANT}" in
130
                        qt4-*)
131
                                qt4-r2_src_compile
132
                        ;;
133
                        qt5-*)
134
                                emake
135
                        ;;
136
                esac
137
138
	}
139
	multibuild_foreach_variant run_in_build_dir compilation
83
}
140
}
84
141
85
src_test() {
142
src_test() {
Lines 88-99 Link Here
88
		eqmake4 examples.pro
145
		eqmake4 examples.pro
89
		emake
146
		emake
90
	}
147
	}
91
	multibuild_foreach_variant run_in_build_dir testing
148
#	multibuild_foreach_variant run_in_build_dir testing
92
}
149
}
93
150
94
src_install () {
151
src_install () {
152
	installation() {
153
		case "${MULTIBUILD_VARIANT}" in
154
                        qt4-*)
155
                                qt4-r2_src_install
156
                        ;;
157
                        qt5-*)
158
                                emake INSTALL_ROOT="${D}" install
159
                        ;;
160
                esac
161
	}
162
95
	rm -f doc/man/*/{_,deprecated}* || die
163
	rm -f doc/man/*/{_,deprecated}* || die
96
	multibuild_foreach_variant run_in_build_dir qt4-r2_src_install
164
	multibuild_foreach_variant run_in_build_dir installation
97
165
98
	use doc && dohtml -r doc/html/*
166
	use doc && dohtml -r doc/html/*
99
167

Return to bug 517866