Name: nodejs-mapnik
Version: 3.4.13
Release: 2%{?dist}
Summary: Bindings to Mapnik tile rendering library for Node.js
License: BSD
URL: https://github.com/mapnik/node-mapnik
Source0: https://github.com/mapnik/node-mapnik/archive/%{version}/%{name}-%{version}.tar.gz
# Disable use of binary builds via pre-gyp
Patch0: nodejs-mapnik-pregyp.patch
# Relax some tests (https://github.com/mapnik/node-mapnik/issues/569)
Patch1: nodejs-mapnik-relax-tests.patch
# Disable some tests that fail on non-x86_64 platforms
Patch2: nodejs-mapnik-failing-tests-otherarchs.patch
ExclusiveArch: %{nodejs_arches}
# Bundled version is forked, and includes patches that only work
# when it is compiled as part of another project with defines that
# change types to match those in the surrounding project
Provides: bundled(polyclipping) = 6.4.0
BuildRequires: nodejs-devel
BuildRequires: node-gyp
BuildRequires: mapnik-devel >= 3.0.0
BuildRequires: mapnik-static >= 3.0.0
BuildRequires: protozero-devel >= 1.0.0
BuildRequires: boost-devel
BuildRequires: libicu-devel
BuildRequires: freetype-devel
BuildRequires: sparsehash-devel
BuildRequires: cairo-devel
BuildRequires: polyclipping-devel
BuildRequires: protobuf-lite-devel
BuildRequires: libtool-ltdl-devel
BuildRequires: libxml2-devel
BuildRequires: npm(mapnik-vector-tile) = 0.14.2
BuildRequires: mapnik-utils
BuildRequires: npm(mocha)
BuildRequires: npm(sphericalmercator)
BuildRequires: npm(nan) >= 2.1.0
%{?nodejs_default_filter}
%description
%summary
%prep
%setup -q -n node-mapnik-%{version}
%patch0 -p1
%patch1 -p1
%ifnarch x86_64
%patch2 -p1
%endif
%nodejs_fixdep -r nan
%nodejs_fixdep --dev nan "^2.1.0"
%nodejs_fixdep -r mapnik-vector-tile
%nodejs_fixdep --dev mapnik-vector-tile "0.14.2"
rm -rf deps/protozero node_modules
echo '{}' > common.gypi
%build
%nodejs_symlink_deps --build
export CXXFLAGS="%{optflags}"
export LDFLAGS="%{?__global_ldflags}"
node-gyp configure -- -Dmodule_name=mapnik -Dmodule_path=lib/binding
node-gyp build
%install
mkdir -p %{buildroot}/%{nodejs_sitearch}/mapnik
cp -pr package.json bin lib %{buildroot}/%{nodejs_sitearch}/mapnik
mkdir -p %{buildroot}/%{_bindir}
ln -s %{nodejs_sitelib}/mapnik/bin/mapnik-inspect.js %{buildroot}/%{_bindir}/mapnik-inspect
%nodejs_symlink_deps
%ifnarch armv7hl
%check
%nodejs_symlink_deps --check
%{nodejs_sitelib}/mocha/bin/mocha -R spec -t 5000
%endif
%files
%doc README.md CHANGELOG.md CONTRIBUTING.md docs documentation
%license LICENSE.txt
%{nodejs_sitearch}/mapnik
%{_bindir}/mapnik-*
%changelog
* Fri Jan 8 2016 Tom Hughes <tom@compton.nu> - 3.4.13-2
- Patch out node-pre-gyp correctly
* Fri Jan 8 2016 Tom Hughes <tom@compton.nu> - 3.4.13-1
- Update to 3.4.13 upstream release
* Wed Dec 30 2015 Tom Hughes <tom@compton.nu> - 3.4.12-3
- Update expected output for libwebp 0.5.x
* Wed Dec 23 2015 Tom Hughes <tom@compton.nu> - 3.4.12-2
- Rebuild for mapnik-vector-tile 0.14.2
* Sat Dec 19 2015 Tom Hughes <tom@compton.nu> - 3.4.12-1
- Update to 3.4.12 upstream release
* Sun Dec 6 2015 Tom Hughes <tom@compton.nu> - 3.4.11-2
- Drop mapnik-render from bindir as mapnik now provides it
* Sun Dec 6 2015 Tom Hughes <tom@compton.nu> - 3.4.11-1
- Update to 3.4.11 upstream release
* Fri Oct 30 2015 Tom Hughes <tom@compton.nu> - 1.4.17-11
- Rebuild for ICU 56.1
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.17-10
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
* Fri Jul 24 2015 Tom Hughes <tom@compton.nu> - 1.4.17-9
- Rebuild for boost 1.58.0
* Sat Jul 18 2015 Tom Hughes <tom@compton.nu> - 1.4.17-8
- Rebuild for boost 1.58.0
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.17-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Apr 29 2015 Kalev Lember <kalevlember@gmail.com> - 1.4.17-6
- Rebuilt for protobuf soname bump
* Wed Jan 28 2015 Tom Hughes <tom@compton.nu> - 1.4.17-5
- Fixed to build with nan 1.6
* Wed Jan 28 2015 Tom Hughes <tom@compton.nu> - 1.4.17-4
- Rebuild for boost 1.57.0
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 1.4.17-3
- Rebuild for boost 1.57.0
* Tue Oct 28 2014 Tom Hughes <tom@compton.nu> - 1.4.17-2
- Loosen mapnik-vector-tile dependency
* Tue Sep 30 2014 Tom Hughes <tom@compton.nu> - 1.4.17-1
- Update to 1.4.17 upstream release
* Tue Aug 26 2014 Tom Hughes <tom@compton.nu> - 1.4.13-1
- Update to 1.4.13 upstream release
* Mon Aug 18 2014 Tom Hughes <tom@compton.nu> - 1.4.12-1
- Update to 1.4.12 upstream release
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 22 2014 Tom Hughes <tom@compton.nu> - 1.4.10-1
- Update to 1.4.10 upstream release
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon May 26 2014 Tom Hughes <tom@compton.nu> - 1.4.5-1
- Update to 1.4.5 upstream release
* Sat May 24 2014 Petr Machata <pmachata@redhat.com> - 1.4.4-2
- Rebuild for boost 1.55.0
* Fri May 23 2014 Tom Hughes <tom@compton.nu> - 1.4.4-1
- Update to 1.4.4 upstream release
* Fri May 9 2014 Tom Hughes <tom@compton.nu> - 1.4.3-1
- Update to 1.4.3 upstream release
* Thu Apr 3 2014 Tom Hughes <tom@compton.nu> - 1.4.2-1
- Update to 1.4.2 upstream release
* Mon Mar 3 2014 Tom Hughes <tom@compton.nu> - 1.4.0-2
- Remove nodejs-pre-gyp dependency
* Sun Mar 2 2014 Tom Hughes <tom@compton.nu> - 1.4.0-1
- Update to 1.4.0 upstream release
- Switch to source from github as npm no longer includes tests
* Fri Feb 28 2014 Tom Hughes <tom@compton.nu> - 1.3.4-1
- Update to 1.3.4 upstream release
* Wed Feb 26 2014 Tom Hughes <tom@compton.nu> - 1.3.2-1
- Update to 1.3.2 upstream release
* Sat Feb 22 2014 Tom Hughes <tom@compton.nu> - 1.3.1-1
- Update to 1.3.1 upstream release
* Wed Feb 19 2014 Tom Hughes <tom@compton.nu> - 1.3.0-1
- Update to 1.3.0 upstream release
* Fri Feb 14 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.2.3-2
- rebuild for icu-53 (via v8)
* Fri Jan 10 2014 Tom Hughes <tom@compton.nu> - 1.2.3-1
- Update to 1.2.3 upstream release
* Fri Nov 8 2013 Tom Hughes <tom@compton.nu> - 1.2.2-1
- Update to 1.2.2 upstream release
* Fri Sep 27 2013 Tom Hughes <tom@compton.nu> - 1.2.1-1
- Update to 1.2.1 upstream release
* Tue Sep 10 2013 Tom Hughes <tom@compton.nu> - 1.2.0-1
- Update to 1.2.0 upstream release
* Mon Aug 26 2013 Tom Hughes <tom@compton.nu> - 1.1.3-2
- Don't strip the compiled extension module
* Fri Aug 16 2013 Tom Hughes <tom@compton.nu> - 1.1.3-1
- Update to 1.1.3 upstream release
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Jul 30 2013 Tom Hughes <tom@compton.nu> - 1.1.2-1
- Update to 1.1.2 upstream release
* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 1.1.0-3
- Rebuild for boost 1.54.0
* Tue Jul 16 2013 Tom Hughes <tom@compton.nu> - 1.1.0-2
- Correct system font paths
* Mon Jul 15 2013 Tom Hughes <tom@compton.nu> - 1.1.0-1
- Update to 1.1.0 upstream release
- Remove mapnik-vector-tile from run time dependencies
* Tue Jul 9 2013 Tom Hughes <tom@compton.nu> - 1.0.0-2
- Add upstream patch for numeric precision issue
* Fri Jul 5 2013 Tom Hughes <tom@compton.nu> - 1.0.0-1
- Update to 1.0.0 upstream release
* Sun Feb 10 2013 Tom Hughes <tom@compton.nu> - 0.7.22-1
- Initial build of 0.7.22