From c27585014a383ba72de20a423628a87c812741da Mon Sep 17 00:00:00 2001 From: Balint Cristian Date: Thu, 27 Mar 2008 19:55:09 +0000 Subject: [PATCH] - enable EPSG dataset to be packed GRASS really needs it - no more license issue over epsg dataset, proj didnt altered EPSG dataset in any way, so its fully EPSG license compliant - add support for tests during buildtime - disable hardcoded r-path from libs - fix shebag for nad scripts --- pj_gridinfo.patch | 19 ----------------- proj.spec | 46 ++++++++++++++++++++++++++++++++++++++++- proj.test_scripts.patch | 36 -------------------------------- 3 files changed, 45 insertions(+), 56 deletions(-) delete mode 100644 pj_gridinfo.patch delete mode 100644 proj.test_scripts.patch diff --git a/pj_gridinfo.patch b/pj_gridinfo.patch deleted file mode 100644 index e9379ea..0000000 --- a/pj_gridinfo.patch +++ /dev/null @@ -1,19 +0,0 @@ -*** src/pj_gridinfo.c 2004-10-29 21:03:03.000000000 -0700 ---- src/pj_gridinfo.c.new 2005-07-07 21:48:25.000000000 -0700 -*************** -*** 490,496 **** - { - if( getenv("PROJ_DEBUG") != NULL ) - fprintf( stderr, "pj_gridinfo_init_ntv2(): " -! "failed to find parent %8.8s for %.\n", - (const char *) header+24, gi->ct->id ); - - for( lnk = gp; lnk->next != NULL; lnk = lnk->next ) {} ---- 490,496 ---- - { - if( getenv("PROJ_DEBUG") != NULL ) - fprintf( stderr, "pj_gridinfo_init_ntv2(): " -! "failed to find parent %8.8s for %s\n", - (const char *) header+24, gi->ct->id ); - - for( lnk = gp; lnk->next != NULL; lnk = lnk->next ) {} diff --git a/proj.spec b/proj.spec index 4e73c3a..8e68658 100644 --- a/proj.spec +++ b/proj.spec @@ -1,6 +1,6 @@ Name: proj Version: 4.5.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Cartographic projection software (PROJ.4) Group: Applications/Engineering @@ -22,6 +22,11 @@ Summary: US and Canadian datum shift grids for PROJ.4 Group: Applications/Engineering Requires: %{name} = %{version}-%{release} +%package epsg +Summary: EPSG dataset for PROJ.4 +Group: Applications/Engineering +Requires: %{name} = %{version}-%{release} + %description Proj and invproj perform respective forward and inverse transformation of cartographic data to or from cartesian data with a wide range of selectable @@ -33,6 +38,9 @@ This package contains libproj and the appropriate header files and man pages. %description nad This package contains additional US and Canadian datum shift grids. +%description epsg +This package contains additional EPSG dataset. + %prep %setup -q @@ -41,10 +49,19 @@ cp %{SOURCE2} ./ %patch0 -p0 -b .buildroot cp proj.copyright COPYING +# disable internal libtool to avoid hardcoded r-path +for makefile in `find . -type f -name 'Makefile.in'`; do +sed -i 's|@LIBTOOL@|%{_bindir}/libtool|g' $makefile +done + # Prepare nad cd nad unzip %{SOURCE1} cd .. +# fix shebag header of scripts +for script in `find nad/ -type f -perm -a+x`; do +sed -i -e '1,1s|:|#!/bin/bash|' $script +done %build %configure @@ -55,6 +72,19 @@ rm -rf $RPM_BUILD_ROOT %makeinstall install -p -m 0644 nad/pj_out27.dist nad/pj_out83.dist nad/td_out.dist $RPM_BUILD_ROOT%{_datadir}/%{name} install -p -m 0755 nad/test27 nad/test83 nad/testvarious $RPM_BUILD_ROOT%{_datadir}/%{name} +install -p -m 0644 nad/epsg $RPM_BUILD_ROOT%{_datadir}/%{name} + +%check +pushd nad +# set test enviroment for porj +export PROJ_LIB=$RPM_BUILD_ROOT%{_datadir}/%{name} +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH%{buildroot}%{_libdir} +# run tests for proj +./test27 $RPM_BUILD_ROOT%{_bindir}/%{name} || exit 0 +./test83 $RPM_BUILD_ROOT%{_bindir}/%{name} || exit 0 +./testntv2 $RPM_BUILD_ROOT%{_bindir}/%{name} || exit 0 +./testvarious $RPM_BUILD_ROOT%{_bindir}/%{name} || exit 0 +popd %clean rm -rf $RPM_BUILD_ROOT @@ -83,9 +113,23 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{_datadir}/%{name}/test27 %attr(0755,root,root) %{_datadir}/%{name}/test83 %attr(0755,root,root) %{_datadir}/%{name}/testvarious +%exclude %{_datadir}/%{name}/epsg %{_datadir}/%{name} +%files epsg +%doc nad/README +%defattr(-,root,root,-) +%attr(0644,root,root) %{_datadir}/%{name}/epsg + %changelog +* Thu Mar 27 2008 Balint Cristian - 4.5.0-3 +- enable EPSG dataset to be packed GRASS really needs it +- no more license issue over epsg dataset, proj didnt altered + EPSG dataset in any way, so its fully EPSG license compliant +- add support for tests during buildtime +- disable hardcoded r-path from libs +- fix shebag for nad scripts + * Tue Feb 19 2008 Fedora Release Engineering - 4.5.0-2 - Autorebuild for GCC 4.3 diff --git a/proj.test_scripts.patch b/proj.test_scripts.patch deleted file mode 100644 index ec8d865..0000000 --- a/proj.test_scripts.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -Naur proj-4.4.8.orig/nad/test27 proj-4.4.8/nad/test27 ---- proj-4.4.8.orig/nad/test27 2004-12-29 13:00:31.428068481 -0800 -+++ proj-4.4.8/nad/test27 2004-12-29 13:00:55.742384745 -0800 -@@ -8,7 +8,7 @@ - # Mercator due to greater precision of meridinal distance function. - # - OUT=proj_out27 --EXE=../src/proj -+EXE=proj - INIT_FILE=./nad27 - # - echo "doing tests into file ${OUT}, please wait" -diff -Naur proj-4.4.8.orig/nad/test83 proj-4.4.8/nad/test83 ---- proj-4.4.8.orig/nad/test83 2004-12-29 13:00:31.421069541 -0800 -+++ proj-4.4.8/nad/test83 2004-12-29 13:01:04.976985631 -0800 -@@ -8,7 +8,7 @@ - # Mercator due to greater precision of meridinal distance function. - # - OUT=proj_out83 --EXE=../src/proj -+EXE=proj - INIT_FILE=./nad83 - # - echo "doing tests into file ${OUT}, please wait" -diff -Naur proj-4.4.8.orig/nad/testvarious proj-4.4.8/nad/testvarious ---- proj-4.4.8.orig/nad/testvarious 2004-12-29 13:00:31.420069693 -0800 -+++ proj-4.4.8/nad/testvarious 2004-12-29 13:35:39.314658254 -0800 -@@ -3,7 +3,7 @@ - # - # - OUT=td_out --EXE=../src/cs2cs -+EXE=cs2cs - # - echo "doing tests into file ${OUT}, please wait" - rm -f ${OUT}