From 0b350afc860245f8a50d1cb8d2f810e49dafdf39 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Jun 07 2017 10:42:38 +0000 Subject: Update to 1.48 --- diff --git a/.gitignore b/.gitignore index e70d470..ac84bc8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /GeographicLib-1.40.tar.gz /GeographicLib-1.42.tar.gz /GeographicLib-1.43.tar.gz +/GeographicLib-1.48.tar.gz diff --git a/GeographicLib-1.37-python.patch b/GeographicLib-1.37-python.patch deleted file mode 100644 index 994463e..0000000 --- a/GeographicLib-1.37-python.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -up ./python/geographiclib/CMakeLists.txt.python ./python/geographiclib/CMakeLists.txt ---- ./python/geographiclib/CMakeLists.txt.python 2014-09-28 12:52:48.954838299 -0400 -+++ ./python/geographiclib/CMakeLists.txt 2014-09-28 12:55:11.089220128 -0400 -@@ -1,9 +1,14 @@ - # Install the python files. - # Probably full-time python users should install the python package from - # http://pypi.python.org/pypi/geographiclib -+find_package(PythonInterp) -+if (PYTHONINTERP_FOUND) -+ set(PYTHON_VERSION "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") -+endif(PYTHONINTERP_FOUND) -+ - file (GLOB PYTHON_FILES [A-Za-z_]*.py) - if (COMMON_INSTALL_PATH) -- set (INSTALL_PYTHON_DIR "lib${LIB_SUFFIX}/python/site-packages") -+ set (INSTALL_PYTHON_DIR "lib/python${PYTHON_VERSION}/site-packages") - else () - set (INSTALL_PYTHON_DIR "python") - endif () -diff -up ./python/Makefile.am.python ./python/Makefile.am ---- ./python/Makefile.am.python 2014-08-08 10:05:10.000000000 -0400 -+++ ./python/Makefile.am 2014-09-28 12:52:05.356187444 -0400 -@@ -14,7 +14,7 @@ PYTHON_FILES = \ - $(srcdir)/$(PACKAGE)/geodesicline.py \ - $(srcdir)/$(PACKAGE)/polygonarea.py - --pythondir=$(libdir)/python/site-packages/$(PACKAGE) -+pythondir=$(libdir)/python2.7/site-packages/$(PACKAGE) - - install: - $(INSTALL) -d $(DESTDIR)$(pythondir) diff --git a/GeographicLib-1.42-octave.patch b/GeographicLib-1.42-octave.patch deleted file mode 100644 index b1739ee..0000000 --- a/GeographicLib-1.42-octave.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -up ./matlab/CMakeLists.txt.octave ./matlab/CMakeLists.txt ---- ./matlab/CMakeLists.txt.octave 2015-04-28 00:07:14.000000000 -0400 -+++ ./matlab/CMakeLists.txt 2015-05-17 11:22:21.355846289 -0400 -@@ -1,18 +1,25 @@ -+option(INSTALL_LEGACY_MATLAB "Install deprecated legacy MATLAB routines" FALSE) - # Install matlab files. - if (COMMON_INSTALL_PATH) - # More Octave friendly would be "share/octave/site/m" -- set (INSTALL_MATLAB_DIR "share/matlab") -+ set (INSTALL_MATLAB_DIR "share/octave/packages") - else () - set (INSTALL_MATLAB_DIR "matlab") - endif () - file (GLOB MATLAB_FILES geographiclib/[A-Za-z]*.m) --install (FILES ${MATLAB_FILES} DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib) -+install (FILES ${MATLAB_FILES} DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-${PROJECT_VERSION}) -+install (FILES geographiclib/packinfo/DESCRIPTION DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-${PROJECT_VERSION}/packinfo) - # Install "private" functions - file (GLOB PRIVATE_MATLAB_FILES geographiclib/private/[A-Za-z]*.m) - install (FILES ${PRIVATE_MATLAB_FILES} -- DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib/private) -+ DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-${PROJECT_VERSION}/private) -+install (FILES ${PROJECT_SOURCE_DIR}/LICENSE.txt -+ DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-${PROJECT_VERSION}/packinfo -+ RENAME "COPYING") - # Install "legacy" functions --file (GLOB LEGACY_FILES -- geographiclib-legacy/[A-Za-z]*.m geographiclib-legacy/[A-Za-z]*.cpp) --install (FILES ${LEGACY_FILES} -- DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-legacy) -+if (INSTALL_LEGACY_MATLAB) -+ file (GLOB LEGACY_FILES -+ geographiclib-legacy/[A-Za-z]*.m geographiclib-legacy/[A-Za-z]*.cpp) -+ install (FILES ${LEGACY_FILES} -+ DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-legacy-${PROJECT_VERSION}) -+endif() -diff -up ./matlab/geographiclib/packinfo/DESCRIPTION.octave ./matlab/geographiclib/packinfo/DESCRIPTION ---- ./matlab/geographiclib/packinfo/DESCRIPTION.octave 2015-05-17 11:17:23.793165688 -0400 -+++ ./matlab/geographiclib/packinfo/DESCRIPTION 2015-05-17 11:17:23.793165688 -0400 -@@ -0,0 +1,15 @@ -+Name: geographiclib -+Version: 1.43 -+Date: 2015-05-22 -+Author: Charles Karney -+Maintainer: Rich Mattes -+Title: Octave implemtation of GeographicLib -+Description: This toolbox provides native MATLAB implementations of a subset of the -+ C++ library, GeographicLib. Key components of this toolbox are -+ * Geodesics, direct, inverse, area calculations. -+ * Projections, transverse Mercator, polar stereographic, etc. -+ * Grid systems, UTM, UPS, MGRS. -+ * Geoid lookup, egm84, egm96, egm2008 geoids supported. -+ * Geometric transformations, geocentric, local cartesian. -+ * Great ellipse, direct, inverse, area calculations. -+Url: http://geographiclib.sf.net/html diff --git a/GeographicLib-1.48-nodejs.patch b/GeographicLib-1.48-nodejs.patch new file mode 100644 index 0000000..bfc98b6 --- /dev/null +++ b/GeographicLib-1.48-nodejs.patch @@ -0,0 +1,12 @@ +diff -rupN GeographicLib-1.48/js/CMakeLists.txt GeographicLib-1.48-new/js/CMakeLists.txt +--- GeographicLib-1.48/js/CMakeLists.txt 2017-04-09 14:48:27.000000000 +0200 ++++ GeographicLib-1.48-new/js/CMakeLists.txt 2017-06-05 15:57:33.604684493 +0200 +@@ -122,7 +122,7 @@ file (COPY ${JSSCRIPTS} DESTINATION geog + file (COPY test/geodesictest.js DESTINATION geographiclib/test) + + if (COMMON_INSTALL_PATH) +- set (INSTALL_JS_DIR "lib${LIB_SUFFIX}/node_modules/geographiclib") ++ set (INSTALL_JS_DIR "lib/node_modules/geographiclib") + else () + set (INSTALL_JS_DIR "node_modules/geographiclib") + endif () diff --git a/GeographicLib-1.48-octave.patch b/GeographicLib-1.48-octave.patch new file mode 100644 index 0000000..c7a47db --- /dev/null +++ b/GeographicLib-1.48-octave.patch @@ -0,0 +1,53 @@ +diff -rupN GeographicLib-1.48/matlab/CMakeLists.txt GeographicLib-1.48-new/matlab/CMakeLists.txt +--- GeographicLib-1.48/matlab/CMakeLists.txt 2017-04-09 14:48:27.000000000 +0200 ++++ GeographicLib-1.48-new/matlab/CMakeLists.txt 2017-06-05 15:34:30.499785438 +0200 +@@ -1,17 +1,24 @@ ++option(INSTALL_LEGACY_MATLAB "Install deprecated legacy MATLAB routines" FALSE) + # Install matlab files. + if (COMMON_INSTALL_PATH) + # More Octave friendly would be "share/octave/site/m" +- set (INSTALL_MATLAB_DIR "share/matlab") ++ set (INSTALL_MATLAB_DIR "share/octave/packages") + else () + set (INSTALL_MATLAB_DIR "matlab") + endif () + file (GLOB MATLAB_FILES geographiclib/[A-Za-z]*.m) +-install (FILES ${MATLAB_FILES} DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib) ++install (FILES ${MATLAB_FILES} DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-${PROJECT_VERSION}) ++install (FILES geographiclib/packinfo/DESCRIPTION DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-${PROJECT_VERSION}/packinfo) + # Install "private" functions + file (GLOB PRIVATE_MATLAB_FILES geographiclib/private/[A-Za-z]*.m) + install (FILES ${PRIVATE_MATLAB_FILES} +- DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib/private) ++ DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-${PROJECT_VERSION}/private) ++install (FILES ${PROJECT_SOURCE_DIR}/LICENSE.txt ++ DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-${PROJECT_VERSION}/packinfo ++ RENAME "COPYING") + # Install "legacy" functions +-file (GLOB LEGACY_FILES geographiclib-legacy/[A-Za-z]*.m) +-install (FILES ${LEGACY_FILES} +- DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-legacy) ++if (INSTALL_LEGACY_MATLAB) ++ file (GLOB LEGACY_FILES geographiclib-legacy/[A-Za-z]*.m) ++ install (FILES ${LEGACY_FILES} ++ DESTINATION ${INSTALL_MATLAB_DIR}/geographiclib-legacy-${PROJECT_VERSION}) ++endif() +diff -rupN GeographicLib-1.48/matlab/geographiclib/packinfo/DESCRIPTION GeographicLib-1.48-new/matlab/geographiclib/packinfo/DESCRIPTION +--- GeographicLib-1.48/matlab/geographiclib/packinfo/DESCRIPTION 1970-01-01 01:00:00.000000000 +0100 ++++ GeographicLib-1.48-new/matlab/geographiclib/packinfo/DESCRIPTION 2017-06-05 15:33:44.484860569 +0200 +@@ -0,0 +1,15 @@ ++Name: geographiclib ++Version: 1.43 ++Date: 2015-05-22 ++Author: Charles Karney ++Maintainer: Rich Mattes ++Title: Octave implemtation of GeographicLib ++Description: This toolbox provides native MATLAB implementations of a subset of the ++ C++ library, GeographicLib. Key components of this toolbox are ++ * Geodesics, direct, inverse, area calculations. ++ * Projections, transverse Mercator, polar stereographic, etc. ++ * Grid systems, UTM, UPS, MGRS. ++ * Geoid lookup, egm84, egm96, egm2008 geoids supported. ++ * Geometric transformations, geocentric, local cartesian. ++ * Great ellipse, direct, inverse, area calculations. ++Url: http://geographiclib.sf.net/html diff --git a/GeographicLib-1.48-python.patch b/GeographicLib-1.48-python.patch new file mode 100644 index 0000000..2fca2cf --- /dev/null +++ b/GeographicLib-1.48-python.patch @@ -0,0 +1,20 @@ +diff -rupN GeographicLib-1.48/python/geographiclib/CMakeLists.txt GeographicLib-1.48-new/python/geographiclib/CMakeLists.txt +--- GeographicLib-1.48/python/geographiclib/CMakeLists.txt 2017-04-09 14:48:27.000000000 +0200 ++++ GeographicLib-1.48-new/python/geographiclib/CMakeLists.txt 2017-06-05 15:27:26.339513162 +0200 +@@ -1,10 +1,15 @@ + # Install the python files. + # Probably full-time python users should install the python package from + # http://pypi.python.org/pypi/geographiclib ++find_package(PythonInterp) ++if (PYTHONINTERP_FOUND) ++ set(PYTHON_VERSION "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") ++endif(PYTHONINTERP_FOUND) ++ + file (GLOB PYTHON_FILES [A-Za-z_]*.py) + file (GLOB TEST_FILES test/[A-Za-z_]*.py) + if (COMMON_INSTALL_PATH) +- set (INSTALL_PYTHON_DIR "lib${LIB_SUFFIX}/python/site-packages") ++ set (INSTALL_PYTHON_DIR "lib/python${PYTHON_VERSION}/site-packages") + else () + set (INSTALL_PYTHON_DIR "python") + endif () diff --git a/GeographicLib-1.48-test.patch b/GeographicLib-1.48-test.patch new file mode 100644 index 0000000..4e4f59c --- /dev/null +++ b/GeographicLib-1.48-test.patch @@ -0,0 +1,12 @@ +diff -rupN GeographicLib-1.48/tools/tests.cmake GeographicLib-1.48-new/tools/tests.cmake +--- GeographicLib-1.48/tools/tests.cmake 2017-04-09 14:48:27.000000000 +0200 ++++ GeographicLib-1.48-new/tools/tests.cmake 2017-06-07 09:54:07.073783959 +0200 +@@ -357,7 +357,7 @@ add_test (NAME GeodSolve66 COMMAND GeodS + -I 30 -0.000000000000000001 -31 180 -f -u -p 0 --input-string "1e7;2e7" -E) + set_tests_properties (GeodSolve65 GeodSolve66 + PROPERTIES PASS_REGULAR_EXPRESSION +- "30\\.00000 -0\\.00000 -?180\\.00000 -60\\.23169 -0\\.00000 -?180\\.00000 10000000 90\\.06544 6363636 -0\\.0012834 0\\.0013749 0[\r\n]+30\\.00000 -0\\.00000 -?180\\.00000 -30\\.03547 -180\\.00000 -0\\.00000 20000000 179\\.96459 54342 -1\\.0045592 -0\\.9954339 127516405431022") ++ "30\\.00000 -0\\.00000 -?180\\.00000 -60\\.23169 -?0\\.00000 -?180\\.00000 10000000 90\\.06544 6363636 -0\\.0012834 0\\.0013749 0[\r\n]+30\\.00000 -0\\.00000 -?180\\.00000 -30\\.03547 -180\\.00000 -0\\.00000 20000000 179\\.96459 54342 -1\\.0045592 -0\\.9954339 127516405431022") + + # Check for InverseLine if line is slightly west of S and that s13 is + # correctly set. diff --git a/GeographicLib.spec b/GeographicLib.spec index a76431b..fbdb39a 100644 --- a/GeographicLib.spec +++ b/GeographicLib.spec @@ -1,21 +1,41 @@ +#global commit 2a6ccdf99f9b580aff4ef4725720172235fa9da0 +#global shortcommit %(c=%{commit}; echo ${c:0:7}) + +%if 0%{?commit:1} +%global source_folder geographiclib-code-%{commit} +%else +%global source_folder %{name}-%{version} +%endif + Name: GeographicLib -Version: 1.43 -Release: 9%{?dist} +Version: 1.48 +Release: 1%{?commit:.git%{shortcommit}}%{?dist} Summary: Library for geographic coordinate transformations License: MIT URL: http://geographiclib.sourceforge.net/ +%if 0%{?commit:1} +Source0: https://sourceforge.net/code-snapshots/git/g/ge/geographiclib/code.git/geographiclib-code-%{commit}.zip +%else Source0: http://downloads.sourceforge.net/geographiclib/%{name}-%{version}.tar.gz +%endif # Use PythonInterp to set the python version for installation directory, # and install python lib to arch-independent path # Not yet submitted upstream -Patch0: %{name}-1.37-python.patch -# Bundle MATLAB scripts into octave patckages +Patch0: %{name}-1.48-python.patch +# Bundle MATLAB scripts into octave packages # Not yet submitted upstream -Patch1: %{name}-1.42-octave.patch +Patch1: %{name}-1.48-octave.patch +# Install nodejs files to arch-independent path +Patch2: %{name}-1.48-nodejs.patch +# Fix test failure on i686 +Patch3: %{name}-1.48-test.patch BuildRequires: cmake BuildRequires: doxygen +BuildRequires: gcc-c++ +BuildRequires: nodejs-packaging +BuildRequires: octave-devel BuildRequires: python2-devel BuildRequires: python3-devel @@ -31,41 +51,48 @@ developed for this library. The functionality of the library can be accessed from user code, from the Utility programs provided, or via the Implementations in other languages. + %package devel -Summary: Development files and libraries for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: Development files and libraries for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: cmake %description devel This package contains the header files and libraries for %{name}. If you like to develop programs using %{name}, you will need to install %{name}-devel. + %package doc -Summary: Development documentation for %name -BuildArch: noarch +Summary: Development documentation for %name +BuildArch: noarch %description doc This package contains doxygen-generated html API documentation for the %{name} library. -%package -n python-%{name} -Summary: Python 2 implementation of %{name} -BuildArch: noarch -%description -n python-%{name} +%package -n python2-%{name} +Summary: Python 2 implementation of %{name} +BuildArch: noarch +%{?python_provide:%python_provide python2-%{name}} + +%description -n python2-%{name} A translation of the GeographicLib::Geodesic class to Python 2 + %package -n python3-%{name} -Summary: Python 3 implementation of %{name} -BuildArch: noarch +Summary: Python 3 implementation of %{name} +BuildArch: noarch +%{?python_provide:%python_provide python3-%{name}} %description -n python3-%{name} A translation of the GeographicLib::Geodesic class to Python 3 + %package -n octave-%{name} -Summary: Octave implementation of %{name} -BuildArch: noarch -BuildRequires: octave-devel +Summary: Octave implementation of %{name} +BuildArch: noarch Requires: octave >= 3.4 Requires(post): octave Requires(postun): octave @@ -73,10 +100,19 @@ Requires(postun): octave %description -n octave-%{name} A translation of some of the GeographicLib C++ functionality to Octave + +%package -n nodejs-%{name} +Summary: NodeJS implementation of %{name} +BuildArch: noarch +Requires: nodejs + +%description -n nodejs-%{name} +A translation of some of the GeographicLib C++ functionality to NodeJS + + %prep -%setup -q -%patch0 -p0 -b .python -%patch1 -p0 -b .octave +%autosetup -p1 -n %{source_folder} + %build mkdir build; pushd build; @@ -86,8 +122,8 @@ mkdir build; pushd build; -DGEOGRAPHICLIB_DOCUMENTATION=ON \ -DUSE_RPATH=OFF \ -DCMAKE_SKIP_INSTALL_RPATH=ON +%make_build popd -make -C build %{?_smp_mflags} mkdir build_python3; pushd build_python3; %cmake .. \ @@ -97,21 +133,23 @@ mkdir build_python3; pushd build_python3; -DUSE_RPATH=OFF \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DPython_ADDITIONAL_VERSIONS=3 +%make_build popd + %install %make_install -C build %make_install -C build_python3/python/geographiclib -rm -f %{buildroot}/%{_libdir}/*.la -rm -f %{buildroot}/%{_libdir}/*.a rm -rf %{buildroot}/%{_datadir}/doc rm -rf %{buildroot}/%{_libexecdir} mkdir -p %{buildroot}%{_datadir}/%{name} + %check make -C build test + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -127,34 +165,58 @@ make -C build test %files -%doc AUTHORS LICENSE.txt NEWS +%doc AUTHORS NEWS +%license LICENSE.txt +%{_bindir}/CartConvert +%{_bindir}/ConicProj +%{_bindir}/GeoConvert +%{_bindir}/GeodSolve +%{_bindir}/GeodesicProj +%{_bindir}/GeoidEval +%{_bindir}/Gravity +%{_bindir}/MagneticField +%{_bindir}/Planimeter +%{_bindir}/RhumbSolve +%{_bindir}/TransverseMercatorProj +%{_sbindir}/geographiclib-get-geoids +%{_sbindir}/geographiclib-get-gravity +%{_sbindir}/geographiclib-get-magnetic +%{_libdir}/libGeographic.so.17* %{_datadir}/%{name} -%{_bindir}/* -%{_sbindir}/* -%{_libdir}/*.so.* %{_mandir}/man1/*.1.* %{_mandir}/man8/*.8.* %files devel -%{_includedir}/%{name} -%{_libdir}/*.so -%{_libdir}/cmake +%{_includedir}/%{name}/ +%{_libdir}/libGeographic.so +%{_libdir}/cmake/GeographicLib +%{_libdir}/pkgconfig/geographiclib.pc %files doc -%doc LICENSE.txt build/doc/html +%license LICENSE.txt +%doc build/doc/html -%files -n python-%{name} -%doc LICENSE.txt -%{python2_sitelib}/geographiclib +%files -n python2-%{name} +%license LICENSE.txt +%{python2_sitelib}/geographiclib/ %files -n python3-%{name} -%doc LICENSE.txt -%{python3_sitelib}/geographiclib +%license LICENSE.txt +%{python3_sitelib}/geographiclib/ %files -n octave-%{name} -%{_datadir}/octave/packages/* +%license LICENSE.txt +%{_datadir}/octave/packages/geographiclib-%{version}/ + +%files -n nodejs-%{name} +%license LICENSE.txt +%{nodejs_sitelib}/geographiclib/ + %changelog +* Wed Jun 07 2017 Sandro Mani - 1.48-1 +- Update to 1.48 + * Fri Feb 10 2017 Fedora Release Engineering - 1.43-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index 6d93b34..4dea323 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -189f39515deab72ff006a337c3d06b48 GeographicLib-1.43.tar.gz +SHA512 (GeographicLib-1.48.tar.gz) = e5a6d7afb2c11e0eff6b94b4b74e5e937529a3a553b013870089bf208cab300ad70c3dff34e18551a1373c54836f01b296b5dbcf298fe26b211c3eaa59c59129