]> git.pld-linux.org Git - packages/polyclipping.git/commitdiff
- added pc patch (install arch-specific .pc file in arch-dependent location)
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 27 Sep 2020 09:00:58 +0000 (11:00 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 27 Sep 2020 09:00:58 +0000 (11:00 +0200)
- pl
- release 2

polyclipping-pc.patch [new file with mode: 0644]
polyclipping.spec

diff --git a/polyclipping-pc.patch b/polyclipping-pc.patch
new file mode 100644 (file)
index 0000000..89f6fc6
--- /dev/null
@@ -0,0 +1,11 @@
+--- polyclipping-6.4.2/cpp/CMakeLists.txt.orig 2015-04-23 09:04:20.000000000 +0200
++++ polyclipping-6.4.2/cpp/CMakeLists.txt      2020-09-27 10:56:52.475493707 +0200
+@@ -5,7 +5,7 @@
+ # The header name clipper.hpp is too generic, so install in a subdirectory\r
+ SET(CMAKE_INSTALL_INCDIR "${CMAKE_INSTALL_PREFIX}/include/polyclipping")\r
+ SET(CMAKE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")\r
+-SET(CMAKE_INSTALL_PKGCONFIGDIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig")\r
++SET(CMAKE_INSTALL_PKGCONFIGDIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig")\r
+ SET(PCFILE "${CMAKE_CURRENT_BINARY_DIR}/polyclipping.pc")\r
\r
+ SET(BUILD_SHARED_LIBS ON CACHE BOOL\r
index acd51d4f6dcfaaec8ba17b2ec4b7280171249d68..ee8a92bde5f9da4a66af8b4c4ff5d32885b0341d 100644 (file)
@@ -5,15 +5,17 @@
 # http://upstream-tracker.org/versions/clipper.html
 
 Summary:       Polygon clipping library
 # http://upstream-tracker.org/versions/clipper.html
 
 Summary:       Polygon clipping library
+Summary(pl.UTF-8):     Biblioteka do obcinania wielokątów
 Name:          polyclipping
 Version:       6.4.2
 Name:          polyclipping
 Version:       6.4.2
-Release:       1
+Release:       2
 License:       Boost
 Group:         Libraries
 Source0:       http://downloads.sourceforge.net/polyclipping/clipper_ver%{version}.zip
 # Source0-md5: 100b4ec56c5308bac2d10f3966e35e11
 License:       Boost
 Group:         Libraries
 Source0:       http://downloads.sourceforge.net/polyclipping/clipper_ver%{version}.zip
 # Source0-md5: 100b4ec56c5308bac2d10f3966e35e11
-URL:           http://sourceforge.net/projects/polyclipping
-BuildRequires: cmake
+Patch0:                %{name}-pc.patch
+URL:           https://sourceforge.net/projects/polyclipping/
+BuildRequires: cmake >= 2.6.0
 BuildRequires: dos2unix
 BuildRequires: iconv
 BuildRequires: libstdc++-devel
 BuildRequires: dos2unix
 BuildRequires: iconv
 BuildRequires: libstdc++-devel
@@ -32,17 +34,33 @@ EvenOdd, NonZero, Positive and Negative filling modes. The clipping
 code is based on the Vatti clipping algorithm, and outperforms other
 clipping libraries.
 
 code is based on the Vatti clipping algorithm, and outperforms other
 clipping libraries.
 
+%description -l pl.UTF-8
+Biblioteka do wykonywania logicznych operacji na wielokątach
+dwuwymiarowych - przecięć, sumy, różnicy i różnicy symetrycznej.
+Wykonuje także obcinanie marginesów. Biblioteka obsługuje wielokąty
+złożone (samoprzecinające się), wielokąty z dziurami oraz z
+nakładającymi się liniowo krawędziami. Wejściowe wielokąty mogą
+używać trybu wypełniania EvenOdd, NonZero, Positive i Negative. Kod
+obcinania jest oparty na algorytmie Vattiego i jest szybszy od wielu
+innych bibliotek.
+
 %package devel
 %package devel
-Summary:       Development files for %{name}
+Summary:       Development files for polyclipping library
+Summary(pl.UTF-8):     Pliki programistyczne biblioteki polyclipping
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description devel
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description devel
-The %{name}-devel package contains libraries and header files for
-developing applications that use %{name}.
+This package contains the header files for developing applications
+that use polyclipping library.
+
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
+wykorzystujących bibliotekę polyclipping.
 
 %prep
 %setup -qc
 
 %prep
 %setup -qc
+%patch0 -p1
 
 # Delete binaries
 find . \( -name "*.exe" -o -name "*.dll" \) -print0 | xargs -0 rm -v
 
 # Delete binaries
 find . \( -name "*.exe" -o -name "*.dll" \) -print0 | xargs -0 rm -v
@@ -53,7 +71,7 @@ find . -type f -exec dos2unix -k {} \;
 for filename in perl/perl_readme.txt README; do
        iconv -f iso8859-1 -t utf-8 "${filename}" > "${filename}".conv && \
        touch -r "${filename}" "${filename}".conv && \
 for filename in perl/perl_readme.txt README; do
        iconv -f iso8859-1 -t utf-8 "${filename}" > "${filename}".conv && \
        touch -r "${filename}" "${filename}".conv && \
-       mv "${filename}".conv "${filename}"
+       %{__mv} "${filename}".conv "${filename}"
 done
 
 # Enable use_lines
 done
 
 # Enable use_lines
@@ -62,32 +80,33 @@ sed -i 's|^//#define use_lines$|#define use_lines|' cpp/clipper.hpp
 %build
 install -d cpp/build
 cd cpp/build
 %build
 install -d cpp/build
 cd cpp/build
-%cmake ..
+%cmake .. \
+       -DCMAKE_INSTALL_PKGCONFIGDIR=%{_pkgconfigdir}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %{__make} -C cpp/build install \
        DESTDIR=$RPM_BUILD_ROOT
 
 # Install agg header with corrected include statement
 sed -e 's/\.\.\/clipper\.hpp/clipper.hpp/' < cpp/cpp_agg/agg_conv_clipper.h > $RPM_BUILD_ROOT%{_includedir}/%{name}/agg_conv_clipper.h
 
 %{__make} -C cpp/build install \
        DESTDIR=$RPM_BUILD_ROOT
 
 # Install agg header with corrected include statement
 sed -e 's/\.\.\/clipper\.hpp/clipper.hpp/' < cpp/cpp_agg/agg_conv_clipper.h > $RPM_BUILD_ROOT%{_includedir}/%{name}/agg_conv_clipper.h
 
-%post  -p /sbin/ldconfig
-%postun        -p /sbin/ldconfig
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
 %files
 %defattr(644,root,root,755)
-%doc License.txt README
-%doc "Third\ Party/Haskell" "Third\ Party/perl" "Third\ Party/ruby" "Third\ Party/python" Documentation
+%doc License.txt README Third?Party/{Flash,Go,Haskell,Java,LuaJIT,Matlab,ObjectiveC,perl,ruby}/*_readme.txt
 %attr(755,root,root) %{_libdir}/libpolyclipping.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libpolyclipping.so.22
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libpolyclipping.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libpolyclipping.so.22
 
 %files devel
 %defattr(644,root,root,755)
-%{_npkgconfigdir}/%{name}.pc
-%{_includedir}/%{name}
-%{_libdir}/libpolyclipping.so
+%attr(755,root,root) %{_libdir}/libpolyclipping.so
+%{_includedir}/polyclipping
+%{_pkgconfigdir}/polyclipping.pc
This page took 0.06564 seconds and 4 git commands to generate.