From a0da58c7d40b6797cff8976c775fb1b721a0bbf1 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Sun, 7 Mar 2021 02:09:48 +0100 Subject: [PATCH] Update to 8.0.0 --- .gitignore | 2 + ...f4076ceb5c38e27371fbd75b548c652c0fcf.patch | 98 +++++++++++++++++++ proj.spec | 26 +++-- proj_pkgconfig.patch | 22 ----- sources | 4 +- 5 files changed, 118 insertions(+), 34 deletions(-) create mode 100644 27e1f4076ceb5c38e27371fbd75b548c652c0fcf.patch delete mode 100644 proj_pkgconfig.patch diff --git a/.gitignore b/.gitignore index bb2e5e5..b0e4ef9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ /proj-data-1.3.tar.gz /proj-7.2.1.tar.gz /proj-data-1.4.tar.gz +/proj-8.0.0.tar.gz +/proj-data-1.5.tar.gz diff --git a/27e1f4076ceb5c38e27371fbd75b548c652c0fcf.patch b/27e1f4076ceb5c38e27371fbd75b548c652c0fcf.patch new file mode 100644 index 0000000..eb80a5b --- /dev/null +++ b/27e1f4076ceb5c38e27371fbd75b548c652c0fcf.patch @@ -0,0 +1,98 @@ +From 27e1f4076ceb5c38e27371fbd75b548c652c0fcf Mon Sep 17 00:00:00 2001 +From: Even Rouault +Date: Sat, 6 Mar 2021 22:12:27 +0100 +Subject: [PATCH] =?UTF-8?q?gie=5Fself=5Ftests:=20fix=20use=20of=20uninitia?= + =?UTF-8?q?lized=20memory=20(fixes=C2=A0#2557)?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + test/unit/gie_self_tests.cpp | 39 ++++++++++++++++++++++-------------- + 1 file changed, 24 insertions(+), 15 deletions(-) + +diff --git a/test/unit/gie_self_tests.cpp b/test/unit/gie_self_tests.cpp +index 4244766ebf..92f1c758dc 100644 +--- a/test/unit/gie_self_tests.cpp ++++ b/test/unit/gie_self_tests.cpp +@@ -268,8 +268,10 @@ TEST_F(gieTest, proj_create_crs_to_crs) { + ASSERT_TRUE(P != nullptr); + PJ_COORD a, b; + +- a.xy.x = 700000.0; +- a.xy.y = 6000000.0; ++ a.xyzt.x = 700000.0; ++ a.xyzt.y = 6000000.0; ++ a.xyzt.z = 0; ++ a.xyzt.t = HUGE_VAL; + b.xy.x = 307788.8761171057; + b.xy.y = 5999669.3036037628; + +@@ -306,8 +308,10 @@ TEST_F(gieTest, proj_create_crs_to_crs_EPSG_4326) { + PJ_COORD a, b; + + // Lat, long degrees +- a.xy.x = 0.0; +- a.xy.y = 3.0; ++ a.xyzt.x = 0.0; ++ a.xyzt.y = 3.0; ++ a.xyzt.z = 0; ++ a.xyzt.t = HUGE_VAL; + + b.xy.x = 500000.0; + b.xy.y = 0.0; +@@ -328,8 +332,10 @@ TEST_F(gieTest, proj_create_crs_to_crs_proj_longlat) { + PJ_COORD a, b; + + // Long, lat degrees +- a.xy.x = 3.0; +- a.xy.y = 0; ++ a.xyzt.x = 3.0; ++ a.xyzt.y = 0; ++ a.xyzt.z = 0; ++ a.xyzt.t = HUGE_VAL; + + b.xy.x = 500000.0; + b.xy.y = 0.0; +@@ -718,9 +724,10 @@ TEST(gie, proj_create_crs_to_crs_PULKOVO42_ETRS89) { + proj_destroy(target_crs); + + // Romania +- c.xyz.x = 45; // Lat +- c.xyz.y = 25; // Long +- c.xyz.z = 0; ++ c.xyzt.x = 45; // Lat ++ c.xyzt.y = 25; // Long ++ c.xyzt.z = 0; ++ c.xyzt.t = HUGE_VAL; + c = proj_trans(P, PJ_FWD, c); + EXPECT_NEAR(c.xy.x, 44.999701238, 1e-9); + EXPECT_NEAR(c.xy.y, 24.998474948, 1e-9); +@@ -740,9 +747,10 @@ TEST(gie, proj_create_crs_to_crs_PULKOVO42_ETRS89) { + EXPECT_NEAR(c.xy.x, 45, 1e-8); + EXPECT_NEAR(c.xy.y, 25, 1e-8); + +- c.xyz.x = 45; // Lat +- c.xyz.y = 25; // Long +- c.xyz.z = 0; ++ c.xyzt.x = 45; // Lat ++ c.xyzt.y = 25; // Long ++ c.xyzt.z = 0; ++ c.xyzt.t = HUGE_VAL; + proj_trans_generic(P, PJ_FWD, &(c.xyz.x), sizeof(double), 1, &(c.xyz.y), + sizeof(double), 1, &(c.xyz.z), sizeof(double), 1, + nullptr, 0, 0); +@@ -783,9 +791,10 @@ TEST(gie, proj_create_crs_to_crs_outside_area_of_use) { + EXPECT_EQ(P->fwd, nullptr); + + // Test point outside area of use of both candidate coordinate operations +- c.xyz.x = 58; // Lat in deg +- c.xyz.y = 5; // Long in deg +- c.xyz.z = 0; ++ c.xyzt.x = 58; // Lat in deg ++ c.xyzt.y = 5; // Long in deg ++ c.xyzt.z = 0; ++ c.xyzt.t = HUGE_VAL; + c = proj_trans(P, PJ_FWD, c); + EXPECT_NEAR(c.xy.x, 64.44444444444444, 1e-9); // Lat in grad + EXPECT_NEAR(c.xy.y, 2.958634259259258, 1e-9); // Long in grad diff --git a/proj.spec b/proj.spec index 3ddcd4a..c5d03f0 100644 --- a/proj.spec +++ b/proj.spec @@ -1,8 +1,8 @@ -%global proj_version 7.2.1 -%global data_version 1.4 +%global proj_version 8.0.0 +%global data_version 1.5 # The name is special so that rpmdev-bumpspec will bump this rather than adding .1 to the end -%global baserelease 2 +%global baserelease 1 # In order to avoid needing to keep incrementing the release version for the # main package forever, we will just construct one for proj that is guaranteed @@ -20,9 +20,9 @@ License: MIT URL: https://proj.org Source0: https://download.osgeo.org/%{name}/%{name}-%{version}.tar.gz Source1: https://download.osgeo.org/%{name}/%{name}-data-%{data_version}.tar.gz - -# Ship a pkgconfig file -Patch0: proj_pkgconfig.patch +# Backport fix for test failure +# https://github.com/rouault/PROJ/commit/27e1f4076ceb5c38e27371fbd75b548c652c0fcf +Patch0: 27e1f4076ceb5c38e27371fbd75b548c652c0fcf.patch BuildRequires: cmake BuildRequires: curl-devel @@ -162,6 +162,7 @@ Supplements: proj\ %data_subpkg -c fr -n France %data_subpkg -c is -n Island -e ISL %data_subpkg -c jp -n Japan +%data_subpkg -c no -n Norway %data_subpkg -c nc -n %{quote:New Caledonia} %data_subpkg -c nl -n Netherlands %data_subpkg -c nz -n %{quote:New Zealand} @@ -189,13 +190,16 @@ mkdir -p %{buildroot}%{_datadir}/%{name} tar -xf %{SOURCE1} --directory %{buildroot}%{_datadir}/%{name} + %check %ctest %files -%license COPYING -%doc NEWS AUTHORS README.md +%doc README.md +%doc %{_docdir}/%{name}/AUTHORS +%doc %{_docdir}/%{name}/NEWS +%license %{_docdir}/%{name}/COPYING %{_bindir}/cct %{_bindir}/cs2cs %{_bindir}/geod @@ -203,8 +207,7 @@ tar -xf %{SOURCE1} --directory %{buildroot}%{_datadir}/%{name} %{_bindir}/proj %{_bindir}/projinfo %{_bindir}/projsync -%{_libdir}/libproj.so.21* -%{_libdir}/libproj.so.19 +%{_libdir}/libproj.so.22* %{_mandir}/man1/*.1* %dir %{_datadir}/%{name} %{_datadir}/%{name}/CH @@ -235,6 +238,9 @@ tar -xf %{SOURCE1} --directory %{buildroot}%{_datadir}/%{name} %changelog +* Sat Mar 06 2021 Sandro Mani - 8.0.0-1 +- Update to 8.0.0 + * Wed Jan 27 2021 Fedora Release Engineering - 7.2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/proj_pkgconfig.patch b/proj_pkgconfig.patch deleted file mode 100644 index 6164d5f..0000000 --- a/proj_pkgconfig.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -rupN proj-7.2.0/CMakeLists.txt proj-7.2.0-new/CMakeLists.txt ---- proj-7.2.0/CMakeLists.txt 2020-10-28 12:22:26.000000000 +0100 -+++ proj-7.2.0-new/CMakeLists.txt 2020-11-05 07:27:39.486134481 +0100 -@@ -277,3 +277,18 @@ add_subdirectory(cmake) - if(BUILD_TESTING) - add_subdirectory(test) - endif() -+ -+################################################################################ -+# pkgconfig file -+################################################################################ -+SET(prefix ${CMAKE_INSTALL_PREFIX}) -+SET(exec_prefix ${CMAKE_INSTALL_PREFIX}) -+SET(libdir ${CMAKE_INSTALL_PREFIX}/${LIBDIR}) -+SET(includedir ${CMAKE_INSTALL_PREFIX}/${INCLUDEDIR}) -+SET(datarootdir ${CMAKE_INSTALL_PREFIX}/${DATADIR}) -+SET(VERSION ${PROJ_VERSION}) -+SET(SQLITE3_LIBS ${SQLITE3_LIBRARY}) -+SET(TIFF_LIBS ${TIFF_LIBRARY}) -+SET(CURL_LIBS ${CURL_LIBRARY}) -+CONFIGURE_FILE(proj.pc.in proj.pc @ONLY) -+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/proj.pc DESTINATION ${LIBDIR}/pkgconfig) diff --git a/sources b/sources index eb68bb1..3531ec6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (proj-7.2.1.tar.gz) = 59b9b31b0183e620a2f4a25a08620c170773fe4f99e8eca59e9ed6815f43bb379ea21ef71e8f759dbd747855b982657d7503bac3acc542218e0d862105f25324 -SHA512 (proj-data-1.4.tar.gz) = 9c3fdf2851ef003309ae62348be785abd31c15d15ceb28ea58804852e40e17cd0f5b45cf5ab788343111e12437c1bb446355a71cefc327ff175971b9a69f0e86 +SHA512 (proj-8.0.0.tar.gz) = 4195fd26075787465e578f86398e224957cddba743e2b090b65c877a6bfbc91b3b36d5acf9883bd2fc215a5aebd0b9f3188ee0e0926aa86d37f9753042fb3d75 +SHA512 (proj-data-1.5.tar.gz) = a4ca7adf8e65832a764a2bac72b6881a08977e0a70baf822d362e9aac408eca6481fb675bb0d6a58c140be0cff3b9e38803db84e8b97265ba181c3459b994c94