Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/gdl/, dev-lang/gdl/files/
Date: Sun, 27 Sep 2020 19:17:31
Message-Id: 1601234226.1a6e53137d2d93f8d7291c17f5c9c6c70b5d23a4.soap@gentoo
1 commit: 1a6e53137d2d93f8d7291c17f5c9c6c70b5d23a4
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 27 19:17:06 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 27 19:17:06 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a6e5313
7
8 dev-lang/gdl: Bump version to 1.0.0_rc3
9
10 Bug: https://bugs.gentoo.org/735280
11 Bug: https://bugs.gentoo.org/741096
12 Bug: https://bugs.gentoo.org/741402
13 Closes: https://bugs.gentoo.org/704026
14 Package-Manager: Portage-3.0.8, Repoman-3.0.1
15 Signed-off-by: David Seifert <soap <AT> gentoo.org>
16
17 dev-lang/gdl/Manifest | 1 +
18 dev-lang/gdl/files/gdl-1.0.0_rc3-cmake.patch | 94 +++++++++++++++++
19 dev-lang/gdl/gdl-1.0.0_rc3.ebuild | 152 +++++++++++++++++++++++++++
20 dev-lang/gdl/metadata.xml | 1 +
21 4 files changed, 248 insertions(+)
22
23 diff --git a/dev-lang/gdl/Manifest b/dev-lang/gdl/Manifest
24 index 0c6f89abb8a..72b22e14515 100644
25 --- a/dev-lang/gdl/Manifest
26 +++ b/dev-lang/gdl/Manifest
27 @@ -1 +1,2 @@
28 DIST gdl-0.9.6v2.tgz 1777167 BLAKE2B 4d92ed93f12e0979d591959d60ae9fa6785400e4f169a00f462103d263bce1aa02e615cc8467b53146791a12045850f9dae1da113f9caff4d6b44dd2a5798b3b SHA512 a816ee2e3822af380a1131a6138263c33560db7286cd699b864da305a1103d5afc881a1cd3574d2e243bfb7e65e759e46322c5e55c66ec15620d9c514565c2c5
29 +DIST gdl-1.0.0_rc3.tar.gz 32650313 BLAKE2B cdecfe0646e2271e2389e0a04f8da1e8de4534faf743f233169bccf326198025eff7fd7a7b62ed8bd05fa4a0222c6fd30f9469e3edf0f5b2991ef3ef545e616b SHA512 3fde22c7e709b9cdc72a23d2317c043037379c7903418211a699c7e5caa2ed17e78e32e6d2f9b4aa89200e729fc21555821140dfdd58a5a636a858e2841f6335
30
31 diff --git a/dev-lang/gdl/files/gdl-1.0.0_rc3-cmake.patch b/dev-lang/gdl/files/gdl-1.0.0_rc3-cmake.patch
32 new file mode 100644
33 index 00000000000..dd7abcc54d9
34 --- /dev/null
35 +++ b/dev-lang/gdl/files/gdl-1.0.0_rc3-cmake.patch
36 @@ -0,0 +1,94 @@
37 +--- a/CMakeLists.txt
38 ++++ b/CMakeLists.txt
39 +@@ -206,10 +206,6 @@
40 + # mpi
41 + check_include_file(mpi.h HAVE_MPI_H)
42 +
43 +-# SA: whithout it compilation of antlr fails if there's a conflicting
44 +-# version of antlr in system-wide directories
45 +-include_directories(src)
46 +-
47 + if (NOT WIN32)
48 + # Ncurses MANDATORY for readline on POSIX
49 + # -DNCURSESDIR=DIR
50 +@@ -399,8 +395,10 @@
51 +
52 + # PLplot MANDATORY
53 + # -DPLPLOTDIR=DIR
54 +-set(CMAKE_PREFIX_PATH ${PLPLOTDIR})
55 +-find_package(Plplot QUIET)
56 ++
57 ++find_package(PkgConfig REQUIRED)
58 ++pkg_check_modules(PLPLOT REQUIRED plplot plplot-c++)
59 ++
60 + set(HAVE_LIBPLPLOTCXXD ${PLPLOT_FOUND})
61 + if(PLPLOT_FOUND)
62 + set(LIBRARIES ${LIBRARIES} ${PLPLOT_LIBRARIES})
63 +@@ -490,33 +488,16 @@
64 + # -DMAGICK=ON|OFF
65 + # -DMAGICKDIR=DIR
66 + if(MAGICK)
67 +- set(CMAKE_PREFIX_PATH ${MAGICKDIR})
68 +- find_package(ImageMagick QUIET COMPONENTS Magick++ MagickWand MagickCore)
69 +- mark_as_advanced(ImageMagick_EXECUTABLE_DIR ImageMagick_Magick++_INCLUDE_DIR ImageMagick_Magick++_LIBRARY
70 +- ImageMagick_MagickCore_INCLUDE_DIR ImageMagick_MagickCore_LIBRARY ImageMagick_MagickWand_INCLUDE_DIR ImageMagick_MagickWand_LIBRARY)
71 +- set(USE_MAGICK ${ImageMagick_FOUND})
72 +- if(ImageMagick_FOUND)
73 +- find_program(MAGICKXXCONFIG Magick++-config)
74 +- if(MAGICKXXCONFIG)
75 +- execute_process(COMMAND ${MAGICKXXCONFIG} "--libs" OUTPUT_VARIABLE MAGICKXXCONFIGLIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
76 +- set(LIBRARIES ${LIBRARIES} ${MAGICKXXCONFIGLIBS})
77 +- else(MAGICKXXCONFIG)
78 +- message(FATAL_ERROR "ImageMagick is required but was not found (Magick++-config).\n"
79 +- "Use -DMAGICKDIR=DIR to specify the ImageMagick directory.\n"
80 +- "Use -DMAGICK=OFF to not use it.\n"
81 +- "(suitable Debian/Ubuntu package: libmagick++-dev)\n"
82 +- "(suitable Fedora/CentOS package: ImageMagick-c++-devel)")
83 +- endif(MAGICKXXCONFIG)
84 +- set(LIBRARIES ${LIBRARIES} ${ImageMagick_LIBRARIES})
85 +- include_directories(${ImageMagick_INCLUDE_DIRS})
86 +- set(MAGICK_LIBRARIES ${ImageMagick_LIBRARIES})
87 +- else(ImageMagick_FOUND)
88 +- message(FATAL_ERROR "ImageMagick is required but was not found.\n"
89 +- "Use -DMAGICKDIR=DIR to specify the ImageMagick directory.\n"
90 +- "Use -DMAGICK=OFF to not use it.\n"
91 +- "(suitable Debian/Ubuntu package: libmagick++-dev)\n"
92 +- "(suitable Fedora/CentOS package: ImageMagick-c++-devel)")
93 +- endif(ImageMagick_FOUND)
94 ++ find_package(PkgConfig REQUIRED)
95 ++ pkg_check_modules(Magick++ REQUIRED Magick++)
96 ++ pkg_check_modules(MagickWand REQUIRED MagickWand)
97 ++ pkg_check_modules(MagickCore REQUIRED MagickCore)
98 ++
99 ++ set(MAGICK_LIBRARIES ${Magick++_LIBRARIES} ${MagickWand_LIBRARIES} ${MagickCore_LIBRARIES})
100 ++ set(LIBRARIES ${LIBRARIES} ${MAGICK_LIBRARIES})
101 ++ include_directories(${Magick++_INCLUDE_DIRS})
102 ++ include_directories(${MagickWand_INCLUDE_DIRS})
103 ++ include_directories(${MagickCore_INCLUDE_DIRS})
104 + endif(MAGICK)
105 +
106 + # if GM or IM activated, we check whether Plplot is OK for that
107 +--- a/src/CMakeLists.txt
108 ++++ b/src/CMakeLists.txt
109 +@@ -186,9 +186,9 @@
110 + )
111 + endif(USE_EXPAT)
112 +
113 +-add_subdirectory(antlr)
114 ++find_library(ANTLR_LIBRARY NAMES antlr)
115 +
116 +-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/antlr ${CMAKE_BINARY_DIR})
117 ++include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
118 + link_directories(${LINK_DIRECTORIES})
119 +
120 + if(PYTHON_MODULE) #GDL.so
121 +@@ -203,8 +203,7 @@
122 + add_executable(gdl ${SOURCES})
123 + endif(PYTHON_MODULE)
124 +
125 +-add_dependencies(gdl antlr) # be sure that antlr is built before gdl
126 +-target_link_libraries(gdl antlr) # link antlr against gdl
127 ++target_link_libraries(gdl ${ANTLR_LIBRARY}) # link antlr against gdl
128 + if (MINGW)
129 + target_link_libraries(gdl ws2_32)
130 + endif (MINGW)
131
132 diff --git a/dev-lang/gdl/gdl-1.0.0_rc3.ebuild b/dev-lang/gdl/gdl-1.0.0_rc3.ebuild
133 new file mode 100644
134 index 00000000000..b5fb1c358bc
135 --- /dev/null
136 +++ b/dev-lang/gdl/gdl-1.0.0_rc3.ebuild
137 @@ -0,0 +1,152 @@
138 +# Copyright 1999-2020 Gentoo Authors
139 +# Distributed under the terms of the GNU General Public License v2
140 +
141 +EAPI=7
142 +
143 +WX_GTK_VER="3.0-gtk3"
144 +PYTHON_COMPAT=( python3_{6..9} )
145 +
146 +# gdl's build system is a travesty, and actually calls
147 +# itself in the testsuite, which is something that ninja
148 +# obviously doesn't support.
149 +CMAKE_MAKEFILE_GENERATOR=emake
150 +
151 +inherit cmake python-r1 toolchain-funcs virtualx wxwidgets
152 +
153 +DESCRIPTION="GNU Data Language"
154 +HOMEPAGE="https://github.com/gnudatalanguage/gdl"
155 +SRC_URI="https://github.com/gnudatalanguage/gdl/archive/v$(ver_cut 1-3)-rc.$(ver_cut 5).tar.gz -> ${P}.tar.gz"
156 +
157 +LICENSE="GPL-2"
158 +SLOT="0"
159 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
160 +IUSE="+eigen fftw glpk graphicsmagick gshhs hdf hdf5 +imagemagick netcdf
161 + openmp png proj postscript python tiff udunits wxwidgets"
162 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
163 +
164 +RDEPEND="
165 + dev-cpp/antlr-cpp:2=
166 + dev-libs/expat
167 + sci-libs/gsl:0=
168 + sci-libs/plplot:0=[cxx,-dynamic]
169 + sys-libs/ncurses:0=
170 + sys-libs/readline:0=
171 + sys-libs/zlib
172 + x11-libs/libX11
173 + fftw? ( sci-libs/fftw:3.0= )
174 + glpk? ( sci-mathematics/glpk:= )
175 + gshhs? (
176 + sci-geosciences/gshhs-data
177 + sci-geosciences/gshhs:0=
178 + )
179 + hdf? ( sci-libs/hdf:0= )
180 + hdf5? ( sci-libs/hdf5:0= )
181 + imagemagick? (
182 + !graphicsmagick? ( media-gfx/imagemagick:=[cxx] )
183 + graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] )
184 + )
185 + netcdf? ( sci-libs/netcdf )
186 + proj? ( sci-libs/proj )
187 + postscript? ( dev-libs/pslib )
188 + python? (
189 + ${PYTHON_DEPS}
190 + dev-python/numpy[${PYTHON_USEDEP}]
191 + )
192 + tiff? (
193 + media-libs/tiff
194 + sci-libs/libgeotiff
195 + )
196 + udunits? ( sci-libs/udunits )
197 + wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
198 +DEPEND="${RDEPEND}
199 + eigen? ( dev-cpp/eigen:3 )"
200 +BDEPEND="
201 + virtual/pkgconfig
202 + python? ( app-admin/chrpath )"
203 +
204 +S="${WORKDIR}/${PN}-$(ver_cut 1-3)-rc.$(ver_cut 5)"
205 +
206 +PATCHES=( "${FILESDIR}"/${PN}-1.0.0_rc3-cmake.patch )
207 +
208 +pkg_pretend() {
209 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
210 +}
211 +
212 +pkg_setup() {
213 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
214 +}
215 +
216 +src_prepare() {
217 + use wxwidgets && setup-wxwidgets unicode
218 + use hdf5 && has_version sci-libs/hdf5[mpi] && export CXX=mpicxx
219 +
220 + # remove bundled antlr
221 + rm -r src/antlr || die
222 +
223 + # gentoo: avoid install files in datadir directory
224 + # and manually install them in src_install
225 + sed -e '/AUTHORS/d' -i CMakeLists.txt || die
226 + cmake_src_prepare
227 +}
228 +
229 +src_configure() {
230 + # MPI is still very buggy
231 + # x11=off does not compile
232 + local mycmakeargs=(
233 + -DMPI=OFF
234 + -DREADLINE=ON
235 + -DX11=ON
236 + -DEXPAT=ON
237 + -DEIGEN3=$(usex eigen)
238 + -DFFTW=$(usex fftw)
239 + -DGRIB=OFF
240 + -DGLPK=$(usex glpk)
241 + -DHDF=$(usex hdf)
242 + -DHDF5=$(usex hdf5)
243 + -DLIBPROJ4=$(usex proj)
244 + -DNETCDF=$(usex netcdf)
245 + -DOPENMP=$(usex openmp)
246 + -DPNGLIB=$(usex png)
247 + -DUDUNITS2=$(usex udunits)
248 + -DWXWIDGETS=$(usex wxwidgets)
249 + -DGRAPHICSMAGICK=$(usex imagemagick $(usex graphicsmagick))
250 + -DMAGICK=$(usex imagemagick $(usex !graphicsmagick))
251 + -DTIFF=$(usex tiff)
252 + -DGEOTIFF=$(usex tiff)
253 + -DSHAPELIB=OFF
254 + -DPLPLOTDIR="${EPREFIX}"/usr/$(get_libdir)
255 + )
256 +
257 + configuration() {
258 + mycmakeargs+=( "$@" )
259 + cmake_src_configure
260 + }
261 + configuration -DPYTHON_MODULE=OFF -DPYTHON=OFF
262 + use python && python_foreach_impl configuration -DPYTHON_MODULE=ON -DPYTHON=ON
263 +}
264 +
265 +src_compile() {
266 + cmake_src_compile
267 + use python && python_foreach_impl cmake_src_compile
268 +}
269 +
270 +src_test() {
271 + # there is check target instead of the ctest to define some LDPATH
272 + virtx cmake_build check
273 +}
274 +
275 +src_install() {
276 + cmake_src_install
277 + if use python; then
278 + installation() {
279 + chrpath -d src/GDL.so || die
280 + python_domodule src/GDL.so
281 + }
282 + python_foreach_impl run_in_build_dir installation
283 + dodoc PYTHON.txt
284 + fi
285 +
286 + newenvd - 50gdl <<-_EOF_
287 + GDL_PATH="+${EPREFIX}/usr/share/gnudatalanguage"
288 + _EOF_
289 +}
290
291 diff --git a/dev-lang/gdl/metadata.xml b/dev-lang/gdl/metadata.xml
292 index a0c94d34188..16e4a758b28 100644
293 --- a/dev-lang/gdl/metadata.xml
294 +++ b/dev-lang/gdl/metadata.xml
295 @@ -13,6 +13,7 @@
296 <use>
297 <flag name="eigen">Build matrix manipulation with <pkg>dev-cpp/eigen</pkg></flag>
298 <flag name="hdf">Add support for the Hierarchical Data Format v.4</flag>
299 + <flag name="glpk">Use GNU Linear Programming Kit <pkg>sci-mathematics/glpk</pkg></flag>
300 <flag name="gshhs">Add support for projection adn continent maps with <pkg>sci-geosciences/gshhs-data</pkg></flag>
301 <flag name="proj">Add support for <pkg>sci-libs/proj</pkg> (geographic projections)</flag>
302 <flag name="udunits">Add support for manipulating units of physical quantities</flag>