Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/, sci-libs/plplot/
Date: Sun, 29 Nov 2020 19:42:21
Message-Id: 1606678915.01ba2e4db767c6d825086b33e16c75ccca8d70e9.marecki@gentoo
1 commit: 01ba2e4db767c6d825086b33e16c75ccca8d70e9
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 29 18:53:32 2020 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 29 19:41:55 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01ba2e4d
7
8 sci-libs/plplot: migrate to lua-single.eclass
9
10 Same as with Python, upstream does not support installing Lua bindings
11 for multiple implementations. Seeing as their documentation does not
12 mention any versions of Lua newer than 5.1, no big deal.
13
14 Closes: https://bugs.gentoo.org/752849
15 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
16
17 profiles/package.mask | 1 +
18 sci-libs/plplot/plplot-5.15.0-r100.ebuild | 298 ++++++++++++++++++++++++++++++
19 2 files changed, 299 insertions(+)
20
21 diff --git a/profiles/package.mask b/profiles/package.mask
22 index 6ca89aa8213..94c62c87a59 100644
23 --- a/profiles/package.mask
24 +++ b/profiles/package.mask
25 @@ -559,6 +559,7 @@ dev-lua/luacrypto
26 >=net-analyzer/suricata-6.0.0-r100
27 >=net-im/swift-4.0.2-r100
28 >=net-p2p/eiskaltdcpp-2.2.10-r100
29 +>=sci-libs/plplot-5.15.0-r100
30 >=sci-visualization/gnuplot-5.4.0-r100
31 >=sci-visualization/fityk-1.3.1-r100
32 >=www-apache/mod_security-2.9.3-r100
33
34 diff --git a/sci-libs/plplot/plplot-5.15.0-r100.ebuild b/sci-libs/plplot/plplot-5.15.0-r100.ebuild
35 new file mode 100644
36 index 00000000000..6d53e801f4c
37 --- /dev/null
38 +++ b/sci-libs/plplot/plplot-5.15.0-r100.ebuild
39 @@ -0,0 +1,298 @@
40 +# Copyright 1999-2020 Gentoo Authors
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +EAPI=7
44 +
45 +WX_GTK_VER=3.0-gtk3
46 +FORTRAN_NEEDED=fortran
47 +LUA_COMPAT=( lua5-1 )
48 +PYTHON_COMPAT=( python3_{6,7,8} )
49 +
50 +inherit cmake flag-o-matic fortran-2 java-pkg-opt-2 lua-single python-single-r1 toolchain-funcs virtualx wxwidgets
51 +
52 +DESCRIPTION="Multi-language scientific plotting library"
53 +HOMEPAGE="http://plplot.sourceforge.net/"
54 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
55 +
56 +LICENSE="LGPL-2"
57 +SLOT="0/14" # SONAME of libplplot.so
58 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
59 +
60 +IUSE="cairo cxx doc +dynamic examples fortran gd java jpeg latex lua ocaml octave pdf
61 + png python qhull qt5 shapefile svg tcl test threads tk truetype wxwidgets X"
62 +REQUIRED_USE="
63 + lua? ( ${LUA_REQUIRED_USE} )
64 + python? ( ${PYTHON_REQUIRED_USE} )
65 + qt5? ( dynamic )
66 + test? ( latex )
67 + tk? ( tcl )
68 +"
69 +
70 +RESTRICT="
71 + !test? ( test )
72 + octave? ( test )
73 +"
74 +
75 +RDEPEND="
76 + cairo? ( x11-libs/cairo:0=[svg?,X] )
77 + gd? ( media-libs/gd:2=[jpeg?,png?] )
78 + java? ( >=virtual/jre-1.5:* )
79 + latex? (
80 + app-text/ghostscript-gpl
81 + virtual/latex-base
82 + )
83 + lua? ( ${LUA_DEPS} )
84 + ocaml? (
85 + dev-lang/ocaml
86 + dev-ml/camlidl
87 + cairo? ( dev-ml/cairo-ocaml[gtk] )
88 + )
89 + octave? ( sci-mathematics/octave:0= )
90 + pdf? ( media-libs/libharu:0= )
91 + python? (
92 + ${PYTHON_DEPS}
93 + $(python_gen_cond_dep '
94 + dev-python/numpy[${PYTHON_MULTI_USEDEP}]
95 + qt5? ( dev-python/PyQt5[${PYTHON_MULTI_USEDEP}] )
96 + ')
97 + )
98 + qhull? ( media-libs/qhull:0= )
99 + qt5? (
100 + dev-qt/qtgui:5
101 + dev-qt/qtsvg:5
102 + dev-qt/qtprintsupport:5
103 + )
104 + shapefile? ( sci-libs/shapelib:0= )
105 + tcl? (
106 + dev-lang/tcl:0=
107 + dev-tcltk/itcl:0=
108 + tk? (
109 + dev-lang/tk:0=
110 + dev-tcltk/itk
111 + )
112 + )
113 + truetype? (
114 + media-fonts/freefont
115 + media-libs/lasi:0=
116 + gd? ( media-libs/gd:2=[truetype] )
117 + )
118 + wxwidgets? (
119 + x11-libs/wxGTK:${WX_GTK_VER}=[X]
120 + x11-libs/agg:0=[truetype?]
121 + )
122 + X? (
123 + x11-libs/libX11:0=
124 + x11-libs/libXau:0=
125 + x11-libs/libXdmcp:0=
126 + )"
127 +
128 +DEPEND="${RDEPEND}
129 + virtual/pkgconfig
130 + java? (
131 + >=virtual/jdk-1.5
132 + dev-lang/swig
133 + )
134 + lua? ( dev-lang/swig )
135 + ocaml? ( dev-ml/findlib )
136 + octave? ( >=dev-lang/swig-3.0.12 )
137 + python? ( dev-lang/swig )
138 + test? (
139 + media-fonts/font-misc-misc
140 + media-fonts/font-cursor-misc
141 + )
142 +"
143 +
144 +PATCHES=(
145 + "${FILESDIR}"/${PN}-5.9.6-python.patch
146 +
147 + # Fedora patches
148 + "${FILESDIR}"/${PN}-5.15.0-ocaml-rpath.patch
149 + "${FILESDIR}"/${PN}-5.15.0-ieee.patch
150 + "${FILESDIR}"/${PN}-5.15.0-multiarch.patch
151 + "${FILESDIR}"/${PN}-5.15.0-ocaml.patch
152 + "${FILESDIR}"/${PN}-5.12.0-safe-string.patch
153 + "${FILESDIR}"/${PN}-5.15.0-QPainterPath-include.patch
154 +)
155 +
156 +pkg_setup() {
157 + use python && python-single-r1_pkg_setup
158 + use lua && lua-single_pkg_setup
159 + use java && java-pkg-opt-2_pkg_setup
160 + use fortran && fortran-2_pkg_setup
161 +}
162 +
163 +src_prepare() {
164 + use wxwidgets && need-wxwidgets unicode
165 + cmake_src_prepare
166 +
167 + # avoid installing license
168 + sed -i -e '/COPYING.LIB/d' CMakeLists.txt || die
169 +
170 + # prexify hard-coded /usr/include in cmake modules
171 + sed -i \
172 + -e "s:/usr/include:${EPREFIX}/usr/include:g" \
173 + -e "s:/usr/lib:${EPREFIX}/usr/$(get_libdir):g" \
174 + -e "s:/usr/share:${EPREFIX}/usr/share:g" \
175 + cmake/modules/*.cmake || die
176 +
177 + # change default install directories for doc and examples
178 + local f
179 + while IFS="" read -d $'\0' -r f; do
180 + sed -i -e 's:${DATA_DIR}/examples:${DOC_DIR}/examples:g' "${f}" || die
181 + done < <(find "${S}" -name CMakeLists.txt -print0)
182 +
183 + sed -i \
184 + -e 's:${VERSION}::g' \
185 + -e "s:doc/\${PACKAGE}:doc/${PF}:" \
186 + cmake/modules/instdirs.cmake || die
187 +
188 + java-utils-2_src_prepare
189 +}
190 +
191 +src_configure() {
192 + # - don't build doc, it pulls in a whole stack of horrible dependencies
193 + # - Bindings:
194 + # * Ada is a mess in Gentoo, don't use
195 + # * D has been removed from Gentoo, don't use
196 + # * Qt4 has been disabled, as it is deprecated and unsupported upstream
197 + # - DPLD_* drivers need to use ON/OFF instead of the usex defaults yes/no, as
198 + # the testsuite performs a string comparison to determine which tests to run
199 +
200 + # Octave bindings now require C++11 support, #609980
201 + append-cxxflags -std=c++11
202 +
203 + local mycmakeargs=(
204 + # The build system does not honour CMAKE_INSTALL_LIBDIR as a
205 + # relative dir, which is against the spirit of GNUInstallDirs, #610066
206 + -DCMAKE_INSTALL_LIBDIR="${EPREFIX}"/usr/$(get_libdir)
207 +
208 + ## Features
209 + -DBUILD_DOC=OFF
210 + -DBUILD_DOX_DOC=OFF
211 + -DUSE_RPATH=OFF
212 + -DPREBUILT_DOC=$(usex doc)
213 + -DHAVE_SHAPELIB=$(usex shapefile)
214 + -DWITH_FREETYPE=$(usex truetype)
215 + -DPL_HAVE_PTHREAD=$(usex threads)
216 + -DPL_HAVE_QHULL=$(usex qhull)
217 + -DPLPLOT_USE_QT5=$(usex qt5)
218 +
219 + ## Tests
220 + -DBUILD_TEST=$(usex test)
221 +
222 + ## Bindings
223 + -DENABLE_ada=OFF
224 + -DENABLE_d=OFF
225 + -DENABLE_ocaml=$(usex ocaml)
226 + -DENABLE_pyqt4=OFF
227 + -DENABLE_cxx=$(usex cxx)
228 + -DENABLE_DYNDRIVERS=$(usex dynamic)
229 + -DENABLE_fortran=$(usex fortran)
230 + -DENABLE_java=$(usex java)
231 + -DENABLE_lua=$(usex lua)
232 + -DENABLE_octave=$(usex octave)
233 + -DENABLE_python=$(usex python)
234 + -DENABLE_qt=$(usex qt5)
235 + -DENABLE_tcl=$(usex tcl)
236 + -DENABLE_itcl=$(usex tcl)
237 + -DENABLE_tk=$(usex tk)
238 + -DENABLE_itk=$(usex tk)
239 + -DENABLE_wxwidgets=$(usex wxwidgets)
240 +
241 + ## Drivers
242 + -DPLD_cgm=OFF
243 + -DPLD_gif=OFF
244 + -DPLD_jpeg=OFF
245 + -DPLD_plmeta=OFF
246 + -DPLD_png=OFF
247 + -DPLD_pstex=OFF
248 + -DPLD_wxpng=OFF
249 + -DPLD_mem=ON
250 + -DPLD_null=ON
251 + -DPLD_wingcc=ON
252 + # Cairo
253 + $(usex cairo "" "-DDEFAULT_NO_CAIRO_DEVICES=ON")
254 + -DPLD_epscairo=$(usex cairo ON OFF)
255 + -DPLD_extcairo=$(usex cairo ON OFF)
256 + -DPLD_memcairo=$(usex cairo ON OFF)
257 + -DPLD_pdfcairo=$(usex cairo ON OFF)
258 + -DPLD_pngcairo=$(usex cairo ON OFF)
259 + -DPLD_pscairo=$(usex cairo ON OFF)
260 + -DPLD_svgcairo=$(usex cairo ON OFF)
261 + -DPLD_xcairo=$(usex cairo ON OFF)
262 + # LaTeX
263 + -DPLD_ps=$(usex latex ON OFF)
264 + # PDF
265 + -DPLD_pdf=$(usex pdf ON OFF)
266 + # Qt
267 + -DPLD_aqt=$(usex qt5 ON OFF)
268 + -DPLD_bmpqt=$(usex qt5 ON OFF)
269 + -DPLD_epsqt=$(usex qt5 ON OFF)
270 + -DPLD_extqt=$(usex qt5 ON OFF)
271 + -DPLD_jpgqt=$(usex qt5 ON OFF)
272 + -DPLD_memqt=$(usex qt5 ON OFF)
273 + -DPLD_pdfqt=$(usex qt5 ON OFF)
274 + -DPLD_pngqt=$(usex qt5 ON OFF)
275 + -DPLD_ppmqt=$(usex qt5 ON OFF)
276 + -DPLD_qtwidget=$(usex qt5 ON OFF)
277 + -DPLD_svgqt=$(usex qt5 ON OFF)
278 + -DPLD_tiffqt=$(usex qt5 ON OFF)
279 + # SVG
280 + -DPLD_svg=$(usex svg ON OFF)
281 + # Tk
282 + -DPLD_ntk=$(usex tk ON OFF)
283 + -DPLD_tk=$(usex tk ON OFF)
284 + -DPLD_tkwin=$(usex tk ON OFF)
285 + # Truetype
286 + -DPLD_psttf=$(usex truetype ON OFF)
287 + # Wx
288 + -DPLD_wxwidgets=$(usex wxwidgets ON OFF)
289 + # X
290 + -DPLD_xfig=$(usex X ON OFF)
291 + -DPLD_xwin=$(usex X ON OFF)
292 + )
293 +
294 + use truetype && mycmakeargs+=(
295 + -DPL_FREETYPE_FONT_PATH="${EPREFIX}"/usr/share/fonts/freefont
296 + )
297 + use shapefile && mycmakeargs+=(
298 + -DSHAPELIB_INCLUDE_DIR="${EPREFIX}"/usr/include/libshp
299 + )
300 + use lua && mycmakeargs+=(
301 + -DREQUIRED_LUA_VERSION=$(lua_get_version)
302 + )
303 + use ocaml && mycmakeargs+=(
304 + -DOCAML_INSTALL_DIR="$(ocamlc -where)"
305 + )
306 + use python && mycmakeargs+=(
307 + -DENABLE_pyqt5=$(usex qt5)
308 + )
309 +
310 + cmake_src_configure
311 +
312 + # clean up bloated pkg-config files (help linking properly on prefix)
313 + sed -i \
314 + -e "/Cflags/s:-I\(${EPREFIX}\|\)/usr/include[[:space:]]::g" \
315 + -e "/Libs/s:-L\(${EPREFIX}\|\)/usr/lib\(64\|\)[[:space:]]::g" \
316 + -e "s:${LDFLAGS}::g" \
317 + "${BUILD_DIR}"/pkgcfg/*pc || die
318 +}
319 +
320 +src_test() {
321 + virtx cmake_src_test
322 +}
323 +
324 +src_install() {
325 + cmake_src_install
326 +
327 + if use examples; then
328 + docompress -x /usr/share/doc/${PF}/examples
329 + else
330 + rm -r "${ED}"/usr/share/doc/${PF}/examples || die
331 + fi
332 +
333 + if use java; then
334 + java-pkg_dojar "${BUILD_DIR}"/examples/java/${PN}.jar
335 + java-pkg_regso "${EPREFIX}"/usr/$(get_libdir)/jni/plplotjavac_wrap.so
336 + fi
337 +}