From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C053013888F for ; Wed, 14 Oct 2015 15:22:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D607821C009; Wed, 14 Oct 2015 15:22:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3924321C009 for ; Wed, 14 Oct 2015 15:22:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4F458340940 for ; Wed, 14 Oct 2015 15:22:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BFCC010CB for ; Wed, 14 Oct 2015 15:22:32 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1444836143.d50549b87f3b9369d4012148d510214abea0f8c7.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/gdl/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/gdl/gdl-0.9.5-r1.ebuild X-VCS-Directories: dev-lang/gdl/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: d50549b87f3b9369d4012148d510214abea0f8c7 X-VCS-Branch: master Date: Wed, 14 Oct 2015 15:22:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5bf34246-20ff-4dfc-b9f1-15e246424562 X-Archives-Hash: cec1b2bb7fbc04d26e08bb3cb79d9487 commit: d50549b87f3b9369d4012148d510214abea0f8c7 Author: James Le Cuirot gentoo org> AuthorDate: Wed Oct 14 14:48:29 2015 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Wed Oct 14 15:22:23 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d50549b8 dev-lang/gdl: Use dev-cpp/antlr-cpp as well as dev-java/antlr The old dependency was wrong anyway because it was missing from RDEPEND. We now need USE defaults on antlr to avoid conflicts until the older version is removed. Package-Manager: portage-2.2.20.1 dev-lang/gdl/gdl-0.9.5-r1.ebuild | 157 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) diff --git a/dev-lang/gdl/gdl-0.9.5-r1.ebuild b/dev-lang/gdl/gdl-0.9.5-r1.ebuild new file mode 100644 index 0000000..60c87fc --- /dev/null +++ b/dev-lang/gdl/gdl-0.9.5-r1.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +WX_GTK_VER="2.8" +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-utils eutils python-r1 wxwidgets toolchain-funcs virtualx + +DESCRIPTION="GNU Data Language" +HOMEPAGE="http://gnudatalanguage.sourceforge.net/" +SRC_URI="mirror://sourceforge/gnudatalanguage/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+eigen fftw grib gshhs hdf hdf5 imagemagick netcdf openmp + png proj postscript python static-libs udunits wxwidgets" + +RDEPEND=" + dev-cpp/antlr-cpp:2= + sci-libs/gsl:0= + sci-libs/plplot:0=[-dynamic] + sys-libs/ncurses:0= + sys-libs/readline:0= + sys-libs/zlib:0= + x11-libs/libX11:0= + fftw? ( sci-libs/fftw:3.0= ) + grib? ( sci-libs/grib_api:0= ) + gshhs? ( sci-geosciences/gshhs-data sci-geosciences/gshhs:0= ) + hdf? ( sci-libs/hdf:0= ) + hdf5? ( sci-libs/hdf5:0= ) + imagemagick? ( + || ( + media-gfx/graphicsmagick[cxx] + media-gfx/imagemagick[cxx] + ) + ) + netcdf? ( sci-libs/netcdf ) + proj? ( sci-libs/proj ) + postscript? ( dev-libs/pslib ) + python? ( + ${PYTHON_DEPS} + dev-python/numpy[${PYTHON_USEDEP}] + ) + udunits? ( sci-libs/udunits ) + wxwidgets? ( x11-libs/wxGTK:2.8[X,-odbc] )" + +DEPEND="${RDEPEND} + dev-java/antlr:0[java(+),script(+)] + virtual/pkgconfig + eigen? ( dev-cpp/eigen:3 )" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +PATCHES=( + "${FILESDIR}"/0.9.5-antlr.patch + "${FILESDIR}"/0.9.2-include.patch + "${FILESDIR}"/0.9.5-plplot.patch + "${FILESDIR}"/0.9.5-png.patch +) + +pkg_setup() { + use openmp && [[ $(tc-getCXX)$ == *g++* ]] && ! tc-has-openmp && \ + die "You have openmp enabled but your current g++ does not support it" +} + +src_prepare() { + cmake-utils_src_prepare + + use hdf5 && has_version sci-libs/hdf5[mpi] && export CXX=mpicxx + + # make sure antlr includes are from system and rebuild the sources with it + # https://sourceforge.net/tracker/?func=detail&atid=618685&aid=3465878&group_id=97659 + rm -r src/antlr || die + einfo "Regenerating grammar" + pushd src > /dev/null + local i + for i in *.g; do antlr ${i} || die ; done + popd > /dev/null + + # gentoo: use proj instead of libproj4 (libproj4 last update: 2004) + sed -i \ + -e 's:proj4:proj:' \ + -e 's:lib_proj\.h:proj_api\.h:g' \ + CMakeModules/FindLibproj4.cmake src/math_utl.hpp || die + + # gentoo: avoid install files in datadir directory + sed -i \ + -e '/AUTHORS/d' \ + CMakeLists.txt || die +} + +src_configure() { + # MPI is still very buggy + # x11=off does not compile + local mycmakeargs=( + -DMPICH=OFF + -DBUNDLED_ANTLR=OFF + -DX11=ON + $(cmake-utils_use fftw) + $(cmake-utils_use eigen EIGEN3) + $(cmake-utils_use grib) + $(cmake-utils_use gshhs) + $(cmake-utils_use hdf) + $(cmake-utils_use hdf5) + $(cmake-utils_use netcdf) + $(cmake-utils_use openmp) + $(cmake-utils_use png PNGLIB) + $(cmake-utils_use proj LIBPROJ4) + $(cmake-utils_use postscript PSLIB) + $(cmake-utils_use udunits) + $(cmake-utils_use wxwidgets) + ) + if use imagemagick; then + if has_version media-gfx/graphicsmagick[cxx]; then + mycmakeargs+=( -DGRAPHICSMAGICK=ON -DMAGICK=OFF ) + else + mycmakeargs+=( -DGRAPHICSMAGICK=OFF -DMAGICK=ON ) + fi + else + mycmakeargs+=( -DGRAPHICSMAGICK=OFF -DMAGICK=OFF ) + fi + configuration() { + mycmakeargs+=( $@ ) + cmake-utils_src_configure + } + configuration -DPYTHON_MODULE=OFF -DPYTHON=OFF + use python && python_foreach_impl configuration -DPYTHON_MODULE=ON -DPYTHON=ON +} + +src_compile() { + cmake-utils_src_compile + use python && python_foreach_impl cmake-utils_src_make +} + +src_test() { + # there is check target instead of the ctest to define some LDPATH + Xemake -C "${BUILD_DIR}" check +} + +src_install() { + cmake-utils_src_install + if use python; then + installation() { + mv src/libgdl.so GDL.so || die + python_domodule GDL.so + } + python_foreach_impl run_in_build_dir installation + dodoc PYTHON.txt + fi + + echo "GDL_PATH=\"+${EROOT%/}/usr/share/gnudatalanguage\"" > 50gdl + doenvd 50gdl +}