public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "David Seifert" <soap@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/gdl/, dev-lang/gdl/files/
Date: Sun, 27 Sep 2020 19:17:27 +0000 (UTC)	[thread overview]
Message-ID: <1601234226.1a6e53137d2d93f8d7291c17f5c9c6c70b5d23a4.soap@gentoo> (raw)

commit:     1a6e53137d2d93f8d7291c17f5c9c6c70b5d23a4
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 27 19:17:06 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Sep 27 19:17:06 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a6e5313

dev-lang/gdl: Bump version to 1.0.0_rc3

Bug: https://bugs.gentoo.org/735280
Bug: https://bugs.gentoo.org/741096
Bug: https://bugs.gentoo.org/741402
Closes: https://bugs.gentoo.org/704026
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-lang/gdl/Manifest                        |   1 +
 dev-lang/gdl/files/gdl-1.0.0_rc3-cmake.patch |  94 +++++++++++++++++
 dev-lang/gdl/gdl-1.0.0_rc3.ebuild            | 152 +++++++++++++++++++++++++++
 dev-lang/gdl/metadata.xml                    |   1 +
 4 files changed, 248 insertions(+)

diff --git a/dev-lang/gdl/Manifest b/dev-lang/gdl/Manifest
index 0c6f89abb8a..72b22e14515 100644
--- a/dev-lang/gdl/Manifest
+++ b/dev-lang/gdl/Manifest
@@ -1 +1,2 @@
 DIST gdl-0.9.6v2.tgz 1777167 BLAKE2B 4d92ed93f12e0979d591959d60ae9fa6785400e4f169a00f462103d263bce1aa02e615cc8467b53146791a12045850f9dae1da113f9caff4d6b44dd2a5798b3b SHA512 a816ee2e3822af380a1131a6138263c33560db7286cd699b864da305a1103d5afc881a1cd3574d2e243bfb7e65e759e46322c5e55c66ec15620d9c514565c2c5
+DIST gdl-1.0.0_rc3.tar.gz 32650313 BLAKE2B cdecfe0646e2271e2389e0a04f8da1e8de4534faf743f233169bccf326198025eff7fd7a7b62ed8bd05fa4a0222c6fd30f9469e3edf0f5b2991ef3ef545e616b SHA512 3fde22c7e709b9cdc72a23d2317c043037379c7903418211a699c7e5caa2ed17e78e32e6d2f9b4aa89200e729fc21555821140dfdd58a5a636a858e2841f6335

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
new file mode 100644
index 00000000000..dd7abcc54d9
--- /dev/null
+++ b/dev-lang/gdl/files/gdl-1.0.0_rc3-cmake.patch
@@ -0,0 +1,94 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -206,10 +206,6 @@
+ # mpi
+ check_include_file(mpi.h HAVE_MPI_H)
+ 
+-# SA: whithout it compilation of antlr fails if there's a conflicting 
+-#     version of antlr in system-wide directories
+-include_directories(src)
+-
+ if (NOT WIN32)
+     # Ncurses MANDATORY for readline on POSIX
+     # -DNCURSESDIR=DIR
+@@ -399,8 +395,10 @@
+ 
+ # PLplot MANDATORY
+ # -DPLPLOTDIR=DIR
+-set(CMAKE_PREFIX_PATH ${PLPLOTDIR})
+-find_package(Plplot QUIET)
++
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(PLPLOT REQUIRED plplot plplot-c++)
++
+ set(HAVE_LIBPLPLOTCXXD ${PLPLOT_FOUND})
+ if(PLPLOT_FOUND)
+     set(LIBRARIES ${LIBRARIES} ${PLPLOT_LIBRARIES})
+@@ -490,33 +488,16 @@
+ # -DMAGICK=ON|OFF
+ # -DMAGICKDIR=DIR
+ if(MAGICK)
+-  set(CMAKE_PREFIX_PATH ${MAGICKDIR})
+-  find_package(ImageMagick QUIET COMPONENTS Magick++ MagickWand MagickCore)
+-  mark_as_advanced(ImageMagick_EXECUTABLE_DIR ImageMagick_Magick++_INCLUDE_DIR ImageMagick_Magick++_LIBRARY
+-    ImageMagick_MagickCore_INCLUDE_DIR ImageMagick_MagickCore_LIBRARY ImageMagick_MagickWand_INCLUDE_DIR ImageMagick_MagickWand_LIBRARY)
+-  set(USE_MAGICK ${ImageMagick_FOUND})
+-  if(ImageMagick_FOUND)
+-    find_program(MAGICKXXCONFIG Magick++-config)
+-    if(MAGICKXXCONFIG)
+-      execute_process(COMMAND ${MAGICKXXCONFIG} "--libs" OUTPUT_VARIABLE MAGICKXXCONFIGLIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
+-      set(LIBRARIES ${LIBRARIES} ${MAGICKXXCONFIGLIBS})     
+-    else(MAGICKXXCONFIG)
+-      message(FATAL_ERROR "ImageMagick is required but was not found (Magick++-config).\n"
+-    "Use -DMAGICKDIR=DIR to specify the ImageMagick directory.\n"
+-    "Use -DMAGICK=OFF to not use it.\n"
+-        "(suitable Debian/Ubuntu package: libmagick++-dev)\n"
+-        "(suitable Fedora/CentOS package: ImageMagick-c++-devel)")
+-    endif(MAGICKXXCONFIG)
+-    set(LIBRARIES ${LIBRARIES} ${ImageMagick_LIBRARIES})
+-    include_directories(${ImageMagick_INCLUDE_DIRS})
+-    set(MAGICK_LIBRARIES ${ImageMagick_LIBRARIES})
+-  else(ImageMagick_FOUND)
+-    message(FATAL_ERROR "ImageMagick is required but was not found.\n"
+-      "Use -DMAGICKDIR=DIR to specify the ImageMagick directory.\n"
+-      "Use -DMAGICK=OFF to not use it.\n"
+-      "(suitable Debian/Ubuntu package: libmagick++-dev)\n"
+-      "(suitable Fedora/CentOS package: ImageMagick-c++-devel)")
+-  endif(ImageMagick_FOUND)
++  find_package(PkgConfig REQUIRED)
++  pkg_check_modules(Magick++ REQUIRED Magick++)
++  pkg_check_modules(MagickWand REQUIRED MagickWand)
++  pkg_check_modules(MagickCore REQUIRED MagickCore)
++
++  set(MAGICK_LIBRARIES ${Magick++_LIBRARIES} ${MagickWand_LIBRARIES} ${MagickCore_LIBRARIES})
++  set(LIBRARIES ${LIBRARIES} ${MAGICK_LIBRARIES})
++  include_directories(${Magick++_INCLUDE_DIRS})
++  include_directories(${MagickWand_INCLUDE_DIRS})
++  include_directories(${MagickCore_INCLUDE_DIRS})
+ endif(MAGICK)
+ 
+ # if GM or IM activated, we check whether Plplot is OK for that
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -186,9 +186,9 @@
+ )
+ endif(USE_EXPAT)
+ 
+-add_subdirectory(antlr)
++find_library(ANTLR_LIBRARY NAMES antlr)
+ 
+-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/antlr ${CMAKE_BINARY_DIR})
++include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
+ link_directories(${LINK_DIRECTORIES})
+ 
+ if(PYTHON_MODULE) #GDL.so
+@@ -203,8 +203,7 @@
+ 	add_executable(gdl ${SOURCES})
+ endif(PYTHON_MODULE)
+ 
+-add_dependencies(gdl antlr) # be sure that antlr is built before gdl
+-target_link_libraries(gdl antlr) # link antlr against gdl
++target_link_libraries(gdl ${ANTLR_LIBRARY}) # link antlr against gdl
+ if (MINGW)
+ target_link_libraries(gdl ws2_32)
+ endif (MINGW)

diff --git a/dev-lang/gdl/gdl-1.0.0_rc3.ebuild b/dev-lang/gdl/gdl-1.0.0_rc3.ebuild
new file mode 100644
index 00000000000..b5fb1c358bc
--- /dev/null
+++ b/dev-lang/gdl/gdl-1.0.0_rc3.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+WX_GTK_VER="3.0-gtk3"
+PYTHON_COMPAT=( python3_{6..9} )
+
+# gdl's build system is a travesty, and actually calls
+# itself in the testsuite, which is something that ninja
+# obviously doesn't support.
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit cmake python-r1 toolchain-funcs virtualx wxwidgets
+
+DESCRIPTION="GNU Data Language"
+HOMEPAGE="https://github.com/gnudatalanguage/gdl"
+SRC_URI="https://github.com/gnudatalanguage/gdl/archive/v$(ver_cut 1-3)-rc.$(ver_cut 5).tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+eigen fftw glpk graphicsmagick gshhs hdf hdf5 +imagemagick netcdf
+	openmp png proj postscript python tiff udunits wxwidgets"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+	dev-cpp/antlr-cpp:2=
+	dev-libs/expat
+	sci-libs/gsl:0=
+	sci-libs/plplot:0=[cxx,-dynamic]
+	sys-libs/ncurses:0=
+	sys-libs/readline:0=
+	sys-libs/zlib
+	x11-libs/libX11
+	fftw? ( sci-libs/fftw:3.0= )
+	glpk? ( sci-mathematics/glpk:= )
+	gshhs? (
+		sci-geosciences/gshhs-data
+		sci-geosciences/gshhs:0=
+	)
+	hdf? ( sci-libs/hdf:0= )
+	hdf5? ( sci-libs/hdf5:0= )
+	imagemagick? (
+		!graphicsmagick? ( media-gfx/imagemagick:=[cxx] )
+		graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] )
+	)
+	netcdf? ( sci-libs/netcdf )
+	proj? ( sci-libs/proj )
+	postscript? ( dev-libs/pslib )
+	python? (
+		${PYTHON_DEPS}
+		dev-python/numpy[${PYTHON_USEDEP}]
+	)
+	tiff? (
+		media-libs/tiff
+		sci-libs/libgeotiff
+	)
+	udunits? ( sci-libs/udunits )
+	wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
+DEPEND="${RDEPEND}
+	eigen? ( dev-cpp/eigen:3 )"
+BDEPEND="
+	virtual/pkgconfig
+	python? ( app-admin/chrpath )"
+
+S="${WORKDIR}/${PN}-$(ver_cut 1-3)-rc.$(ver_cut 5)"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.0.0_rc3-cmake.patch )
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+	use wxwidgets && setup-wxwidgets unicode
+	use hdf5 && has_version sci-libs/hdf5[mpi] && export CXX=mpicxx
+
+	# remove bundled antlr
+	rm -r src/antlr || die
+
+	# gentoo: avoid install files in datadir directory
+	# and manually install them in src_install
+	sed -e '/AUTHORS/d' -i CMakeLists.txt || die
+	cmake_src_prepare
+}
+
+src_configure() {
+	# MPI is still very buggy
+	# x11=off does not compile
+	local mycmakeargs=(
+		-DMPI=OFF
+		-DREADLINE=ON
+		-DX11=ON
+		-DEXPAT=ON
+		-DEIGEN3=$(usex eigen)
+		-DFFTW=$(usex fftw)
+		-DGRIB=OFF
+		-DGLPK=$(usex glpk)
+		-DHDF=$(usex hdf)
+		-DHDF5=$(usex hdf5)
+		-DLIBPROJ4=$(usex proj)
+		-DNETCDF=$(usex netcdf)
+		-DOPENMP=$(usex openmp)
+		-DPNGLIB=$(usex png)
+		-DUDUNITS2=$(usex udunits)
+		-DWXWIDGETS=$(usex wxwidgets)
+		-DGRAPHICSMAGICK=$(usex imagemagick $(usex graphicsmagick))
+		-DMAGICK=$(usex imagemagick $(usex !graphicsmagick))
+		-DTIFF=$(usex tiff)
+		-DGEOTIFF=$(usex tiff)
+		-DSHAPELIB=OFF
+		-DPLPLOTDIR="${EPREFIX}"/usr/$(get_libdir)
+	)
+
+	configuration() {
+		mycmakeargs+=( "$@" )
+		cmake_src_configure
+	}
+	configuration -DPYTHON_MODULE=OFF -DPYTHON=OFF
+	use python && python_foreach_impl configuration -DPYTHON_MODULE=ON -DPYTHON=ON
+}
+
+src_compile() {
+	cmake_src_compile
+	use python && python_foreach_impl cmake_src_compile
+}
+
+src_test() {
+	# there is check target instead of the ctest to define some LDPATH
+	virtx cmake_build check
+}
+
+src_install() {
+	cmake_src_install
+	if use python; then
+		installation() {
+			chrpath -d src/GDL.so || die
+			python_domodule src/GDL.so
+		}
+		python_foreach_impl run_in_build_dir installation
+		dodoc PYTHON.txt
+	fi
+
+	newenvd - 50gdl <<-_EOF_
+		GDL_PATH="+${EPREFIX}/usr/share/gnudatalanguage"
+	_EOF_
+}

diff --git a/dev-lang/gdl/metadata.xml b/dev-lang/gdl/metadata.xml
index a0c94d34188..16e4a758b28 100644
--- a/dev-lang/gdl/metadata.xml
+++ b/dev-lang/gdl/metadata.xml
@@ -13,6 +13,7 @@
 	<use>
 		<flag name="eigen">Build matrix manipulation with <pkg>dev-cpp/eigen</pkg></flag>
 		<flag name="hdf">Add support for the Hierarchical Data Format v.4</flag>
+		<flag name="glpk">Use GNU Linear Programming Kit <pkg>sci-mathematics/glpk</pkg></flag>
 		<flag name="gshhs">Add support for projection adn continent maps with <pkg>sci-geosciences/gshhs-data</pkg></flag>
 		<flag name="proj">Add support for <pkg>sci-libs/proj</pkg> (geographic projections)</flag>
 		<flag name="udunits">Add support for manipulating units of physical quantities</flag>


             reply	other threads:[~2020-09-27 19:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-27 19:17 David Seifert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-16  9:37 [gentoo-commits] repo/gentoo:master commit in: dev-lang/gdl/, dev-lang/gdl/files/ Pacho Ramos
2024-03-09 18:30 Andrew Ammerlaan
2022-10-06 13:00 Andrew Ammerlaan
2015-10-14 15:22 James Le Cuirot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1601234226.1a6e53137d2d93f8d7291c17f5c9c6c70b5d23a4.soap@gentoo \
    --to=soap@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox