rpms/mapnik/F-9 gcc43-warnings.patch, NONE, 1.1 import.log, NONE, 1.1 mapnik-data.license, NONE, 1.1 mapnik.spec, NONE, 1.1 no_date_footer.html, NONE, 1.1 use-system-fonts.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Balint Cristian rezso at fedoraproject.org
Mon Aug 25 16:03:38 UTC 2008


Author: rezso

Update of /cvs/pkgs/rpms/mapnik/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1920/F-9

Modified Files:
	.cvsignore sources 
Added Files:
	gcc43-warnings.patch import.log mapnik-data.license 
	mapnik.spec no_date_footer.html use-system-fonts.patch 
Log Message:
- initial import


gcc43-warnings.patch:

--- NEW FILE gcc43-warnings.patch ---
--- include/mapnik/color.hpp.orig	2008-03-24 12:08:59.000000000 +0000
+++ include/mapnik/color.hpp	2008-03-24 13:24:39.000000000 +0000
@@ -40,10 +40,10 @@
             :abgr_(0xffffffff) {}
 
         Color(int red,int green,int blue,int alpha=0xff)
-            : abgr_((alpha&0xff) << 24 | 
-                    (blue&0xff) << 16  | 
-                    (green&0xff) << 8  | 
-                    red&0xff) {}
+	    : abgr_(((alpha&0xff) << 24 | 
+		     (blue&0xff)) << 16 | 
+		     ((green&0xff) << 8 | 
+		     (red&0xff))) {}
         
         explicit Color(int rgba)
             : abgr_(rgba) {}
@@ -88,7 +88,7 @@
         }
         inline void set_alpha(unsigned int a)
         {
-            abgr_ = (abgr_ & 0x00ffffff | (a&0xff) << 24);
+	    abgr_ = (abgr_ & 0x00ffffff) | ((a&0xff) << 24);
         }
 
         inline unsigned int rgba() const
--- src/wkb.cpp.orig	2008-03-24 13:49:09.000000000 +0000
+++ src/wkb.cpp	2008-03-24 13:57:41.000000000 +0000
@@ -145,7 +145,10 @@
             else 
             {
                const char* b=wkb_+pos_;
-               n = b[3]&0xff | (b[2]&0xff)<<8 | (b[1]&0xff)<<16 | (b[0]&0xff)<<24;
+               n = (((b[3]&0xff) | 
+		     (b[2]&0xff)) << 8 | 
+		    ((b[1]&0xff) << 16 | 
+		     (b[0]&0xff)) << 24);
             }
             pos_+=4;
 
@@ -166,14 +169,14 @@
                // but not in C++ yet
                // this is not quite portable
                const char* b= wkb_+pos_;
-               long long n = (long long)b[7]&0xff | 
-                  ((long long)b[6]&0xff)<<8 | 
-                  ((long long)b[5]&0xff)<<16 | 
-                  ((long long)b[4]&0xff)<<24 |
-                  ((long long)b[3]&0xff)<<32 |
-                  ((long long)b[2]&0xff)<<40 |
-                  ((long long)b[1]&0xff)<<48 |
-                  ((long long)b[0]&0xff)<<56;
+               long long n = (((long long)b[7]&0xff) | 
+			      ((long long)b[6]&0xff)<<8 | 
+			      ((long long)b[5]&0xff)<<16 | 
+			      ((long long)b[4]&0xff)<<24 |
+			      ((long long)b[3]&0xff)<<32 |
+			      ((long long)b[2]&0xff)<<40 |
+			      ((long long)b[1]&0xff)<<48 |
+			      ((long long)b[0]&0xff)<<56);
                memcpy(&d,&n,8);
             }
             pos_+=8;
--- tinyxml/tinyxmlparser.cpp.orig	2008-03-24 13:59:50.000000000 +0000
+++ tinyxml/tinyxmlparser.cpp	2008-03-24 14:07:38.000000000 +0000
@@ -354,7 +354,7 @@
 	}
 	else
 	{
-		while ( *p && IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' )
+	  while ((*p && IsWhiteSpace( *p )) || *p == '\n' || *p =='\r' )
 			++p;
 	}
 
--- plugins/input/shape/shapefile.hpp.orig	2008-03-24 14:11:09.000000000 +0000
+++ plugins/input/shape/shapefile.hpp	2008-03-24 14:14:43.000000000 +0000
@@ -122,16 +122,20 @@
       {
          char b[4];
          file_.read(b, 4);
-         return b[3] & 0xffu | (b[2] & 0xffu) << 8 |
-            (b[1] & 0xffu) << 16 | (b[0] & 0xffu) << 24;
+         return (((b[3] & 0xffu) | 
+		  (b[2] & 0xffu)) << 8 |
+		 ((b[1] & 0xffu) << 16 | 
+		  (b[0] & 0xffu)) << 24);
       }
       
       inline int read_ndr_integer()
       {
          char b[4];
          file_.read(b,4);
-         return b[0]&0xffu | (b[1]&0xffu) << 8 | 
-            (b[2]&0xffu) << 16 | (b[3]&0xffu) << 24;
+         return (((b[0]&0xffu) | 
+		  (b[1]&0xffu)) << 8 | 
+		 ((b[2]&0xffu) << 16 | 
+		  (b[3]&0xffu)) << 24);
       }
       
       inline double read_double()
--- plugins/input/shape/dbffile.hpp.orig	2008-03-24 14:36:28.000000000 +0000
+++ plugins/input/shape/dbffile.hpp	2008-03-24 14:36:46.000000000 +0000
@@ -36,7 +36,6 @@
 
 using mapnik::transcoder;
 using mapnik::Feature;
-class mapnik::transcoder;
 
 struct field_descriptor
 {


--- NEW FILE import.log ---
mapnik-0_5_1-4_fc9:F-9:mapnik-0.5.1-4.fc9.src.rpm:1219679751


--- NEW FILE mapnik-data.license ---
This is a copy from: http://geogratis.cgdi.gc.ca/geogratis/en/licence.jsp
-------------------------------------------------------------------------

GEOGRATIS LICENCE AGREEMENT FOR UNRESTRICTED USE OF DIGITAL DATA

This is a legal agreement between you ("Licensee") and Her Majesty the Queen in Right of Canada ("Canada"), as represented by the Minister of Natural Resources Canada. BY ACCESSING, DOWNLOADING, PRINTING OR USING THE DATA, INFORMATION AND MATERIALS BEING PROVIDED WITH, OR ACCESSIBLE PURSUANT TO THIS AGREEMENT, YOU ARE AGREEING TO BE BOUND BY THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, YOU MUST IMMEDIATELY DISPOSE OF ANY SUCH DATA, INFORMATION, MATERIALS AND ANY DERIVED PRODUCTS.

   1.

      WHEREAS Canada is the owner of the data (the "Data") accessible pursuant to the terms and conditions of this Agreement;
   2.

      AND WHEREAS the Licensee wishes to obtain certain rights to the Data, on terms and conditions herein contained;
   3.

      AND WHEREAS Canada represents that it has full authority to grant the rights desired by the Licensee on the terms and conditions herein contained;
   4.

      AND WHEREAS the parties hereto are desirous of entering into a licence agreement on the basis herein set forth.

NOW, THEREFORE, in consideration of the covenants contained in this Agreement, the parties agree as follows:
1.0 DEFINITIONS

   1.

      "Canada's Data" means any and all Data, the Intellectual Property Rights of which vest with Canada.
   2.

      "Data" means any digital data, meta-data, or documentation subject to the terms and conditions of this Agreement.
   3.

      "Derivative Products" means any product, system, sub-system, device, component, material or software that incorporates or uses any part of the Data.
   4.

      "Intellectual Property Rights" means any intellectual property right recognised by law, including any intellectual property right protected through legislation, such as that governing, but not limited to, copyright and patents.

2.0 LICENCE GRANT

   1.

      Subject to this Agreement, Canada hereby grants to the Licensee a non-exclusive, fully paid, royalty-free right and licence to exercise all Intellectual Property Rights in the Data. This includes the right to use, incorporate, sublicense (with further right of sublicensing), modify, improve, further develop, and distribute the Data; and to manufacture and / or distribute Derivative Products.
   2.

      The Intellectual Property Rights arising from any modification, improvement, development or translation of the Data, or from the manufacture of Derivative Products, effected by or for the Licensee, shall vest in the Licensee or in such person as the Licensee shall decide.

3.0 PROTECTION AND ACKNOWLEDGEMENT OF SOURCE

   1.

      Use of the Data shall not be construed as an endorsement by Canada of any Derivative Products. The Licensee shall identify the source of the Data, in the following manner, where any of the Data are redistributed, or contained within Derivative Products:

      "© Department of Natural Resources Canada. All rights reserved."

4.0 WARRANTY, LIABILITY, INDEMNITY

   1.

      Canada makes no representation or warranty of any kind with respect to the accuracy, usefulness, novelty, validity, scope, completeness or currency of the Data and expressly disclaims any implied warranty of merchantability or fitness for a particular purpose of the Data. Canada does not ensure or warrant compatibility with past, current or future versions of any browser to access the site's Data.
   2.

      The Licensee shall have no recourse against Canada, whether by way of any suit or action, for any loss, liability, damage or cost that the Licensee may suffer or incur at any time, by reason of the Licensee's possession or use of the Data.
   3.

      The Licensee shall indemnify Canada and its officers, employees, agents and contractors from all claims alleging loss, costs, expenses, damages or injuries (including injuries resulting in death) arising out of the Licensee's possession or use of the Data.
   4.

      The Licensee shall license all persons or parties who obtain Data or Derivative Products from the Licensee the right to use the Data or Derivative Products by way of a license agreement, and that agreement shall impose upon these persons or parties the same terms and conditions as those contained in section 4.0 of this Agreement.
   5.

      4.4 The Licensee's liability to indemnify Canada under this Agreement shall not affect or prejudice Canada from exercising any other rights under law.

5.0 TERM

   1.

      This Agreement is effective as of the date and time of acceptance (Eastern Time) and shall remain in effect for a period of one (1) year, subject to subsection 5.2 and section 6.0 below.
   2.

      At the end of the first term, this Agreement shall automatically be extended for successive one (1) year terms, subject to section 6.0 below.

6.0 TERMINATION

   1.

      Notwithstanding section 5.0, this Agreement shall terminate:
         1. automatically and without notice, if the Licensee commits or permits a breach of any of its covenants or obligations under this Agreement;
         2. upon written notice of termination by the Licensee at any time, and such termination shall take effect thirty (30) days after the receipt by Canada of such notice; or
         3. upon mutual agreement of the parties.

   2.

      Upon the termination for whatever reason of this Agreement, the Licensee's obligations under section 4.0 shall survive; and the Licensee's rights under section 2.0 shall immediately cease.
   3.

      Upon the termination for whatever reason of this Agreement, the Licensee shall delete or destroy all Data acquired under this Agreement immediately or within a reasonable timeframe where the Data is required to complete orders of Derivative Products made before the termination date of this Agreement.

7.0 GENERAL

   1.

      Applicable Law
      This Agreement shall be construed and enforced in accordance with, and the rights of the parties shall be governed by, the laws of Ontario and Canada as applicable. The parties hereto attorn to the jurisdiction of the Superior Court of the Province of Ontario.
   2.

      Entire Agreement
      This Agreement constitutes the entire agreement between the parties with respect to its subject matter. This Agreement may only be amended in writing, signed by both parties, which expressly states the intention to amend this Agreement.
   3.

      Dispute Resolution
      If a dispute arises concerning this Agreement, the parties shall attempt to resolve the matter by negotiation.




--- NEW FILE mapnik.spec ---
Name:      mapnik
Version:   0.5.1
Release:   4%{?dist}
Summary:   Free Toolkit for developing mapping applications
Group:     Applications/Engineering
License:   LGPLv2+
URL:       http://mapnik.org/
Source0:   http://download.berlios.de/mapnik/mapnik_src-%{version}.tar.gz
Source1:   mapnik-data.license
Source2:   no_date_footer.html
Patch0:    use-system-fonts.patch
Patch1:    gcc43-warnings.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:  dejavu-fonts

BuildRequires: scons doxygen
BuildRequires: postgresql-devel python-devel
BuildRequires: libtool-ltdl-devel pkgconfig
BuildRequires: gdal-devel proj-devel agg-devel
BuildRequires: libxml2-devel boost-devel
BuildRequires: libtiff-devel libjpeg-devel
BuildRequires: libpng-devel freetype-devel fribidi-devel

%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

%description
Mapnik is a Free Toolkit for developing mapping applications.
It's written in C++ and there are Python bindings to
facilitate fast-paced agile development. It can comfortably
be used for both desktop and web development, which was something
I wanted from the beginning.

Mapnik is about making beautiful maps. It uses the AGG library
and offers world class anti-aliasing rendering with subpixel
accuracy for geographic data. It is written from scratch in
modern C++ and doesn't suffer from design decisions made a decade
ago. When it comes to handling common software tasks such as memory
management, filesystem access, regular expressions, parsing and so
on, Mapnik doesn't re-invent the wheel, but utilises best of breed
industry standard libraries from boost.org 

%package devel
Summary: Mapnik is a Free toolkit for developing mapping applications
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
Requires: libpng-devel libjpeg-devel freetype-devel agg-devel

%description devel
Mapnik is a Free Toolkit for developing mapping applications.
It's written in C++ and there are Python bindings to
facilitate fast-paced agile development. It can comfortably
be used for both desktop and web development, which was something
I wanted from the beginning.

Mapnik is about making beautiful maps. It uses the AGG library
and offers world class anti-aliasing rendering with subpixel
accuracy for geographic data. It is written from scratch in
modern C++ and doesn't suffer from design decisions made a decade
ago. When it comes to handling common software tasks such as memory
management, filesystem access, regular expressions, parsing and so
on, Mapnik doesn't re-invent the wheel, but utilises best of breed
industry standard libraries from boost.org

%package python
Summary:  Python bindings for the Mapnik spatial visualization library
License:  GPLv2+
Group:    Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: python-imaging python-lxml

%description python
Language bindings to enable the Mapnik library to be used from python

%package utils
Summary:  Utilities distributed with the Mapnik spatial visualization library
Group:    Development/Libraries
Requires: %{name} = %{version}-%{release}

%description utils
Miscellaneous utilities distributed with the Mapnik spatial visualization
library

%package demo
Summary:  Demo utility and some sample data distributed with mapnik
License:  GPLv2+ GeoGratis
Group:    Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-python = %{version}-%{release}

%description demo
Demo application and sample vector datas distributed with the Mapnik
spatial visualization library

%prep
%setup -q -n %{name}-%{version}
%patch0 -p0
%patch1 -p0

# get rid of local agg, tinyxml and fonts
rm -rf agg tinyxml fonts

set +x
for f in `find . -type f` ; do
   if file $f | grep -q ISO-8859 ; then
      set -x
      iconv -f ISO-8859-1 -t UTF-8 $f > ${f}.tmp && \
         mv -f ${f}.tmp $f
      set +x
   fi
   if file $f | grep -q CRLF ; then
      set -x
      sed -i -e 's|\r||g' $f
      set +x
   fi
done
set -x

# fix spurious exec flag
chmod -x demo/viewer/images/*.png
chmod -x demo/data/test/regenerate.sh
find . -type d -perm /g+s -exec chmod -s '{}' \;

%build

# do not use internal agg and tinyxml
sed -i -e "s|.\#tinyxml..||g" SConstruct
sed -i -e "s|\#agg\/include|\/usr\/include\/agg2\/|g" SConstruct
sed -i -e "s|SConscript(.agg|\#SConscript(.agg|g" SConstruct
sed -i -e "s|\[.iconv.|\[\'dl\'|g" SConstruct
# system_error.hpp missing on linux
sed -i -e "s|\[.system.|\#\[\'system\'|g" SConstruct
# linkage errors
sed -i -e "s|libraries \= \[|libraries \= \[\'mapnik\',|g" plugins/input/gdal/SConscript
sed -i -e "s|libraries \= \[|libraries \= \[\'mapnik\',|g" plugins/input/postgis/SConscript
sed -i -e "s|libraries \= \[|libraries \= \[\'mapnik\',|g" plugins/input/shape/SConscript
sed -i -e "s|libraries \= \[|libraries \= \[\'mapnik\'|g" plugins/input/raster/SConscript

# fix build flags
sed -i -e "s|common_cxx_flags = .-D\%s|common_cxx_flags = \'-D\%s $RPM_OPT_FLAGS |g" SConstruct

%{__python} scons/scons.py \
                PREFIX=%{_prefix} \
                XMLPARSER=libxml2 \
                GDAL_INCLUDES=%{_includedir}/gdal

# build doxygen docs
# use multilib aware footer
sed -i -e 's|HTML_FOOTER|HTML_FOOTER=no_date_footer.html\n\#|g' docs/doxygen/Doxyfile
install -p -m 644 %{SOURCE2} docs/doxygen/
pushd docs/doxygen
doxygen
popd

%install

rm -rf %{buildroot}

%{__python} scons/scons.py install DESTDIR=%{buildroot} \
                PREFIX=%{_prefix} \
                XMLPARSER=libxml2 \
                GDAL_INCLUDES=%{_includedir}/gdal

# get rid of fonts use external instead
rm -rf %{buildroot}%{_libdir}/%{name}/fonts

# install more utils
mkdir -p %{buildroot}%{_bindir}
install -p -m 755 utils/stats/mapdef_stats.py %{buildroot}%{_bindir}/
install -p -m 644 %{SOURCE1} demo/data/

%check

# export test enviroment
export PYTHONPATH=$PYTHONPATH:%{buildroot}%{python_sitearch}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH%{buildroot}%{_libdir}

pushd tests/python/
./test_load_map.py || true
./test_save_map.py || true
popd

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/input
%{_libdir}/%{name}/input/*.input
%{_libdir}/lib%{name}.so.*

%files devel
%defattr(-,root,root,-)
%doc docs/doxygen/html
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%{_libdir}/lib%{name}.so

%files python
%defattr(-,root,root,-)
%{python_sitearch}/%{name}
%exclude %{_bindir}/mapdef_stats.py?
%{_bindir}/mapdef_stats.py

%files utils
%defattr(-,root,root,-)
%{_bindir}/shapeindex

%files demo
%defattr(-,root,root,-)
%doc demo/c++
%doc demo/viewer
%doc demo/data
%doc demo/python demo/test

%changelog
* Mon Aug 25 2008 Balint Cristian <rezso at rdsor.ro> - 0.5.1-4
- License of demo is GPLv2+ GeoGratis

* Fri Jul 25 2008 Balint Cristian <rezso at rdsor.ro> - 0.5.1-3
- fix perms in -demo
- fix demo folder ownership

* Wed Jul 23 2008 Balint Cristian <rezso at rdsor.ro> - 0.5.1-2
- new demo subpackage
- demo and python subpackages have GPLv2+ license
- fix dependency for python ogc server
- *.input plugins will stay in _libdir instead
- fix linkage over plugins

* Sun Jul 06 2008 Balint Cristian <rezso at rdsor.ro> - 0.5.1-1
- the license of mapnik is LGPLv2+
- release is now 0.5.1 from upstream stable
- fix explicit library dependency requirement
- fix library dependency for -devel requirement
- fix library dependency for -python requirement
- fix to use fedora specific compile flag
- fix to use external agg-devel library as shared
- make sure get rid of internal tinyxml and agg chunks
- use libxml2 by default instead of tinyxml
- use macros everywhere in specfile
- use external fedora dejavu fonts insted, get rid of local one
- place tool binaries in _bindir
- add check section and run testsuite, they should pass
- add one python tool
- build and add doxygen docs
- fix multilib issue
- fix UTF-8 and some spurious permission
- include local copied web license of some demo data
- rpmlint should print zarro bugs


--- NEW FILE no_date_footer.html ---
<hr size="1"><address style="text-align: right;"><small>
Generated for $projectname by <a href="http://www.doxygen.org/
index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a>
$doxygenversion</small></address>
</body>
</html>


use-system-fonts.patch:

--- NEW FILE use-system-fonts.patch ---
Index: bindings/python/SConscript
===================================================================
--- bindings/python/SConscript	(revision 671)
+++ bindings/python/SConscript	(working copy)
@@ -64,7 +64,7 @@
 paths = """
 mapniklibpath = '%s'
 inputpluginspath = mapniklibpath + '/input'
-fontscollectionpath = mapniklibpath + '/fonts'
+fontscollectionpath = '/usr/share/fonts/dejavu'
 """
 
 exp =  r"%s{2,}" % os.sep
--- demo/c++/rundemo.cpp.orig	2008-03-24 15:01:35.000000000 +0000
+++ demo/c++/rundemo.cpp	2008-03-24 15:03:18.000000000 +0000
@@ -49,7 +49,7 @@
         std::cout << " running demo ... \n";
         std::string mapnik_dir(argv[1]);
         datasource_cache::instance()->register_datasources(mapnik_dir + "/lib/mapnik/input/"); 
-        freetype_engine::register_font(mapnik_dir + "/lib/mapnik/fonts/DejaVuSans.ttf");
+        freetype_engine::register_font("/usr/share/fonts/dejavu/DejaVuSans.ttf");
         
         Map m(800,600);
         m.set_background(color_factory::from_string("white"));
--- SConstruct.orig	2008-03-24 15:55:57.000000000 +0000
+++ SConstruct	2008-03-24 15:56:13.000000000 +0000
@@ -284,5 +284,3 @@
         env.Append(CXXFLAGS = gcc_cxx_flags + '-O2 -finline-functions -Wno-inline %s' % ndebug_flags)
 
 
-SConscript('fonts/SConscript')
-


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/mapnik/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	24 Aug 2008 18:53:00 -0000	1.1
+++ .cvsignore	25 Aug 2008 16:03:08 -0000	1.2
@@ -0,0 +1 @@
+mapnik_src-0.5.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/mapnik/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	24 Aug 2008 18:53:00 -0000	1.1
+++ sources	25 Aug 2008 16:03:08 -0000	1.2
@@ -0,0 +1 @@
+fa484bdb5cf1faf0720f17129a43038b  mapnik_src-0.5.1.tar.gz




More information about the fedora-extras-commits mailing list