Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] grass: update to 8.3.0, orphan
@ 2023-09-27  6:40 classabbyamp
  2023-09-27  7:20 ` [PR PATCH] [Updated] " classabbyamp
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: classabbyamp @ 2023-09-27  6:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]

There is a new pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages yer-ass-is-grass
https://github.com/void-linux/void-packages/pull/46285

grass: update to 8.3.0, orphan
- move back to /usr/lib
- enable shared libraries for qgis
- wxwidgets gui is now default again

#### Testing the changes
- I tested the changes in this PR: **YES**

@ar-jan with this update and this patch it should work with qgis:

```diff
diff --git a/srcpkgs/qgis/template b/srcpkgs/qgis/template
index 53e05daba2..208b09722f 100644
--- a/srcpkgs/qgis/template
+++ b/srcpkgs/qgis/template
@@ -4,7 +4,8 @@ version=3.28.9
 revision=1
 archs="x86_64* i686"
 build_style=cmake
-configure_args="-DENABLE_TESTS=OFF -DWITH_3D=True"
+configure_args="-DENABLE_TESTS=OFF -DWITH_3D=True
+ -DGRASS_PREFIX8=${XBPS_CROSS_BASE}/usr/lib/grass83"
 hostmakedepends="bison flex pkg-config protobuf python3 python3-sip-PyQt5 sip"
 makedepends="exiv2-devel expat-devel geos-devel gsl-devel hdf5-devel
  libgdal-devel libspatialindex-devel libspatialite-devel libxml2-devel
@@ -16,7 +17,7 @@ makedepends="exiv2-devel expat-devel geos-devel gsl-devel hdf5-devel
  qca-qt5-ossl qscintilla-qt5-devel qt5-3d-devel qt5-declarative-devel qt5-devel
  qt5-gamepad-devel qt5-location-devel qt5-plugin-mysql qt5-plugin-odbc
  qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds qt5-serialport-devel
- qt5-webkit-devel qtkeychain-qt5-devel qwt-devel sqlite-devel"
+ qt5-webkit-devel qtkeychain-qt5-devel qwt-devel sqlite-devel grass-devel"
 depends="libgdal-python3 libspatialite-devel python3-dateutil python3-dateutil
  python3-Jinja2 python3-numpy python3-numpy python3-owslib python3-Pillow
  python3-psycopg2 python3-Pygments python3-PyQt5 python3-PyQt5-location
```


A patch file from https://github.com/void-linux/void-packages/pull/46285.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-yer-ass-is-grass-46285.patch --]
[-- Type: text/x-diff, Size: 6074 bytes --]

From 6eaaa824a5102ad3d2229930219ce8fcb6b87373 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 27 Sep 2023 02:36:46 -0400
Subject: [PATCH] grass: update to 8.3.0, orphan

move back to /usr/lib, enable shared libraries for qgis, wxwidgets gui
is now default again
---
 common/shlibs                               |  9 ++++
 srcpkgs/grass-devel                         |  1 +
 srcpkgs/grass/patches/pkgconfig-paths.patch | 22 +++++++++
 srcpkgs/grass/template                      | 55 +++++++++++++++------
 4 files changed, 72 insertions(+), 15 deletions(-)
 create mode 120000 srcpkgs/grass-devel
 create mode 100644 srcpkgs/grass/patches/pkgconfig-paths.patch

diff --git a/common/shlibs b/common/shlibs
index 85ead20844ecc..92619c29e2939 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4271,3 +4271,12 @@ libb64.so.0 libb64-1.2.1_1
 libei.so.1 libei-1.1.0_1
 libeis.so.1 libei-1.1.0_1
 liboeffis.so.1 libei-1.1.0_1
+libgrass_datetime.8.3.so grass-8.3.0_1
+libgrass_dbmibase.8.3.so grass-8.3.0_1
+libgrass_dbmiclient.8.3.so grass-8.3.0_1
+libgrass_gis.8.3.so grass-8.3.0_1
+libgrass_gmath.8.3.so grass-8.3.0_1
+libgrass_gproj.8.3.so grass-8.3.0_1
+libgrass_imagery.8.3.so grass-8.3.0_1
+libgrass_raster.8.3.so grass-8.3.0_1
+libgrass_vector.8.3.so grass-8.3.0_1
diff --git a/srcpkgs/grass-devel b/srcpkgs/grass-devel
new file mode 120000
index 0000000000000..0b83126164de4
--- /dev/null
+++ b/srcpkgs/grass-devel
@@ -0,0 +1 @@
+grass
\ No newline at end of file
diff --git a/srcpkgs/grass/patches/pkgconfig-paths.patch b/srcpkgs/grass/patches/pkgconfig-paths.patch
new file mode 100644
index 0000000000000..f420877471725
--- /dev/null
+++ b/srcpkgs/grass/patches/pkgconfig-paths.patch
@@ -0,0 +1,22 @@
+--- a/grass.pc.in
++++ b/grass.pc.in
+@@ -2,13 +2,13 @@
+ #
+ # See also: grass --config
+ 
+-prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-exec_prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-libdir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib
+-includedir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++prefix=@prefix@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@
++exec_prefix=@prefix@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@
++libdir=@prefix@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/lib
++includedir=@prefix@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/include
+ 
+ Name: GRASS
+ Description: GRASS GIS
+ Version: @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-Libs: -L@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_raster -lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lm -lz
+-Cflags: -I@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++Libs: -L@prefix@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_raster -lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lm -lz
++Cflags: -I@prefix@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/include
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index ded8e40daaf10..f00a283ed09ee 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,28 +1,53 @@
 # Template file for 'grass'
 pkgname=grass
-version=8.2.1
-revision=3
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=8.3.0
+revision=1
 build_style=gnu-configure
-configure_args="--prefix=/opt/grass
+configure_args="--prefix=/usr/lib --enable-shared --without-pdal
+ --with-bzlib --with-nls --with-pthread --with-readline --with-geos
+ --with-blas --with-lapack --with-netcdf --with-odbc --with-openmp
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel"
+hostmakedepends="flex gettext libgdal-tools pkg-config python3-numpy python3-six
+ tar"
+makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel fftw-devel
+ cairo-devel glu-devel libzstd-devel bzip2-devel geos-devel gettext-devel
+ readline-devel lapack-devel blas-devel netcdf-devel unixodbc-devel libgomp-devel"
 depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
  python3-six python3-ply wxPython"
 short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/grass-${version}.tar.gz"
-checksum=8116202fb15352646442862230c7ca48ff8943b7bb83626160ce134980843abd
-python_version=3
+distfiles="https://github.com/OSGeo/grass/archive/refs/tags/${version}.tar.gz"
+checksum=8a38d297a41316ec0af1e4b4f8d00738f1fd98be768b8c6001b00e88817a2764
 nocross="tries to execute target binaries"
+# 98-shlib-provides hook doesn't detect shlibs versioned before .so
+shlib_provides="
+ libgrass_datetime.8.3.so
+ libgrass_dbmibase.8.3.so
+ libgrass_dbmiclient.8.3.so
+ libgrass_gis.8.3.so
+ libgrass_gmath.8.3.so
+ libgrass_gproj.8.3.so
+ libgrass_imagery.8.3.so
+ libgrass_raster.8.3.so
+ libgrass_vector.8.3.so"
+
+_binver="${version//./}"
+_binver="${_binver:0:2}"
 
 post_install() {
-	# This package is broken with wxPython (<=4.0.7) and the GUI
-	# is disabled pending further testing with newer wxPython
-	vsed -i "${DESTDIR}/usr/bin/grass" -e "s/\(default_gui =\).*/\1 \"text\"/"
+	vinstall grass.pc 644 usr/lib/pkgconfig
+}
+
+grass-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove "usr/lib/grass${_binver}/include"
+		vmove usr/lib/pkgconfig
+		while read -r file; do
+			vmove "${file/$DESTDIR/}"
+		done < <(find "${DESTDIR}/usr/lib/grass${_binver}/lib" -type l)
+	}
 }

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PR PATCH] [Updated] grass: update to 8.3.0, orphan
  2023-09-27  6:40 [PR PATCH] grass: update to 8.3.0, orphan classabbyamp
@ 2023-09-27  7:20 ` classabbyamp
  2023-09-27 11:12 ` ar-jan
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-09-27  7:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages yer-ass-is-grass
https://github.com/void-linux/void-packages/pull/46285

grass: update to 8.3.0, orphan
- move back to /usr/lib
- enable shared libraries for qgis
- wxwidgets gui is now default again

#### Testing the changes
- I tested the changes in this PR: **YES**

@ar-jan with this update and this patch it should work with qgis:

```diff
diff --git a/srcpkgs/qgis/template b/srcpkgs/qgis/template
index 53e05daba2..208b09722f 100644
--- a/srcpkgs/qgis/template
+++ b/srcpkgs/qgis/template
@@ -4,7 +4,8 @@ version=3.28.9
 revision=1
 archs="x86_64* i686"
 build_style=cmake
-configure_args="-DENABLE_TESTS=OFF -DWITH_3D=True"
+configure_args="-DENABLE_TESTS=OFF -DWITH_3D=True
+ -DGRASS_PREFIX8=${XBPS_CROSS_BASE}/usr/lib/grass83"
 hostmakedepends="bison flex pkg-config protobuf python3 python3-sip-PyQt5 sip"
 makedepends="exiv2-devel expat-devel geos-devel gsl-devel hdf5-devel
  libgdal-devel libspatialindex-devel libspatialite-devel libxml2-devel
@@ -16,7 +17,7 @@ makedepends="exiv2-devel expat-devel geos-devel gsl-devel hdf5-devel
  qca-qt5-ossl qscintilla-qt5-devel qt5-3d-devel qt5-declarative-devel qt5-devel
  qt5-gamepad-devel qt5-location-devel qt5-plugin-mysql qt5-plugin-odbc
  qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds qt5-serialport-devel
- qt5-webkit-devel qtkeychain-qt5-devel qwt-devel sqlite-devel"
+ qt5-webkit-devel qtkeychain-qt5-devel qwt-devel sqlite-devel grass-devel"
 depends="libgdal-python3 libspatialite-devel python3-dateutil python3-dateutil
  python3-Jinja2 python3-numpy python3-numpy python3-owslib python3-Pillow
  python3-psycopg2 python3-Pygments python3-PyQt5 python3-PyQt5-location
```


A patch file from https://github.com/void-linux/void-packages/pull/46285.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-yer-ass-is-grass-46285.patch --]
[-- Type: text/x-diff, Size: 6629 bytes --]

From 69c85636694dc91fa2ed0645612adc3a0b0ec8fc Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 27 Sep 2023 02:36:46 -0400
Subject: [PATCH] grass: update to 8.3.0, orphan

move back to /usr/lib, enable shared libraries for qgis, wxwidgets gui
is now default again
---
 common/shlibs                               |  9 ++++
 srcpkgs/grass-devel                         |  1 +
 srcpkgs/grass/patches/musl.patch            | 10 ++++
 srcpkgs/grass/patches/pkgconfig-paths.patch | 22 ++++++++
 srcpkgs/grass/template                      | 56 +++++++++++++++------
 5 files changed, 83 insertions(+), 15 deletions(-)
 create mode 120000 srcpkgs/grass-devel
 create mode 100644 srcpkgs/grass/patches/musl.patch
 create mode 100644 srcpkgs/grass/patches/pkgconfig-paths.patch

diff --git a/common/shlibs b/common/shlibs
index 85ead20844ecc..92619c29e2939 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4271,3 +4271,12 @@ libb64.so.0 libb64-1.2.1_1
 libei.so.1 libei-1.1.0_1
 libeis.so.1 libei-1.1.0_1
 liboeffis.so.1 libei-1.1.0_1
+libgrass_datetime.8.3.so grass-8.3.0_1
+libgrass_dbmibase.8.3.so grass-8.3.0_1
+libgrass_dbmiclient.8.3.so grass-8.3.0_1
+libgrass_gis.8.3.so grass-8.3.0_1
+libgrass_gmath.8.3.so grass-8.3.0_1
+libgrass_gproj.8.3.so grass-8.3.0_1
+libgrass_imagery.8.3.so grass-8.3.0_1
+libgrass_raster.8.3.so grass-8.3.0_1
+libgrass_vector.8.3.so grass-8.3.0_1
diff --git a/srcpkgs/grass-devel b/srcpkgs/grass-devel
new file mode 120000
index 0000000000000..0b83126164de4
--- /dev/null
+++ b/srcpkgs/grass-devel
@@ -0,0 +1 @@
+grass
\ No newline at end of file
diff --git a/srcpkgs/grass/patches/musl.patch b/srcpkgs/grass/patches/musl.patch
new file mode 100644
index 0000000000000..7cb2b8f74ad1e
--- /dev/null
+++ b/srcpkgs/grass/patches/musl.patch
@@ -0,0 +1,10 @@
+--- a/include/grass/gis.h
++++ b/include/grass/gis.h
+@@ -23,6 +23,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
++#include <stdint.h>
+ 
+ /* Grass and local include files */
+ #include <grass/config.h>
diff --git a/srcpkgs/grass/patches/pkgconfig-paths.patch b/srcpkgs/grass/patches/pkgconfig-paths.patch
new file mode 100644
index 0000000000000..f420877471725
--- /dev/null
+++ b/srcpkgs/grass/patches/pkgconfig-paths.patch
@@ -0,0 +1,22 @@
+--- a/grass.pc.in
++++ b/grass.pc.in
+@@ -2,13 +2,13 @@
+ #
+ # See also: grass --config
+ 
+-prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-exec_prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-libdir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib
+-includedir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++prefix=@prefix@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@
++exec_prefix=@prefix@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@
++libdir=@prefix@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/lib
++includedir=@prefix@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/include
+ 
+ Name: GRASS
+ Description: GRASS GIS
+ Version: @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-Libs: -L@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_raster -lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lm -lz
+-Cflags: -I@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++Libs: -L@prefix@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_raster -lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lm -lz
++Cflags: -I@prefix@/grass@GRASS_VERSION_MAJOR@@GRASS_VERSION_MINOR@/include
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index ded8e40daaf10..2d5a3b55a36f0 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,28 +1,54 @@
 # Template file for 'grass'
 pkgname=grass
-version=8.2.1
-revision=3
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=8.3.0
+revision=1
 build_style=gnu-configure
-configure_args="--prefix=/opt/grass
+configure_args="--prefix=/usr/lib --enable-shared --without-pdal
+ --with-bzlib --with-nls --with-pthread --with-readline --with-geos
+ --with-blas --with-lapack --with-netcdf --with-odbc --with-openmp
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel"
+hostmakedepends="flex gettext libgdal-tools pkg-config python3-numpy python3-six
+ tar"
+makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel fftw-devel
+ cairo-devel glu-devel libzstd-devel bzip2-devel geos-devel gettext-devel
+ readline-devel lapack-devel blas-devel netcdf-devel unixodbc-devel libgomp-devel
+ wxPython"
 depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
  python3-six python3-ply wxPython"
 short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/grass-${version}.tar.gz"
-checksum=8116202fb15352646442862230c7ca48ff8943b7bb83626160ce134980843abd
-python_version=3
+distfiles="https://github.com/OSGeo/grass/archive/refs/tags/${version}.tar.gz"
+checksum=8a38d297a41316ec0af1e4b4f8d00738f1fd98be768b8c6001b00e88817a2764
 nocross="tries to execute target binaries"
+# 98-shlib-provides hook doesn't detect shlibs versioned before .so
+shlib_provides="
+ libgrass_datetime.8.3.so
+ libgrass_dbmibase.8.3.so
+ libgrass_dbmiclient.8.3.so
+ libgrass_gis.8.3.so
+ libgrass_gmath.8.3.so
+ libgrass_gproj.8.3.so
+ libgrass_imagery.8.3.so
+ libgrass_raster.8.3.so
+ libgrass_vector.8.3.so"
+
+_binver="${version//./}"
+_binver="${_binver:0:2}"
 
 post_install() {
-	# This package is broken with wxPython (<=4.0.7) and the GUI
-	# is disabled pending further testing with newer wxPython
-	vsed -i "${DESTDIR}/usr/bin/grass" -e "s/\(default_gui =\).*/\1 \"text\"/"
+	vinstall grass.pc 644 usr/lib/pkgconfig
+}
+
+grass-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove "usr/lib/grass${_binver}/include"
+		vmove usr/lib/pkgconfig
+		while read -r file; do
+			vmove "${file/$DESTDIR/}"
+		done < <(find "${DESTDIR}/usr/lib/grass${_binver}/lib" -type l)
+	}
 }

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: grass: update to 8.3.0, orphan
  2023-09-27  6:40 [PR PATCH] grass: update to 8.3.0, orphan classabbyamp
  2023-09-27  7:20 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-09-27 11:12 ` ar-jan
  2023-09-27 11:15 ` ar-jan
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ar-jan @ 2023-09-27 11:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/46285#issuecomment-1737189909

Comment:
Great, works for me! I don't use the grass gui myself either but it seems to work.

For my understanding, where you're patching `grass.pc.in` I'd tried to address this with

``` sh
post_configure() {
	vsed -i grass.pc -e "s|/usr/lib/grass-$version|/usr/lib/grass$_binver|g"
}
```

So that must've been the reason the libraries weren't found, is that expected not to work? (I did use shlib_provides etc.)

Also wondering, what's the reason to move the symlinks in lib to the -devel package? (when the versioned .so files stay in the main package)

For use with QGIS: would it make more sense to just use `/usr/lib/grass` as install location, instead of `/usr/lib/grass${_binver}`, so we don't have to hardcode the library version in the QGIS template? Alternatively it would be nice if we could do `-DGRASS_PREFIX8=$(pkg-config --variable=prefix grass)` but that isn't supported.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: grass: update to 8.3.0, orphan
  2023-09-27  6:40 [PR PATCH] grass: update to 8.3.0, orphan classabbyamp
  2023-09-27  7:20 ` [PR PATCH] [Updated] " classabbyamp
  2023-09-27 11:12 ` ar-jan
@ 2023-09-27 11:15 ` ar-jan
  2023-09-27 18:09 ` classabbyamp
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ar-jan @ 2023-09-27 11:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

New comment by ar-jan on void-packages repository

https://github.com/void-linux/void-packages/pull/46285#issuecomment-1737189909

Comment:
Great, works for me! I don't use the grass gui myself either but it seems to work.

For my understanding, where you're patching `grass.pc.in` I'd tried to address this with

``` sh
post_configure() {
	vsed -i grass.pc -e "s|/usr/lib/grass-$version|/usr/lib/grass$_binver|g"
}
```

So that must've been the reason the libraries weren't found, is that expected not to work? (I did use shlib_provides etc.)

Also wondering, what's the reason to move the symlinks in lib to the -devel package? (when the versioned .so files stay in the main package)

For use with QGIS: would it make more sense to just use `/usr/lib/grass` as install location, instead of `/usr/lib/grass${_binver}`, so we don't have to hardcode the library version in the QGIS template? (It would be nice if we could do `-DGRASS_PREFIX8=$(pkg-config --variable=prefix grass)` but that isn't supported, could it be?).

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: grass: update to 8.3.0, orphan
  2023-09-27  6:40 [PR PATCH] grass: update to 8.3.0, orphan classabbyamp
                   ` (2 preceding siblings ...)
  2023-09-27 11:15 ` ar-jan
@ 2023-09-27 18:09 ` classabbyamp
  2023-09-27 18:48 ` [PR PATCH] [Updated] " classabbyamp
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-09-27 18:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1364 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/46285#issuecomment-1737860686

Comment:
> where you're patching `grass.pc.in` I'd tried to address this with

yes, it's better to address it before configuration (during patch), and the vsed at that point is very long, so it works better as a patch

> Also wondering, what's the reason to move the symlinks in lib to the -devel package? (when the versioned .so files stay in the main package)

standard practice, but it's usually written like `vmove "usr/lib/*.so"`. this doesn't work when the libraries are versioned before the `.so`

> would it make more sense to just use /usr/lib/grass as install location, instead of /usr/lib/grass${_binver}, so we don't have to hardcode the library version in the QGIS template?

it might, but I see no way to do such thing in the build system without patching it (and potentially a bunch of places in code), which is more effort than I care to do

> It would be nice if we could do -DGRASS_PREFIX8=$(pkg-config --variable=prefix grass) but that isn't supported, could it be?

that won't work in `configure_args` because templates are evaluated before packages are available. you could, however, maybe do something like:
```bash
pre_configure() {
    configure_args+=" -DGRASS_PREFIX8=$(...)"
}
```

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PR PATCH] [Updated] grass: update to 8.3.0, orphan
  2023-09-27  6:40 [PR PATCH] grass: update to 8.3.0, orphan classabbyamp
                   ` (3 preceding siblings ...)
  2023-09-27 18:09 ` classabbyamp
@ 2023-09-27 18:48 ` classabbyamp
  2023-09-27 18:49 ` classabbyamp
  2023-09-27 20:01 ` [PR PATCH] [Merged]: " classabbyamp
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-09-27 18:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages yer-ass-is-grass
https://github.com/void-linux/void-packages/pull/46285

grass: update to 8.3.0, orphan
- move back to /usr/lib
- enable shared libraries for qgis
- wxwidgets gui is now default again

#### Testing the changes
- I tested the changes in this PR: **YES**

@ar-jan with this update and this patch it should work with qgis:

```diff
diff --git a/srcpkgs/qgis/template b/srcpkgs/qgis/template
index 53e05daba2..208b09722f 100644
--- a/srcpkgs/qgis/template
+++ b/srcpkgs/qgis/template
@@ -4,7 +4,8 @@ version=3.28.9
 revision=1
 archs="x86_64* i686"
 build_style=cmake
-configure_args="-DENABLE_TESTS=OFF -DWITH_3D=True"
+configure_args="-DENABLE_TESTS=OFF -DWITH_3D=True
+ -DGRASS_PREFIX8=${XBPS_CROSS_BASE}/usr/lib/grass83"
 hostmakedepends="bison flex pkg-config protobuf python3 python3-sip-PyQt5 sip"
 makedepends="exiv2-devel expat-devel geos-devel gsl-devel hdf5-devel
  libgdal-devel libspatialindex-devel libspatialite-devel libxml2-devel
@@ -16,7 +17,7 @@ makedepends="exiv2-devel expat-devel geos-devel gsl-devel hdf5-devel
  qca-qt5-ossl qscintilla-qt5-devel qt5-3d-devel qt5-declarative-devel qt5-devel
  qt5-gamepad-devel qt5-location-devel qt5-plugin-mysql qt5-plugin-odbc
  qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds qt5-serialport-devel
- qt5-webkit-devel qtkeychain-qt5-devel qwt-devel sqlite-devel"
+ qt5-webkit-devel qtkeychain-qt5-devel qwt-devel sqlite-devel grass-devel"
 depends="libgdal-python3 libspatialite-devel python3-dateutil python3-dateutil
  python3-Jinja2 python3-numpy python3-numpy python3-owslib python3-Pillow
  python3-psycopg2 python3-Pygments python3-PyQt5 python3-PyQt5-location
```


A patch file from https://github.com/void-linux/void-packages/pull/46285.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-yer-ass-is-grass-46285.patch --]
[-- Type: text/x-diff, Size: 6738 bytes --]

From 3891fcb8a1d5285544ac629cea5bb20a6e063fed Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 27 Sep 2023 02:36:46 -0400
Subject: [PATCH] grass: update to 8.3.0, orphan

move back to /usr/lib, enable shared libraries for qgis, wxwidgets gui
is now default again, don't version the install prefix because that
makes it harder to build other packages against grass
---
 common/shlibs                                 |  9 ++++
 srcpkgs/grass-devel                           |  1 +
 .../grass/patches/generic-installdir.patch    | 34 ++++++++++++
 srcpkgs/grass/patches/musl.patch              | 10 ++++
 srcpkgs/grass/template                        | 53 +++++++++++++------
 5 files changed, 92 insertions(+), 15 deletions(-)
 create mode 120000 srcpkgs/grass-devel
 create mode 100644 srcpkgs/grass/patches/generic-installdir.patch
 create mode 100644 srcpkgs/grass/patches/musl.patch

diff --git a/common/shlibs b/common/shlibs
index 85ead20844ecc..92619c29e2939 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4271,3 +4271,12 @@ libb64.so.0 libb64-1.2.1_1
 libei.so.1 libei-1.1.0_1
 libeis.so.1 libei-1.1.0_1
 liboeffis.so.1 libei-1.1.0_1
+libgrass_datetime.8.3.so grass-8.3.0_1
+libgrass_dbmibase.8.3.so grass-8.3.0_1
+libgrass_dbmiclient.8.3.so grass-8.3.0_1
+libgrass_gis.8.3.so grass-8.3.0_1
+libgrass_gmath.8.3.so grass-8.3.0_1
+libgrass_gproj.8.3.so grass-8.3.0_1
+libgrass_imagery.8.3.so grass-8.3.0_1
+libgrass_raster.8.3.so grass-8.3.0_1
+libgrass_vector.8.3.so grass-8.3.0_1
diff --git a/srcpkgs/grass-devel b/srcpkgs/grass-devel
new file mode 120000
index 0000000000000..0b83126164de4
--- /dev/null
+++ b/srcpkgs/grass-devel
@@ -0,0 +1 @@
+grass
\ No newline at end of file
diff --git a/srcpkgs/grass/patches/generic-installdir.patch b/srcpkgs/grass/patches/generic-installdir.patch
new file mode 100644
index 0000000000000..c0567bc17b396
--- /dev/null
+++ b/srcpkgs/grass/patches/generic-installdir.patch
@@ -0,0 +1,34 @@
+--- a/grass.pc.in
++++ b/grass.pc.in
+@@ -2,13 +2,13 @@
+ #
+ # See also: grass --config
+ 
+-prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-exec_prefix=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-libdir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib
+-includedir=@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++prefix=@prefix@/grass
++exec_prefix=@prefix@/grass
++libdir=@prefix@/grass
++includedir=@prefix@/grass
+ 
+ Name: GRASS
+ Description: GRASS GIS
+ Version: @GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@
+-Libs: -L@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_raster -lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lm -lz
+-Cflags: -I@prefix@/grass-@GRASS_VERSION_MAJOR@.@GRASS_VERSION_MINOR@.@GRASS_VERSION_RELEASE@/include
++Libs: -L@prefix@/grass/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_raster -lgrass_vector -lgrass_dbmibase -lgrass_dbmiclient -lm -lz
++Cflags: -I@prefix@/grass/include
+
+--- a/configure
++++ b/configure
+@@ -4243,7 +4243,7 @@
+ if test -n "$MACOSX_APP" ; then
+     INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
+ else
+-    INSTDIR='${prefix}'"/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}"
++    INSTDIR='${prefix}'"/grass"
+ fi
+ 
+ 
diff --git a/srcpkgs/grass/patches/musl.patch b/srcpkgs/grass/patches/musl.patch
new file mode 100644
index 0000000000000..7cb2b8f74ad1e
--- /dev/null
+++ b/srcpkgs/grass/patches/musl.patch
@@ -0,0 +1,10 @@
+--- a/include/grass/gis.h
++++ b/include/grass/gis.h
+@@ -23,6 +23,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <stdbool.h>
++#include <stdint.h>
+ 
+ /* Grass and local include files */
+ #include <grass/config.h>
diff --git a/srcpkgs/grass/template b/srcpkgs/grass/template
index ded8e40daaf10..8910865f17529 100644
--- a/srcpkgs/grass/template
+++ b/srcpkgs/grass/template
@@ -1,28 +1,51 @@
 # Template file for 'grass'
 pkgname=grass
-version=8.2.1
-revision=3
-_binver=${version//./}
-_binver=${_binver:0:2}
+version=8.3.0
+revision=1
 build_style=gnu-configure
-configure_args="--prefix=/opt/grass
+configure_args="--prefix=/usr/lib --enable-shared --without-pdal
+ --with-bzlib --with-nls --with-pthread --with-readline --with-geos
+ --with-blas --with-lapack --with-netcdf --with-odbc --with-openmp
  --with-freetype-includes=${XBPS_CROSS_BASE}/usr/include/freetype2"
-hostmakedepends="flex libgdal-tools pkg-config python3-numpy python3-six tar"
-makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel
- fftw-devel cairo-devel glu-devel"
+hostmakedepends="flex gettext libgdal-tools pkg-config python3-numpy python3-six
+ tar"
+makedepends="proj-devel tiff-devel libgdal-devel sqlite-devel fftw-devel
+ cairo-devel glu-devel libzstd-devel bzip2-devel geos-devel gettext-devel
+ readline-devel lapack-devel blas-devel netcdf-devel unixodbc-devel libgomp-devel
+ wxPython"
 depends="python3-numpy python3-dateutil python3-Pillow python3-matplotlib
  python3-six python3-ply wxPython"
 short_desc="Geographic Resources Analysis Support System - GIS"
-maintainer="Alex Jarosch <research@alexj.at>"
+maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://grass.osgeo.org/"
-distfiles="https://grass.osgeo.org/grass${_binver}/source/grass-${version}.tar.gz"
-checksum=8116202fb15352646442862230c7ca48ff8943b7bb83626160ce134980843abd
-python_version=3
+distfiles="https://github.com/OSGeo/grass/archive/refs/tags/${version}.tar.gz"
+checksum=8a38d297a41316ec0af1e4b4f8d00738f1fd98be768b8c6001b00e88817a2764
 nocross="tries to execute target binaries"
+# 98-shlib-provides hook doesn't detect shlibs versioned before .so
+shlib_provides="
+ libgrass_datetime.8.3.so
+ libgrass_dbmibase.8.3.so
+ libgrass_dbmiclient.8.3.so
+ libgrass_gis.8.3.so
+ libgrass_gmath.8.3.so
+ libgrass_gproj.8.3.so
+ libgrass_imagery.8.3.so
+ libgrass_raster.8.3.so
+ libgrass_vector.8.3.so"
 
 post_install() {
-	# This package is broken with wxPython (<=4.0.7) and the GUI
-	# is disabled pending further testing with newer wxPython
-	vsed -i "${DESTDIR}/usr/bin/grass" -e "s/\(default_gui =\).*/\1 \"text\"/"
+	vinstall grass.pc 644 usr/lib/pkgconfig
+}
+
+grass-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove "usr/lib/grass/include"
+		vmove usr/lib/pkgconfig
+		while read -r file; do
+			vmove "${file/$DESTDIR/}"
+		done < <(find "${DESTDIR}/usr/lib/grass/lib" -type l)
+	}
 }

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: grass: update to 8.3.0, orphan
  2023-09-27  6:40 [PR PATCH] grass: update to 8.3.0, orphan classabbyamp
                   ` (4 preceding siblings ...)
  2023-09-27 18:48 ` [PR PATCH] [Updated] " classabbyamp
@ 2023-09-27 18:49 ` classabbyamp
  2023-09-27 20:01 ` [PR PATCH] [Merged]: " classabbyamp
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-09-27 18:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/46285#issuecomment-1737913805

Comment:
> it might, but I see no way to do such thing in the build system without patching it (and potentially a bunch of places in code), which is more effort than I care to do

ok, this was less painful than I thought. `-DGRASS_PREFIX8=${XBPS_CROSS_BASE}/usr/lib/grass` should work now

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PR PATCH] [Merged]: grass: update to 8.3.0, orphan
  2023-09-27  6:40 [PR PATCH] grass: update to 8.3.0, orphan classabbyamp
                   ` (5 preceding siblings ...)
  2023-09-27 18:49 ` classabbyamp
@ 2023-09-27 20:01 ` classabbyamp
  6 siblings, 0 replies; 8+ messages in thread
From: classabbyamp @ 2023-09-27 20:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1704 bytes --]

There's a merged pull request on the void-packages repository

grass: update to 8.3.0, orphan
https://github.com/void-linux/void-packages/pull/46285

Description:
- move back to /usr/lib
- enable shared libraries for qgis
- wxwidgets gui is now default again

#### Testing the changes
- I tested the changes in this PR: **YES**

@ar-jan with this update and this patch it should work with qgis:

```diff
diff --git a/srcpkgs/qgis/template b/srcpkgs/qgis/template
index 53e05daba2..208b09722f 100644
--- a/srcpkgs/qgis/template
+++ b/srcpkgs/qgis/template
@@ -4,7 +4,8 @@ version=3.28.9
 revision=1
 archs="x86_64* i686"
 build_style=cmake
-configure_args="-DENABLE_TESTS=OFF -DWITH_3D=True"
+configure_args="-DENABLE_TESTS=OFF -DWITH_3D=True
+ -DGRASS_PREFIX8=${XBPS_CROSS_BASE}/usr/lib/grass83"
 hostmakedepends="bison flex pkg-config protobuf python3 python3-sip-PyQt5 sip"
 makedepends="exiv2-devel expat-devel geos-devel gsl-devel hdf5-devel
  libgdal-devel libspatialindex-devel libspatialite-devel libxml2-devel
@@ -16,7 +17,7 @@ makedepends="exiv2-devel expat-devel geos-devel gsl-devel hdf5-devel
  qca-qt5-ossl qscintilla-qt5-devel qt5-3d-devel qt5-declarative-devel qt5-devel
  qt5-gamepad-devel qt5-location-devel qt5-plugin-mysql qt5-plugin-odbc
  qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds qt5-serialport-devel
- qt5-webkit-devel qtkeychain-qt5-devel qwt-devel sqlite-devel"
+ qt5-webkit-devel qtkeychain-qt5-devel qwt-devel sqlite-devel grass-devel"
 depends="libgdal-python3 libspatialite-devel python3-dateutil python3-dateutil
  python3-Jinja2 python3-numpy python3-numpy python3-owslib python3-Pillow
  python3-psycopg2 python3-Pygments python3-PyQt5 python3-PyQt5-location
```


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-09-27 20:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27  6:40 [PR PATCH] grass: update to 8.3.0, orphan classabbyamp
2023-09-27  7:20 ` [PR PATCH] [Updated] " classabbyamp
2023-09-27 11:12 ` ar-jan
2023-09-27 11:15 ` ar-jan
2023-09-27 18:09 ` classabbyamp
2023-09-27 18:48 ` [PR PATCH] [Updated] " classabbyamp
2023-09-27 18:49 ` classabbyamp
2023-09-27 20:01 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).