[packages/meshlab] cleanup, simplify, move patch comments inside patches

glen glen at pld-linux.org
Fri May 1 10:02:52 CEST 2015


commit e5073aa2084d797e83eaff6544e4630eb4d071b9
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri May 1 11:02:20 2015 +0300

    cleanup, simplify, move patch comments inside patches
    
    however FTBS here

 meshlab-1.3.1-glu.patch                       |   1 +
 meshlab-1.3.1-ply-numeric.patch               |   2 +
 meshlab-1.3.2-cstddef.patch                   |   3 +
 meshlab-1.3.2-gcc47.patch                     |   1 +
 meshlab-1.3.2-include-path-double-slash.patch |   2 +
 meshlab-1.3.2-noctm.patch                     |   1 +
 meshlab-1.3.2-sharedlib.patch                 |   2 +
 meshlab-1.3.2-vert-swap.patch                 |   3 +
 meshlab.spec                                  | 134 ++++++++------------------
 9 files changed, 57 insertions(+), 92 deletions(-)
---
diff --git a/meshlab.spec b/meshlab.spec
index 316dc3b..29f2d53 100644
--- a/meshlab.spec
+++ b/meshlab.spec
@@ -2,53 +2,30 @@ Summary:	A system for processing and editing unstructured 3D triangular meshes
 Name:		meshlab
 Version:	1.3.2
 Release:	0.1
-License:	GPLv2+ and BSD and Public Domain
+License:	GPL v2+ and BSD and Public Domain
 Group:		Applications/Multimedia
 URL:		http://meshlab.sourceforge.net/
-
 Source0:	http://downloads.sourceforge.net/meshlab/MeshLabSrc_AllInc_v132.tgz
 # Source0-md5:	3cba61f6d34559f98129d9d0a3126f81
 Source1:	%{name}-48x48.xpm
-
 # Meshlab v131 tarball is missing the docs directory. Reported upstream,
 # but for now we'll extract them from the v122 tarball.
 Source2:	http://downloads.sourceforge.net/meshlab/MeshLabSrc_v122.tar.gz
 # Source2-md5:	f06107dd01cbe0d6519dbb759ae84c11
-
-# Fedora-specific patches to use shared libraries, and to put plugins and
-# shaders in appropriate directories
 Patch0:		%{name}-1.3.2-sharedlib.patch
 Patch1:		%{name}-1.3.2-plugin-path.patch
 Patch2:		%{name}-1.3.2-shader-path.patch
-
-# Patch to fix FTBFS due to missing include of <cstddef>
-# from Teemu Ikonen <tpikonen at gmail.com>
-# Also added a missing include of <unistd.h>
 Patch3:		%{name}-1.3.2-cstddef.patch
-
-# Patch to fix reading of .ply files in comma separator locales
-# from Teemu Ikonen <tpikonen at gmail.com>
 Patch4:		%{name}-1.3.1-ply-numeric.patch
-
-# Add #include <GL/glu.h> to various files
 Patch5:		%{name}-1.3.1-glu.patch
-
-# Disable io_ctm until openctm is packaged
 Patch6:		%{name}-1.3.2-noctm.patch
-
-# Change m.vert.math::Swap() to m.vert.swap()
-# See Debian bug 667276
-# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667276
 Patch9:		%{name}-1.3.2-vert-swap.patch
-
-# Yet another incompatibility with GCC 4.7
 Patch10:	%{name}-1.3.2-gcc47.patch
-
-# Include paths shouldn't have consecutive double slashes.  Causes
-# a problem for debugedit, used by rpmbuild to extract debuginfo.
 Patch11:	%{name}-1.3.2-include-path-double-slash.patch
-
+BuildRequires:	ImageMagick
 BuildRequires:	bzip2-devel
+BuildRequires:	chrpath
+BuildRequires:	desktop-file-utils
 BuildRequires:	glew-devel
 BuildRequires:	levmar-devel
 BuildRequires:	lib3ds-devel
@@ -56,10 +33,7 @@ BuildRequires:	muparser-devel
 BuildRequires:	qhull-devel
 BuildRequires:	qt-devel
 BuildRequires:	qtsoap-devel
-
-BuildRequires:	ImageMagick
-BuildRequires:	chrpath
-BuildRequires:	desktop-file-utils
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 MeshLab is an open source, portable, and extensible system for the
@@ -74,27 +48,27 @@ these kinds of meshes.
 
 # get the missing docs directory from the old tarball
 %setup -q -T -D -a 2
+
 mv meshlab-snapshot-svn3524/meshlab/docs meshlab/docs
 rm -rf meshlab-snapshot-svn3524
 
-%patch0 -P 0 -p1 -b .sharedlib
-%patch0 -P 1 -p1 -b .plugin-path
-%patch0 -P 2 -p1 -b .shader-path
-%patch0 -P 3 -p1 -b .cstddef
-%patch0 -P 4 -p1 -b .ply-numeric
-%patch0 -P 5 -p1 -b .glu
-%patch0 -P 6 -p1 -b .noctm
-%patch0 -P 9 -p1 -b .vert-swap
-%patch0 -P 10 -p1 -b .gcc47
-%patch0 -P 11 -p1 -b .include-path-double-slash
+%patch0 -P 0 -p1
+%patch0 -P 1 -p1
+%patch0 -P 2 -p1
+%patch0 -P 3 -p1
+%patch0 -P 4 -p1
+%patch0 -P 5 -p1
+%patch0 -P 6 -p1
+%patch0 -P 9 -p1
+%patch0 -P 10 -p1
+%patch0 -P 11 -p1
 
 # Turn of execute permissions on source files to avoid rpmlint
 # errors and warnings for the debuginfo package
 find . \( -name *.h -o -name *.cpp -o -name *.inl \) -a -executable \
 	-exec chmod -x {} \;
 
-# Remove bundled library sources, since we use the Fedora packaged
-# libraries
+# Remove bundled library sources, since we use the Fedora packaged libraries
 rm -rf vcglib/wrap/system
 rm -rf meshlab/src/external/{ann*,bzip2*,glew*,levmar*,lib3ds*,muparser*,ode*,qhull*,qtsoap*}
 
@@ -132,15 +106,12 @@ EOF
 
 # convert doc files from ISO-8859-1 to UTF-8 encoding:
 cd ../docs
-for f in contrib_Gangemi_Vannini.txt contrib_Buzzelli_Mazzanti.txt
-do
-  iconv -fiso88591 -tutf8 $f >$f.new
-  touch -r $f $f.new
-  mv $f.new $f
+for f in contrib_Gangemi_Vannini.txt contrib_Buzzelli_Mazzanti.txt; do
+	iconv -fiso88591 -tutf8 $f >$f.new
+	touch -r $f $f.new
+	mv $f.new $f
 done
 
-%install
-rm -rf $RPM_BUILD_ROOT
 # The QMAKE_RPATHDIR stuff puts in the path to the compile-time location
 # of libcommon, which won't work at runtime, so we change the rpath here.
 # The use of rpath will cause an rpmlint error, but the Fedora Packaging
@@ -151,49 +122,34 @@ rm -rf $RPM_BUILD_ROOT
 # and avoid rpath entirely.
 chrpath -r %{_libdir}/meshlab meshlab/src/distrib/{meshlab,meshlabserver}
 
-install -d $RPM_BUILD_ROOT%{_bindir}
-install -p meshlab/src/distrib/meshlab \
-		  meshlab/src/distrib/meshlabserver \
-		  $RPM_BUILD_ROOT%{_bindir}
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_pixmapsdir},%{_desktopdir}} \
+	$RPM_BUILD_ROOT%{_libdir}/meshlab/plugins \
+	$RPM_BUILD_ROOT%{_datadir}/meshlab/{shaders/shadersrm,textures}
+
+cd meshlab
 
-install -d $RPM_BUILD_ROOT%{_mandir}/man1
-install -p meshlab/docs/meshlab.1 \
-		  meshlab/docs/meshlabserver.1 \
-		  $RPM_BUILD_ROOT%{_mandir}/man1
+install -p src/distrib/{meshlab,meshlabserver} $RPM_BUILD_ROOT%{_bindir}
+cp -p docs/{meshlab.1,meshlabserver.1} $RPM_BUILD_ROOT%{_mandir}/man1
 
-install -d $RPM_BUILD_ROOT%{_libdir}/meshlab
-install -p meshlab/src/distrib/libcommon.so.1.0.0 \
-		  $RPM_BUILD_ROOT%{_libdir}/meshlab
+install -p src/distrib/libcommon.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/meshlab
 ln -s libcommon.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/meshlab/libcommon.so.1.0
 ln -s libcommon.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/meshlab/libcommon.so.1
 ln -s libcommon.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/meshlab/libcommon.so
 
-install -d $RPM_BUILD_ROOT%{_libdir}/meshlab/plugins
-install -p meshlab/src/distrib/plugins/*.so \
-		  $RPM_BUILD_ROOT%{_libdir}/meshlab/plugins
-
-install -d $RPM_BUILD_ROOT%{_datadir}/meshlab/shaders
-install -p meshlab/src/distrib/shaders/*.{frag,gdp,vert} \
-		  $RPM_BUILD_ROOT%{_datadir}/meshlab/shaders
-
-install -d $RPM_BUILD_ROOT%{_datadir}/meshlab/shaders/shadersrm
-install -p meshlab/src/distrib/shaders/shadersrm/*.rfx \
-		  $RPM_BUILD_ROOT%{_datadir}/meshlab/shaders/shadersrm
-
-install -d $RPM_BUILD_ROOT%{_datadir}/meshlab/textures
-
-install -d $RPM_BUILD_ROOT%{_pixmapsdir}
-install -p meshlab/src/meshlab.png \
-		  $RPM_BUILD_ROOT%{_pixmapsdir}
-
-install -d $RPM_BUILD_ROOT%{_desktopdir}
-install -p meshlab/src/meshlab.desktop \
-		  $RPM_BUILD_ROOT%{_desktopdir}
-
+install -p src/distrib/plugins/*.so $RPM_BUILD_ROOT%{_libdir}/meshlab/plugins
+cp -p src/distrib/shaders/*.{frag,gdp,vert} $RPM_BUILD_ROOT%{_datadir}/meshlab/shaders
+cp -p src/distrib/shaders/shadersrm/*.rfx $RPM_BUILD_ROOT%{_datadir}/meshlab/shaders/shadersrm
+cp -p src/meshlab.png $RPM_BUILD_ROOT%{_pixmapsdir}
+cp -p src/meshlab.desktop $RPM_BUILD_ROOT%{_desktopdir}
 desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/meshlab.desktop
 
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
@@ -210,16 +166,10 @@ desktop-file-validate $RPM_BUILD_ROOT%{_desktopdir}/meshlab.desktop
 %doc meshlab/src/distrib/shaders/3Dlabs-license.txt
 %doc meshlab/src/distrib/shaders/LightworkDesign-license.txt
 %doc meshlab/src/meshlabplugins/filter_poisson/license.txt
-
 %attr(755,root,root) %{_bindir}/meshlab
 %attr(755,root,root) %{_bindir}/meshlabserver
 %{_libdir}/meshlab
 %{_datadir}/meshlab
-%{_mandir}/man1/*.1.*
+%{_mandir}/man1/*.1*
 %{_desktopdir}/meshlab.desktop
 %{_pixmapsdir}/meshlab.png
-
-%changelog
-
-%clean
-rm -rf $RPM_BUILD_ROOT
diff --git a/meshlab-1.3.1-glu.patch b/meshlab-1.3.1-glu.patch
index 63b1396..74e841c 100644
--- a/meshlab-1.3.1-glu.patch
+++ b/meshlab-1.3.1-glu.patch
@@ -1,3 +1,4 @@
+# Add #include <GL/glu.h> to various files
 diff -up meshlab-1.3.1/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/Raytracer/RayTracer.cpp.glu meshlab-1.3.1/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/Raytracer/RayTracer.cpp
 --- meshlab-1.3.1/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/Raytracer/RayTracer.cpp.glu	2011-06-06 01:48:49.000000000 -0600
 +++ meshlab-1.3.1/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/Raytracer/RayTracer.cpp	2011-10-21 13:33:56.119545281 -0600
diff --git a/meshlab-1.3.1-ply-numeric.patch b/meshlab-1.3.1-ply-numeric.patch
index 509a773..90a8430 100644
--- a/meshlab-1.3.1-ply-numeric.patch
+++ b/meshlab-1.3.1-ply-numeric.patch
@@ -1,3 +1,5 @@
+# Patch to fix reading of .ply files in comma separator locales
+# from Teemu Ikonen <tpikonen at gmail.com>
 diff -up meshlab-1.3.1/meshlab/src/meshlab/main.cpp.ply-numeric meshlab-1.3.1/meshlab/src/meshlab/main.cpp
 --- meshlab-1.3.1/meshlab/src/meshlab/main.cpp.ply-numeric	2011-09-14 04:42:55.000000000 -0600
 +++ meshlab-1.3.1/meshlab/src/meshlab/main.cpp	2011-10-21 14:16:50.910980112 -0600
diff --git a/meshlab-1.3.2-cstddef.patch b/meshlab-1.3.2-cstddef.patch
index ad6c13c..001a8c6 100644
--- a/meshlab-1.3.2-cstddef.patch
+++ b/meshlab-1.3.2-cstddef.patch
@@ -1,3 +1,6 @@
+# Patch to fix FTBFS due to missing include of <cstddef>
+# from Teemu Ikonen <tpikonen at gmail.com>
+# Also added a missing include of <unistd.h>
 diff -up meshlab-1.3.2/vcglib/wrap/io_tetramesh/import_ply.h.cstddef meshlab-1.3.2/vcglib/wrap/io_tetramesh/import_ply.h
 --- meshlab-1.3.2/vcglib/wrap/io_tetramesh/import_ply.h.cstddef	2011-01-25 00:53:39.000000000 -0700
 +++ meshlab-1.3.2/vcglib/wrap/io_tetramesh/import_ply.h	2012-09-30 02:40:19.697251228 -0600
diff --git a/meshlab-1.3.2-gcc47.patch b/meshlab-1.3.2-gcc47.patch
index aa52c70..549c8ec 100644
--- a/meshlab-1.3.2-gcc47.patch
+++ b/meshlab-1.3.2-gcc47.patch
@@ -1,3 +1,4 @@
+# Yet another incompatibility with GCC 4.7
 diff -up meshlab-1.3.2/meshlab/src/meshlabplugins/decorate_base/colorhistogram.h.gcc47 meshlab-1.3.2/meshlab/src/meshlabplugins/decorate_base/colorhistogram.h
 --- meshlab-1.3.2/meshlab/src/meshlabplugins/decorate_base/colorhistogram.h.gcc47	2013-02-26 09:39:14.395035444 -0700
 +++ meshlab-1.3.2/meshlab/src/meshlabplugins/decorate_base/colorhistogram.h	2013-02-26 09:39:40.578034587 -0700
diff --git a/meshlab-1.3.2-include-path-double-slash.patch b/meshlab-1.3.2-include-path-double-slash.patch
index a7c0407..d4288e2 100644
--- a/meshlab-1.3.2-include-path-double-slash.patch
+++ b/meshlab-1.3.2-include-path-double-slash.patch
@@ -1,3 +1,5 @@
+# Include paths shouldn't have consecutive double slashes.  Causes
+# a problem for debugedit, used by rpmbuild to extract debuginfo.
 diff -up meshlab-1.3.2/meshlab/src/meshlabplugins/render_splatting/splatrenderer.h.include-path-double-slash meshlab-1.3.2/meshlab/src/meshlabplugins/render_splatting/splatrenderer.h
 --- meshlab-1.3.2/meshlab/src/meshlabplugins/render_splatting/splatrenderer.h.include-path-double-slash	2013-02-28 22:51:16.572824421 -0700
 +++ meshlab-1.3.2/meshlab/src/meshlabplugins/render_splatting/splatrenderer.h	2013-02-28 22:51:54.298823186 -0700
diff --git a/meshlab-1.3.2-noctm.patch b/meshlab-1.3.2-noctm.patch
index af083b1..55a4ec8 100644
--- a/meshlab-1.3.2-noctm.patch
+++ b/meshlab-1.3.2-noctm.patch
@@ -1,3 +1,4 @@
+# Disable io_ctm until openctm is packaged
 diff -up meshlab-1.3.2/meshlab/src/meshlab_full.pro.noctm meshlab-1.3.2/meshlab/src/meshlab_full.pro
 --- meshlab-1.3.2/meshlab/src/meshlab_full.pro.noctm	2012-08-02 06:15:32.000000000 -0600
 +++ meshlab-1.3.2/meshlab/src/meshlab_full.pro	2012-09-30 01:06:53.282804493 -0600
diff --git a/meshlab-1.3.2-sharedlib.patch b/meshlab-1.3.2-sharedlib.patch
index 7084fe7..27e9e75 100644
--- a/meshlab-1.3.2-sharedlib.patch
+++ b/meshlab-1.3.2-sharedlib.patch
@@ -1,3 +1,5 @@
+# Fedora-specific patches to use shared libraries, and to put plugins and
+# shaders in appropriate directories
 diff -up meshlab-1.3.2/meshlab/src/common/common.pro.sharedlib meshlab-1.3.2/meshlab/src/common/common.pro
 --- meshlab-1.3.2/meshlab/src/common/common.pro.sharedlib	2012-07-30 23:42:56.000000000 -0600
 +++ meshlab-1.3.2/meshlab/src/common/common.pro	2013-02-26 09:43:25.574027223 -0700
diff --git a/meshlab-1.3.2-vert-swap.patch b/meshlab-1.3.2-vert-swap.patch
index 4e2c1a4..0946078 100644
--- a/meshlab-1.3.2-vert-swap.patch
+++ b/meshlab-1.3.2-vert-swap.patch
@@ -1,3 +1,6 @@
+# Change m.vert.math::Swap() to m.vert.swap()
+# See Debian bug 667276
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667276
 diff -up meshlab-1.3.2/vcglib/wrap/gl/trimesh.h.vert-swap meshlab-1.3.2/vcglib/wrap/gl/trimesh.h
 --- meshlab-1.3.2/vcglib/wrap/gl/trimesh.h.vert-swap	2012-09-30 01:23:32.071884081 -0600
 +++ meshlab-1.3.2/vcglib/wrap/gl/trimesh.h	2012-09-30 01:27:38.281903698 -0600
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/meshlab.git/commitdiff/e5073aa2084d797e83eaff6544e4630eb4d071b9



More information about the pld-cvs-commit mailing list