commit:     2514ba75cc3dec365f87e90d0eabef6b5b88bee8
Author:     Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de>
AuthorDate: Fri Jul  1 12:13:26 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 01:48:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2514ba75

sci-geosciences/grass: add support for sci-libs/pdal

Closes: https://bugs.gentoo.org/855509
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de>
Closes: https://github.com/gentoo/gentoo/pull/26186
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{grass-9999.ebuild => grass-7.8.7-r1.ebuild}   | 55 ++++++++++------------
 .../{grass-9999.ebuild => grass-8.0.2-r1.ebuild}   | 14 ++++--
 .../{grass-9999.ebuild => grass-8.2.0-r1.ebuild}   | 14 ++++--
 sci-geosciences/grass/grass-9999.ebuild            |  7 ++-
 sci-geosciences/grass/metadata.xml                 |  1 +
 5 files changed, 52 insertions(+), 39 deletions(-)

diff --git a/sci-geosciences/grass/grass-9999.ebuild 
b/sci-geosciences/grass/grass-7.8.7-r1.ebuild
similarity index 86%
copy from sci-geosciences/grass/grass-9999.ebuild
copy to sci-geosciences/grass/grass-7.8.7-r1.ebuild
index 33808453c9c7..d254c88caf17 100644
--- a/sci-geosciences/grass/grass-9999.ebuild
+++ b/sci-geosciences/grass/grass-7.8.7-r1.ebuild
@@ -9,30 +9,18 @@ WX_GTK_VER="3.0-gtk3"
 
 inherit autotools desktop python-single-r1 toolchain-funcs wxwidgets xdg
 
+MY_PM=${PN}$(ver_cut 1-2 ${PV})
+MY_PM=${MY_PM/.}
+MY_P=${P/_rc/RC}
+
 DESCRIPTION="A free GIS with raster and vector functionality, as well as 3D 
vizualization"
 HOMEPAGE="https://grass.osgeo.org/";
+SRC_URI="https://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz";
 
 LICENSE="GPL-2"
-SLOT="0/8.3"
-
-GVERSION=${SLOT#*/}
-MY_PM="${PN}${GVERSION}"
-MY_PM="${MY_PM/.}"
-
-if [[ ${PV} =~ "9999" ]]; then
-       inherit git-r3
-       EGIT_REPO_URI="https://github.com/OSGeo/grass.git";
-else
-       MY_P="${P/_rc/RC}"
-       SRC_URI="https://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz";
-       if [[ ${PV} != *_rc* ]] ; then
-               KEYWORDS="~amd64 ~ppc ~x86"
-       fi
-
-       S="${WORKDIR}/${MY_P}"
-fi
-
-IUSE="blas cxx fftw geos lapack las mysql netcdf nls odbc opencl opengl openmp 
png postgres readline sqlite threads tiff truetype X zstd"
+SLOT="0/7.8.0"
+KEYWORDS="~amd64 ~x86"
+IUSE="blas cxx fftw geos lapack liblas mysql netcdf nls odbc opencl opengl 
openmp pdal png postgres readline sqlite threads tiff truetype X zstd"
 REQUIRED_USE="
        ${PYTHON_REQUIRED_USE}
        opengl? ( X )"
@@ -50,8 +38,6 @@ RDEPEND="
        sci-libs/proj:=
        sci-libs/xdrfile
        sys-libs/zlib
-       media-libs/libglvnd
-       media-libs/glu
        blas? (
                virtual/cblas[eselect-ldso(+)]
                virtual/blas[eselect-ldso(+)]
@@ -59,12 +45,13 @@ RDEPEND="
        fftw? ( sci-libs/fftw:3.0= )
        geos? ( sci-libs/geos:= )
        lapack? ( virtual/lapack[eselect-ldso(+)] )
-       las? ( sci-geosciences/liblas )
+       liblas? ( sci-geosciences/liblas )
        mysql? ( dev-db/mysql-connector-c:= )
        netcdf? ( sci-libs/netcdf:= )
        odbc? ( dev-db/unixODBC )
        opencl? ( virtual/opencl )
        opengl? ( virtual/opengl )
+       pdal? ( <sci-libs/pdal-2.4.0:0= )
        png? ( media-libs/libpng:0= )
        postgres? ( >=dev-db/postgresql-8.4:= )
        readline? ( sys-libs/readline:0= )
@@ -90,6 +77,13 @@ BDEPEND="
        virtual/pkgconfig
        X? ( dev-lang/swig )"
 
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+       # bug 746590
+       "${FILESDIR}/${PN}-flock.patch"
+)
+
 pkg_setup() {
        if use lapack; then
                local mylapack=$(eselect lapack show)
@@ -179,7 +173,8 @@ src_configure() {
                $(use_with threads pthread)
                $(use_with openmp)
                $(use_with opencl)
-               $(use_with las liblas "${EPREFIX}"/usr/bin/liblas-config)
+               $(use_with pdal pdal "${EPREFIX}"/usr/bin/pdal-config)
+               $(use_with liblas liblas "${EPREFIX}"/usr/bin/liblas-config)
                $(use_with X wxwidgets "${WX_CONFIG}")
                $(use_with netcdf netcdf "${EPREFIX}"/usr/bin/nc-config)
                $(use_with geos geos "${EPREFIX}"/usr/bin/geos-config)
@@ -236,7 +231,7 @@ src_install() {
        local gisbase=/usr/$(get_libdir)/${MY_PM}
        sed -e "s:GISBASE = 
os.path.normpath(\"${D}/usr/$(get_libdir)/${MY_PM}\"):\
 GISBASE = os.path.normpath(\"${gisbase}\"):" \
-               -i "${ED}"/usr/bin/grass || die
+               -i "${ED}"/usr/bin/${MY_PM} || die
 
        # get proper fonts path for fontcap
        sed -i \
@@ -246,16 +241,16 @@ GISBASE = os.path.normpath(\"${gisbase}\"):" \
        # set proper python interpreter
        sed -e "s:os.environ\[\"GRASS_PYTHON\"\] = \"python3\":\
 os.environ\[\"GRASS_PYTHON\"\] = \"${EPYTHON}\":" \
-               -i "${ED}"/usr/bin/grass || die
+               -i "${ED}"/usr/bin/${MY_PM} || die
 
-       # set proper GISDBASE directory path in the demolocation 
.grassrc${GVERSION//.} file
+       # set proper GISDBASE directory path in the demolocation .grassrc78 file
        sed -e "s:GISDBASE\:.*$:GISDBASE\: ${gisbase}:" \
-               -i "${ED}"${gisbase}/demolocation/.grassrc${GVERSION//.} || die
+               -i "${ED}"${gisbase}/demolocation/.grassrc78 || die
 
        if use X; then
                local GUI="-gui"
                [[ ${WX_BUILD} == yes ]] && GUI="-wxpython"
-               make_desktop_entry "/usr/bin/grass ${GUI}" "${PN}" 
"${PN}-48x48" "Science;Education"
+               make_desktop_entry "/usr/bin/${MY_PM} ${GUI}" "${PN}" 
"${PN}-48x48" "Science;Education"
                doicon -s 48 gui/icons/${PN}-48x48.png
        fi
 
@@ -269,8 +264,6 @@ os.environ\[\"GRASS_PYTHON\"\] = \"${EPYTHON}\":" \
 
 pkg_postinst() {
        use X && xdg_pkg_postinst
-       ewarn 'Starting with version 8.0.2 the "liblas" USE flag has been 
renamed'
-       ewarn 'to "las" in order to match dev-games/openscenegraph (Bug 680854)'
 }
 
 pkg_postrm() {

diff --git a/sci-geosciences/grass/grass-9999.ebuild 
b/sci-geosciences/grass/grass-8.0.2-r1.ebuild
similarity index 95%
copy from sci-geosciences/grass/grass-9999.ebuild
copy to sci-geosciences/grass/grass-8.0.2-r1.ebuild
index 33808453c9c7..4bb9a92f3ba1 100644
--- a/sci-geosciences/grass/grass-9999.ebuild
+++ b/sci-geosciences/grass/grass-8.0.2-r1.ebuild
@@ -13,7 +13,6 @@ DESCRIPTION="A free GIS with raster and vector functionality, 
as well as 3D vizu
 HOMEPAGE="https://grass.osgeo.org/";
 
 LICENSE="GPL-2"
-SLOT="0/8.3"
 
 GVERSION=${SLOT#*/}
 MY_PM="${PN}${GVERSION}"
@@ -22,17 +21,19 @@ MY_PM="${MY_PM/.}"
 if [[ ${PV} =~ "9999" ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/OSGeo/grass.git";
+       SLOT="0/8.1"
 else
        MY_P="${P/_rc/RC}"
+       SLOT="0/$(ver_cut 1-2 ${PV})"
        SRC_URI="https://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz";
        if [[ ${PV} != *_rc* ]] ; then
-               KEYWORDS="~amd64 ~ppc ~x86"
+               KEYWORDS="~amd64 ~x86"
        fi
 
        S="${WORKDIR}/${MY_P}"
 fi
 
-IUSE="blas cxx fftw geos lapack las mysql netcdf nls odbc opencl opengl openmp 
png postgres readline sqlite threads tiff truetype X zstd"
+IUSE="blas cxx fftw geos lapack las mysql netcdf nls odbc opencl opengl openmp 
pdal png postgres readline sqlite threads tiff truetype X zstd"
 REQUIRED_USE="
        ${PYTHON_REQUIRED_USE}
        opengl? ( X )"
@@ -65,6 +66,7 @@ RDEPEND="
        odbc? ( dev-db/unixODBC )
        opencl? ( virtual/opencl )
        opengl? ( virtual/opengl )
+       pdal? ( >=sci-libs/pdal-2.0.0:0= )
        png? ( media-libs/libpng:0= )
        postgres? ( >=dev-db/postgresql-8.4:= )
        readline? ( sys-libs/readline:0= )
@@ -90,6 +92,11 @@ BDEPEND="
        virtual/pkgconfig
        X? ( dev-lang/swig )"
 
+PATCHES=(
+       # bug 746590
+       "${FILESDIR}/${PN}-flock.patch"
+)
+
 pkg_setup() {
        if use lapack; then
                local mylapack=$(eselect lapack show)
@@ -179,6 +186,7 @@ src_configure() {
                $(use_with threads pthread)
                $(use_with openmp)
                $(use_with opencl)
+               $(use_with pdal pdal "${EPREFIX}"/usr/bin/pdal-config)
                $(use_with las liblas "${EPREFIX}"/usr/bin/liblas-config)
                $(use_with X wxwidgets "${WX_CONFIG}")
                $(use_with netcdf netcdf "${EPREFIX}"/usr/bin/nc-config)

diff --git a/sci-geosciences/grass/grass-9999.ebuild 
b/sci-geosciences/grass/grass-8.2.0-r1.ebuild
similarity index 95%
copy from sci-geosciences/grass/grass-9999.ebuild
copy to sci-geosciences/grass/grass-8.2.0-r1.ebuild
index 33808453c9c7..581cd7fa78cb 100644
--- a/sci-geosciences/grass/grass-9999.ebuild
+++ b/sci-geosciences/grass/grass-8.2.0-r1.ebuild
@@ -13,7 +13,6 @@ DESCRIPTION="A free GIS with raster and vector functionality, 
as well as 3D vizu
 HOMEPAGE="https://grass.osgeo.org/";
 
 LICENSE="GPL-2"
-SLOT="0/8.3"
 
 GVERSION=${SLOT#*/}
 MY_PM="${PN}${GVERSION}"
@@ -21,18 +20,20 @@ MY_PM="${MY_PM/.}"
 
 if [[ ${PV} =~ "9999" ]]; then
        inherit git-r3
+       SLOT="0/8.3"
        EGIT_REPO_URI="https://github.com/OSGeo/grass.git";
 else
        MY_P="${P/_rc/RC}"
+       SLOT="0/$(ver_cut 1-2 ${PV})"
        SRC_URI="https://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz";
        if [[ ${PV} != *_rc* ]] ; then
-               KEYWORDS="~amd64 ~ppc ~x86"
+               KEYWORDS="~amd64 ~x86"
        fi
 
        S="${WORKDIR}/${MY_P}"
 fi
 
-IUSE="blas cxx fftw geos lapack las mysql netcdf nls odbc opencl opengl openmp 
png postgres readline sqlite threads tiff truetype X zstd"
+IUSE="blas cxx fftw geos lapack las mysql netcdf nls odbc opencl opengl openmp 
pdal png postgres readline sqlite threads tiff truetype X zstd"
 REQUIRED_USE="
        ${PYTHON_REQUIRED_USE}
        opengl? ( X )"
@@ -65,6 +66,7 @@ RDEPEND="
        odbc? ( dev-db/unixODBC )
        opencl? ( virtual/opencl )
        opengl? ( virtual/opengl )
+       pdal? ( >=sci-libs/pdal-2.0.0:0= )
        png? ( media-libs/libpng:0= )
        postgres? ( >=dev-db/postgresql-8.4:= )
        readline? ( sys-libs/readline:0= )
@@ -90,6 +92,11 @@ BDEPEND="
        virtual/pkgconfig
        X? ( dev-lang/swig )"
 
+PATCHES=(
+       # bug 746590
+       "${FILESDIR}/${PN}-flock.patch"
+)
+
 pkg_setup() {
        if use lapack; then
                local mylapack=$(eselect lapack show)
@@ -179,6 +186,7 @@ src_configure() {
                $(use_with threads pthread)
                $(use_with openmp)
                $(use_with opencl)
+               $(use_with pdal pdal "${EPREFIX}"/usr/bin/pdal-config)
                $(use_with las liblas "${EPREFIX}"/usr/bin/liblas-config)
                $(use_with X wxwidgets "${WX_CONFIG}")
                $(use_with netcdf netcdf "${EPREFIX}"/usr/bin/nc-config)

diff --git a/sci-geosciences/grass/grass-9999.ebuild 
b/sci-geosciences/grass/grass-9999.ebuild
index 33808453c9c7..8b286969e78a 100644
--- a/sci-geosciences/grass/grass-9999.ebuild
+++ b/sci-geosciences/grass/grass-9999.ebuild
@@ -13,7 +13,6 @@ DESCRIPTION="A free GIS with raster and vector functionality, 
as well as 3D vizu
 HOMEPAGE="https://grass.osgeo.org/";
 
 LICENSE="GPL-2"
-SLOT="0/8.3"
 
 GVERSION=${SLOT#*/}
 MY_PM="${PN}${GVERSION}"
@@ -22,8 +21,10 @@ MY_PM="${MY_PM/.}"
 if [[ ${PV} =~ "9999" ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/OSGeo/grass.git";
+       SLOT="0/8.3"
 else
        MY_P="${P/_rc/RC}"
+       SLOT="0/$(ver_cut 1-2 ${PV})"
        SRC_URI="https://grass.osgeo.org/${MY_PM}/source/${MY_P}.tar.gz";
        if [[ ${PV} != *_rc* ]] ; then
                KEYWORDS="~amd64 ~ppc ~x86"
@@ -32,7 +33,7 @@ else
        S="${WORKDIR}/${MY_P}"
 fi
 
-IUSE="blas cxx fftw geos lapack las mysql netcdf nls odbc opencl opengl openmp 
png postgres readline sqlite threads tiff truetype X zstd"
+IUSE="blas cxx fftw geos lapack las mysql netcdf nls odbc opencl opengl openmp 
pdal png postgres readline sqlite threads tiff truetype X zstd"
 REQUIRED_USE="
        ${PYTHON_REQUIRED_USE}
        opengl? ( X )"
@@ -65,6 +66,7 @@ RDEPEND="
        odbc? ( dev-db/unixODBC )
        opencl? ( virtual/opencl )
        opengl? ( virtual/opengl )
+       pdal? ( >=sci-libs/pdal-2.0.0:0= )
        png? ( media-libs/libpng:0= )
        postgres? ( >=dev-db/postgresql-8.4:= )
        readline? ( sys-libs/readline:0= )
@@ -179,6 +181,7 @@ src_configure() {
                $(use_with threads pthread)
                $(use_with openmp)
                $(use_with opencl)
+               $(use_with pdal pdal "${EPREFIX}"/usr/bin/pdal-config)
                $(use_with las liblas "${EPREFIX}"/usr/bin/liblas-config)
                $(use_with X wxwidgets "${WX_CONFIG}")
                $(use_with netcdf netcdf "${EPREFIX}"/usr/bin/nc-config)

diff --git a/sci-geosciences/grass/metadata.xml 
b/sci-geosciences/grass/metadata.xml
index 66b650a3707b..5d58259db818 100644
--- a/sci-geosciences/grass/metadata.xml
+++ b/sci-geosciences/grass/metadata.xml
@@ -23,6 +23,7 @@
                <flag name="liblas">Include support for LAS and LAZ encoded 
LiDAR files through <pkg>sci-geosciences/liblas</pkg></flag>
                <flag name="las">Include support for LAS and LAZ encoded LiDAR 
files through <pkg>sci-geosciences/liblas</pkg></flag>
                <flag name="opencl">Enable OpenCL support</flag>
+               <flag name="pdal">Enable support for PDAL for point clouds via 
<pkg>sci-libs/pdal</pkg></flag>
        </use>
        <upstream>
                <remote-id type="github">OSGeo/grass</remote-id>

Reply via email to