[R-pkg-team] Bug#951655: r-cran-sf: FTBFS with PROJ 7.0.0 (configure: error: proj_api.h not found in standard or given locations.)
Sebastiaan Couwenberg
sebastic at xs4all.nl
Thu Feb 20 17:09:32 GMT 2020
Control: tags -1 fixed-upstream patch
The attached patch fixes the issue.
Kind Regards,
Bas
--
GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1
-------------- next part --------------
diff -Nru r-cran-sf-0.8-1+dfsg/debian/changelog r-cran-sf-0.8-1+dfsg/debian/changelog
--- r-cran-sf-0.8-1+dfsg/debian/changelog 2020-02-05 07:59:58.000000000 +0100
+++ r-cran-sf-0.8-1+dfsg/debian/changelog 2020-02-19 08:33:09.000000000 +0100
@@ -1,3 +1,9 @@
+r-cran-sf (0.8-1+dfsg-2) UNRELEASED; urgency=medium
+
+ * Rebuild with PROJ 7.0.0.
+
+ -- Dylan Aïssi <daissi at debian.org> Wed, 19 Feb 2020 08:33:09 +0100
+
r-cran-sf (0.8-1+dfsg-1) unstable; urgency=medium
* Team upload.
diff -Nru r-cran-sf-0.8-1+dfsg/debian/patches/proj-6.3.x.patch r-cran-sf-0.8-1+dfsg/debian/patches/proj-6.3.x.patch
--- r-cran-sf-0.8-1+dfsg/debian/patches/proj-6.3.x.patch 1970-01-01 01:00:00.000000000 +0100
+++ r-cran-sf-0.8-1+dfsg/debian/patches/proj-6.3.x.patch 2020-02-19 08:33:09.000000000 +0100
@@ -0,0 +1,18 @@
+Description: use full +init=epsg:xxx strings if PROJ >= 6.3.1
+Author: Edzer Pebesma <edzer.pebesma at uni-muenster.de>
+Origin: https://github.com/r-spatial/sf/commit/7e25be898e5b8f0bcc6a775238d81631ad6a75b0
+Bug-Debian: https://bugs.debian.org/951655
+
+--- a/R/crs.R
++++ b/R/crs.R
+@@ -155,7 +155,9 @@ make_crs = function(x, wkt = FALSE) {
+ else if (is.numeric(x))
+ CPL_crs_from_epsg(as.integer(x))
+ else if (is.character(x)) {
+- if (grepl("+init=epsg:", x) && sf_extSoftVersion()[["proj.4"]] >= "6.0.0") {
++ if (grepl("+init=epsg:", x) &&
++ sf_extSoftVersion()[["proj.4"]] >= "6.0.0" &&
++ sf_extSoftVersion()[["proj.4"]] < "6.3.1") { # nocov start FIXME:
+ x = strsplit(x, " ")[[1]]
+ if (length(x) > 1)
+ warning(paste("the following proj4string elements are going to be ignored:",
diff -Nru r-cran-sf-0.8-1+dfsg/debian/patches/proj-7.0.0.patch r-cran-sf-0.8-1+dfsg/debian/patches/proj-7.0.0.patch
--- r-cran-sf-0.8-1+dfsg/debian/patches/proj-7.0.0.patch 1970-01-01 01:00:00.000000000 +0100
+++ r-cran-sf-0.8-1+dfsg/debian/patches/proj-7.0.0.patch 2020-02-19 08:33:09.000000000 +0100
@@ -0,0 +1,44 @@
+Description: configure for PROJ 7.x.y
+Author: Edzer Pebesma <edzer.pebesma at uni-muenster.de>
+Origin: https://github.com/r-spatial/sf/commit/25b558fa8896a90e28e16e59d6e31fbc2b63c1db
+Bug-Debian: https://bugs.debian.org/951655
+
+--- a/configure
++++ b/configure
+@@ -3636,6 +3636,8 @@ if test "${gdal_has_proj}" = no; then
+ as_fn_error $? "OGRCoordinateTransformation() does not return a coord.trans: PROJ not available?" "$LINENO" 5
+ fi
+ rm -fr errors.txt gdal_proj.cpp gdal_proj
++{ $as_echo "$as_me:${as_lineno-$LINENO}: GDAL: ${GDAL_VERSION}" >&5
++$as_echo "$as_me: GDAL: ${GDAL_VERSION}" >&6;}
+
+
+ #
+@@ -3684,7 +3686,7 @@ PROJH="no"
+ if test "${proj_config_ok}" = yes; then
+ PROJ_VERSION=`${PROJ_CONFIG} --modversion`
+ PROJV1=`echo "${PROJ_VERSION}" | cut -c 1`
+- if test "${PROJV1}" = "6"; then
++ if test "${PROJV1}" -ge "6"; then
+ PROJ6="yes"
+ PROJ_CPPFLAGS="${PROJ_CPPFLAGS} -DHAVE_PROJ_H"
+ if test "${proj_api}" = yes; then
+--- a/configure.ac
++++ b/configure.ac
+@@ -300,6 +300,7 @@ if test "${gdal_has_proj}" = no; then
+ AC_MSG_ERROR([OGRCoordinateTransformation() does not return a coord.trans: PROJ not available?])
+ fi
+ rm -fr errors.txt gdal_proj.cpp gdal_proj
++AC_MSG_NOTICE([GDAL: ${GDAL_VERSION}])
+
+
+ #
+@@ -341,7 +342,7 @@ PROJH="no"
+ if test "${proj_config_ok}" = yes; then
+ PROJ_VERSION=`${PROJ_CONFIG} --modversion`
+ PROJV1=`echo "${PROJ_VERSION}" | cut -c 1`
+- if test "${PROJV1}" = "6"; then
++ if test "${PROJV1}" -ge "6"; then
+ PROJ6="yes"
+ PROJ_CPPFLAGS="${PROJ_CPPFLAGS} -DHAVE_PROJ_H"
+ if test "${proj_api}" = yes; then
diff -Nru r-cran-sf-0.8-1+dfsg/debian/patches/series r-cran-sf-0.8-1+dfsg/debian/patches/series
--- r-cran-sf-0.8-1+dfsg/debian/patches/series 2020-02-05 07:59:58.000000000 +0100
+++ r-cran-sf-0.8-1+dfsg/debian/patches/series 2020-02-19 08:33:09.000000000 +0100
@@ -1,2 +1,4 @@
exclude_test_requiring_rgeos.patch
exclude_test_requiring_rgdal.patch
+proj-7.0.0.patch
+proj-6.3.x.patch
More information about the R-pkg-team
mailing list