Browse Source

2015-01-28 Ryoichi INAGAKI <ryo1@toki.waseda.jp>

	* gl2ps, jsoncpp: new package
	* vtk: updated
	


git-svn-id: http://trac.vinelinux.org/repos/projects/specs@9305 ec354946-7b23-47d6-9f5a-488ba84defc7
inagaki 9 years ago
parent
commit
423387e152
3 changed files with 758 additions and 187 deletions
  1. 161 0
      g/gl2ps/gl2ps-vl.spec
  2. 157 0
      j/jsoncpp/jsoncpp-vl.spec
  3. 440 187
      v/vtk/vtk-vl.spec

+ 161 - 0
g/gl2ps/gl2ps-vl.spec

@@ -0,0 +1,161 @@
+Summary:	An OpenGL to PostScript printing library
+Summary(ja):	OpenGL から PostScript を出力するライブラリ
+Summary(pl):	Biblioteka drukowania z OpenGL-a do PostScriptu
+Name:		gl2ps
+Version:	1.3.8
+Release:	6%{?_dist_release}
+License:	LGPLv2+ or GL2PS
+Group:		System Environment/Libraries
+URL:		http://www.geuz.org/gl2ps/
+
+Source0:	http://www.geuz.org/gl2ps/src/%{name}-%{version}.tgz
+
+# Vine Patch
+Patch700:       gl2ps-1.3.8-nostatic.patch
+
+BuildRoot:	%{_tmppath}/%{name}-%{version}-root
+BuildRequires:  cmake >= 2.4
+BuildRequires:	mesa-libGL-devel
+BuildRequires:  libpng-devel
+BuildRequires:  texlive
+BuildRequires:  zlib-devel
+
+%description
+GL2PS is a C library providing high quality vector output for any
+OpenGL application. The main difference between GL2PS and other
+similar libraries is the use of sorting algorithms capable of handling
+intersecting and stretched polygons, as well as non manifold objects.
+GL2PS provides advanced smooth shading and text rendering, culling of
+invisible primitives, mixed vector/bitmap output, and much more...
+
+GL2PS can currently create PostScript (PS), Encapsulated PostScript
+(EPS) and Portable Document Format (PDF) files, as well as LaTeX files
+for the text fragments. Adding new vector output formats should be
+relatively easy (and amongst the formats we would be interested in
+adding, SVG is first in line). Meanwhile, you can use the excellent
+pstoedit program to transform the PostScript files generated by GL2PS
+into many other vector formats such as xfig, cgm, wmf, etc.
+
+%description -l pl
+GL2PS to biblioteka C zapewniająca wysokiej jakości wyjście wektorowe
+dla dowolnej aplikacji OpenGL. Główna różnica między GL2PS a innymi
+podobnymi bibliotekami polega na użyciu algorytmów sortujących
+potrafiących obsłużyć przecinające się i rozciągnięte wielokąty, a
+także obiekty nie będące rozmaitościami. GL2PS zapewnia zaawansowane
+gładkie cieniowanie i renderowanie tekstu, usuwanie niewidocznych
+prymitywów, mieszane wyjście wektorowo-bitmapowe i wiele więcej.
+
+GL2PS aktualnie potrafi tworzyć pliki PostScript (PS), Encapsulated
+PostScript (EPS) oraz Portable Document Format (PDF), a także pliki
+LaTeXa dla fragmentów tekstowych. Dodanie nowych wyjściowych formatów
+wektorowych powinno być względnie łatwe (a spośród formatów, których
+dodanie zainteresowani byliby autorzy, pierwszym jest SVG). Tymczasem
+można używać świetnego programu pstoedit do przekształcania plików
+PostScript generowanych przez GL2PS na wiele innych formatów
+wektorowych, takich jak xfig, cgm, wmf itp.
+
+%package devel
+Summary:	Header files for GL2PS library
+Summary(ja):	GL2PS ライブラリのヘッダファイル
+Summary(pl):	Pliki nagłówkowe biblioteki GL2PS
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	mesa-libGL-devel
+
+%description devel
+Header files for GL2PS library.
+
+%description devel -l pl
+Pliki nagłówkowe biblioteki GL2PS.
+
+%prep
+%setup -q -n %{name}-%{version}-source
+%patch700 -p1 -b .nostatic
+
+%build
+%cmake .
+make %{?_smp_mflags} 
+
+%install
+rm -rf %{buildroot}
+make DESTDIR=%{buildroot} install
+
+rm -r %{buildroot}%{_docdir}/gl2ps
+
+%clean
+rm -rf %{buildroot}
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc COPYING.GL2PS COPYING.LGPL README.txt
+%attr(755,root,root) %{_libdir}/libgl2ps.so.*
+
+%files devel
+%defattr(644,root,root,755)
+%doc gl2ps.pdf TODO.txt gl2psTest*.c
+%{_libdir}/libgl2ps.so
+%{_includedir}/gl2ps.h
+
+%changelog
+* Sun Jan 25 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.3.8-6
+- Initial build for Vine Linux
+- added Patch700
+
+* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.8-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.8-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.8-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.8-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
+
+* Tue Nov 27 2012 Orion Poplawski <orion@cora.nwra.com> 1.3.8-1
+- Updated to 1.3.8
+- Dropped soversion patch applied upstream
+- Don't need to move library on 64bit anymore
+
+* Sat Sep 01 2012 Dominik Mierzejewski <rpm@greysector.net> 1.3.6-1
+- updated to 1.3.6
+
+* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.5-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.5-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 1.3.5-3
+- Rebuild for new libpng
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.5-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Sat Dec 26 2009 Dominik Mierzejewski <rpm@greysector.net> 1.3.5-1
+- updated to 1.3.5
+- dropped upstreamed patches
+- fixed install in libdir
+- fixed missing SO version
+
+* Sun Aug 23 2009 Dominik Mierzejewski <rpm@greysector.net> 1.3.3-1
+- updated to 1.3.3
+- removed calls to exit(3)
+- added a simple build system (Makefile)
+- dropped libtool dependency
+- 1.3.3 added a new symbol, so made it versioned
+- added examples to -devel docs
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Fri Jun 13 2008 Dominik Mierzejewski <rpm@greysector.net> 1.3.2-1
+- adapted PLD spec r1.2
+- dropped static package

+ 157 - 0
j/jsoncpp/jsoncpp-vl.spec

@@ -0,0 +1,157 @@
+Name:       jsoncpp
+Version:    0.7.1
+Release:    1%{?_dist_release}
+Summary:    JSON library implemented in C++
+Summary(ja): C++ で実装された JSON ライブラリ
+
+Group:      System Environment/Libraries
+License:    Public Domain or MIT
+URL:        http://sourceforge.net/projects/%{name}/
+Source0:    https://github.com/open-source-parsers/jsoncpp/archive/0.7.1.tar.gz
+Source1:    jsoncpp.pc
+
+Patch0:     asstring.patch
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-root
+BuildRequires:  python scons doxygen
+BuildRequires:  graphviz
+
+%description
+%{name} is an implementation of a JSON (http://json.org) reader and writer in
+C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format.
+It is easy for humans to read and write. It is easy for machines to parse and
+generate.
+
+
+%package devel
+Summary:    Development headers and library for %{name}
+Summary(ja): %{name} の開発用ヘッダファイルとライブラリ
+Group:      Development/Libraries
+Requires:   %{name} = %{version}-%{release}
+
+%description devel
+This package contains the development headers and library for %{name}.
+
+
+%package doc
+Summary:    Documentation for %{name}
+Summary(ja): %{name} のドキュメント
+Group:      Documentation
+BuildArch:  noarch
+
+%description doc
+This package contains the documentation for %{name}
+
+
+%prep
+%setup -q
+#%patch0 -dsrc/lib_json -p1
+grep -e "-Wall" SConstruct
+sed 's/CCFLAGS = "-Wall"/CCFLAGS = "%{optflags}"/' -i SConstruct
+sed 's/README\.txt/README\.md/' -i SConstruct
+
+%build
+scons platform=linux-gcc %{?_smp_mflags}
+# Now, lets make a proper shared lib. :P
+g++ -o libjsoncpp.so.0.0.0 -shared -Wl,-soname,libjsoncpp.so.0 buildscons/linux-gcc-*/src/lib_json/*.os -lpthread
+# Build the doc
+python doxybuild.py --with-dot --doxygen %{_bindir}/doxygen
+
+%check
+# Fails due to patch0
+# scons platform=linux-gcc check %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -p -D lib%{name}.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.0.0.0
+ln -s %{_libdir}/lib%{name}.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
+ln -s %{_libdir}/lib%{name}.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.0
+
+install -d $RPM_BUILD_ROOT%{_includedir}/%{name}/json
+install -p -m 0644 include/json/*.h $RPM_BUILD_ROOT%{_includedir}/%{name}/json
+mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/html
+for f in AUTHORS LICENSE NEWS.txt README.md; do
+    install -p -m 0644 $f $RPM_BUILD_ROOT%{_docdir}/%{name}
+done
+install -p -m 0644 dist/doxygen/*/*.{html,png} $RPM_BUILD_ROOT%{_docdir}/%{name}/html
+install -d $RPM_BUILD_ROOT%{_libdir}/pkgconfig
+install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/
+sed -i 's|@@LIBDIR@@|%{_libdir}|g' $RPM_BUILD_ROOT%{_libdir}/pkgconfig/jsoncpp.pc
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%{_docdir}/%{name}/
+%exclude %{_docdir}/%{name}/html
+%{_libdir}/lib%{name}.so.0
+%{_libdir}/lib%{name}.so.0.0.0
+
+%files devel
+%{_libdir}/lib%{name}.so
+%{_includedir}/%{name}/
+%{_libdir}/pkgconfig/jsoncpp.pc
+
+%files doc
+%{_docdir}/%{name}/
+
+%changelog
+* Tue Jan 27 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 0.7.1-1
+- Initial build for Vine Linux
+
+* Sun Sep 21 2014 Sébastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.14.rc2
+- Allow int values to be converted to string (#1143774)
+
+* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-0.13.rc2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-0.12.rc2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Tue Sep 10 2013 Sébastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.11.rc2
+- https://bugzilla.redhat.com/show_bug.cgi?id=998149 : applied Michael Schwendt's
+  patch to fix duplicated documentation
+
+* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-0.10.rc2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
+
+* Fri Mar 15 2013 Sébastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.9.rc2
+- Changed Summary
+- Added %%doc files to the doc package
+- Added python as an explicit BuildRequires
+
+* Fri Feb 15 2013 Sebastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.8.rc2
+- Added documentation sub-package
+
+* Sun Jan 20 2013 Sebastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.7.rc2
+- Added graphviz as a BuildRequire
+
+* Sat Jan 19 2013 Sebastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.6.rc2
+- Install the corrected library
+
+* Sat Dec 22 2012 Sebastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.5.rc2
+- Added libjsoncpp.so.0
+- Moved the shared lib build to the correct section
+
+* Fri Dec 21 2012 Sebastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.4.rc2
+- Removed doc subpackage
+- Added .pc file
+- Fixed shared lib
+
+* Wed Dec 12 2012 Sebastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.3.rc2
+- Removed static package
+- Preserving timestamp on installed files
+- Added guard grep to the sed expression
+- Removed duplicated doc files
+- Removed dependency on pkgconfig
+- Changed base package group
+
+* Sun Dec 02 2012 Sébastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.2.rc2
+- Changed license field to Public Domain or MIT
+
+* Tue Nov 27 2012 Sébastien Willmann <sebastien.willmann@gmail.com> 0.6.0-0.1.rc2
+- Creation of the spec file
+

+ 440 - 187
v/vtk/vtk-vl.spec

@@ -1,58 +1,123 @@
-%define vtkver 5.4
-%define version %{vtkver}.2
-%define vtkdata_dir %{_datadir}/vtk-data-%{version}
-%define qt_designer_plugins_dir %(qmake -query QT_INSTALL_PREFIX)/plugins/designer
-%define tcl_ver %(echo "puts [info tclversion]" | %{_bindir}/tclsh)
+# Disable OSMesa builds for now - see Bug 744434
+%bcond_with OSMesa
+# Make Java conditional
+%bcond_without java
+
+%{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)}
+%{!?tcl_sitelib: %global tcl_sitelib %{_datadir}/tcl%{tcl_version}}
+
+%define _hdf5_version 1.8.14
+
 Summary: The Visualization Toolkit - A high level 3D visualization library
-Summary: The Visualization Toolkit - ハイレベル3D可視化ライブラリ
-Group: System Environment/Libraries
+Summary(ja): The Visualization Toolkit - ハイレベル3D可視化ライブラリ
 Name: vtk
-Version: %{version}
-Release: 3%{?_dist_release}
-Source0: vtk-%{version}.tar.gz
-Source1: vtkdata-%{version}.tar.gz
-Patch2: vtk-5.2.1-boost-1.42.patch
+Version: 6.1.0
+Release: 1%{?_dist_release}
+
+# This is a variant BSD license, a cross between BSD and ZLIB.
+# For all intents, it has the same rights and restrictions as BSD.
+# http://fedoraproject.org/wiki/Licensing/BSD#VTKBSDVariant
 License: BSD style
+Group: System Environment/Libraries
 URL: http://www.vtk.org/
+
+Source0: http://www.vtk.org/files/release/6.1/VTK-%{version}.tar.gz
+Source1: http://www.vtk.org/files/release/6.1/VTKData-%{version}.tar.gz
+
+# Use system libraries
+# http://public.kitware.com/Bug/view.php?id=11823
+Patch0: vtk-6.1.0-system.patch
+# Install some more needed cmake files to try to support paraview build
+# http://www.vtk.org/Bug/view.php?id=14157
+Patch1: vtk-install.patch
+# Patch to vtk to use system netcdf library
+Patch2: vtk-6.1.0-netcdf.patch
+# Fix compilation with mesa 10.4
+# https://bugzilla.redhat.com/show_bug.cgi?id=1138466
+Patch3: vtk-glext.patch
+# Fix types for std::min/man
+# http://www.vtk.org/Bug/view.php?id=15249
+Patch4: vtk-type.patch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: cmake >= 2.0.0
-BuildRequires: xorg-x11-devel, mesa-libGL-devel
-BuildRequires: expat-devel, zlib-devel
-BuildRequires: netcdf
-BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, freetype2-devel
-BuildRequires: tcl, tk, python, python-devel
-BuildRequires: qt4-devel
-BuildRequires: libboost-devel
+BuildRequires: gcc-c++
+%{?with_java:BuildRequires: java-devel}
+BuildRequires: libX11-devel, libXt-devel, libXext-devel
+BuildRequires: libICE-devel, libGL-devel
+%{?with_OSMesa:BuildRequires: mesa-libOSMesa-devel}
+BuildRequires: tk-devel, tcl-devel
+BuildRequires: python-devel
+BuildRequires: expat-devel, freetype2-devel, libjpeg-turbo-devel, libpng-devel
+BuildRequires: gl2ps-devel
+BuildRequires: libtiff-devel, zlib-devel
 BuildRequires: libxml2-devel
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
-Requires: cmake
-Requires: xorg-x11-libs, mesa-libGL
-Requires: expat, zlib
-Requires: netcdf
-Requires: libjpeg, libpng, libtiff, freetype2
-Obsoletes: %{name}-ruby < %{version}
+BuildRequires: qt4-devel qt4-designer
+#BuildRequires: qtwebkit-devel
+BuildRequires: chrpath
+BuildRequires: doxygen, graphviz
+BuildRequires: gnuplot
+BuildRequires: libboost-devel
+BuildRequires: hdf5-devel
+BuildRequires: jsoncpp-devel
+BuildRequires: libtheora-devel
+#BuildRequires: mysql-devel
+BuildRequires: mariadb-devel
+BuildRequires: netcdf-cxx-devel
+#BuildRequires: postgresql-devel
+BuildRequires: libpq-devel
+BuildRequires: R-devel
+BuildRequires: PyQt4-devel
+BuildRequires: sip-devel
+BuildRequires: sqlite3-devel
+BuildRequires: wget
+#BuildRequires: %{_includedir}/Xm
+BuildRequires: openMotif-devel
+BuildRequires: blas-devel
+BuildRequires: lapack-devel
+%{!?with_java:Conflicts: vtk-java}
+Requires: hdf5 = %{_hdf5_version}
+
 Distribution: Project Vine
 Vendor: Vine Linux
 Packager: owa
 
+# Do not check .so files in the python_sitearch directory
+%global __provides_exclude_from ^%{python_sitearch}/.*\\.so$
+
 %description
-VTK - the Visualization Toolkit is an object oriented, high
-level library that allows one to easily write C++ programs, Tcl,
-Python and Java scripts that do 3D visualization.  This package
-provides the shared libraries needed to run C++ programs that use VTK.
-To compile C++ code that uses VTK you have to install vtk-devel.
-
-VTK enables users to concentrate on their work by providing a
-large number of excellent and feature packed high level functions that
-do visualization.  The library needs OpenGL to render the graphics and
-for Linux machines Mesa is necessary. The terms/copyright can be read
-in %{_docdir}/vtk-%{version}-%{release}/README.html. VTK-Linux-HOWTO has
-information about using vtk, getting documentataion or help and
-instructions on building VTK. This package is relocatable.
+VTK is an open-source software system for image processing, 3D
+graphics, volume rendering and visualization. VTK includes many
+advanced algorithms (e.g., surface reconstruction, implicit modeling,
+decimation) and rendering techniques (e.g., hardware-accelerated
+volume rendering, LOD control).
 
 %package devel
 Summary: VTK header files for building C++ code.
+Summary(ja): C++ プログラムをビルドするための VTK ヘッダファイル集
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
+%{?with_OSMesa:Requires: mesa-libOSMesa-devel}
+Requires: cmake
+Requires: blas-devel
+Requires: gl2ps-devel
+Requires: expat-devel
+Requires: freetype2-devel
+Requires: hdf5-devel
+Requires: lapack-devel
+Requires: libjpeg-turbo-devel
+Requires: libpng-devel
+Requires: libogg-devel
+Requires: libtheora-devel
+Requires: libtiff-devel
+Requires: libxml2-devel
+Requires: libpq-devel
+Requires: libmysqlclient-devel
+Requires: qt4-devel
+#Requires: qtwebkit-devel%{?_isa}
+#Requires: jsoncpp-devel%{?_isa}
+# bz #1183210 + #1183530
+Requires: python-devel
 
 %description devel
 This provides the VTK header files required to compile C++
@@ -60,251 +125,439 @@ programs that use VTK to do 3D visualisation.
 
 
 %package tcl
-Summary: Tcl bindings for VTK.
-Group: Applications/Engineering
+Summary: Tcl bindings for VTK
+Summary(ja): VTK の tcl バインディング
+Group: System Environment/Libraries
 Requires: %{name} = %{version}-%{release}
 Requires: tcl
 
 %description tcl
-VTK - the Visualization Toolkit is an object oriented, high level
-library that allows one to easily write C++ programs, Tcl, Python and Java
-scripts that do 3D visualization.  This package provides the shared
-libraries that enable one to use VTK via Tcl scripts.  This version also
-provides the vtkTkRenderWindow class. This package does not require the vtk
-package to be installed.  The library needs OpenGL to render the graphics and
-for Linux machines Mesa is necessary.
+tcl bindings for VTK
 
-The terms/copyright can be read in
-/usr/share/doc/vtk-tcl-%{version}-%{release}/README.html. VTK-Linux-HOWTO has
-information about using vtk, getting documentation or help and instructions on
-building VTK. This package is relocatable.
+%description tcl -l ja
+VTK の tcl バインディングです。
 
 
 %package python
 Summary: Python bindings for VTK.
-Group: Applications/Engineering
+Summary(ja): VTK の python バインディング
+Group: System Environment/Libraries
 Requires: %{name} = %{version}-%{release}
 Requires: python
 
-%description python 
-This provides the shared libraries that enable one to use VTK from
-python scripts.  You will need python and vtk installed to use this.
-Remember to set your PYTHONPATH variable properly before running your
-scripts.
+%description python
+python bindings for VTK
+
+%description python -l ja
+VTK の python バインディングです。
+
+%if %{with java}
+%package java
+Summary: Java bindings for VTK
+Summary(ja): VTK の Java バインディング
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: java
+
+%description java
+Java bindings for VTK
+
+%description java -l ja
+VTK の Java バインディングです。
+%endif
 
 
 %package qt
-Summary: QT VTK widget
+Summary: Qt bindings for VTK
+Summary(ja): VTK の Qt バインディング
 Group: System Environment/Libraries
 Requires: %{name} = %{version}-%{release}
-Requires: qt
 
 %description qt
-The vtkQt classes combine VTK and Qt(TM) for X11.
+Qt bindings for VTK
 
+%description qt -l ja
+VTK の Qt バインディングです。
 
-%package examples
-Summary: C++, Tcl and Python example programs/scripts for VTK.
-Group: Development/Libraries
+
+%package qt-python
+Summary: Qt Python bindings for VTK
+Summary(ja): VTK の Qt Python バインディング
+Group: System Environment/Libraries
 Requires: %{name} = %{version}-%{release}
 
-%description examples
-This package contains all the examples from the VTK source.
-To compile the C++ examples you will need to install the vtk-devel
-package as well. The Python and Tcl examples can be run with the
-corresponding packages (vtk-python, vtk-tcl).
+%description qt-python
+Qt Python bindings for VTK
+
+%description qt-python -l ja
+VTK の Qt Python バインディングです。
+
+%package qt-tcl
+Summary: Qt TCL bindings for VTK
+Summary(ja): VTK の Qt TCL バインディング
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description qt-tcl
+Qt TCL bindings for VTK
+
+%description qt-tcl -l ja
+VTK の Qt TCL バインディングです。
 
 
 %package testing-progs
 Summary: Tests programs for VTK.
+Summary(ja): VTK のテスト用プログラム
 Group: Development/Libraries
 Requires: %{name} = %{version}-%{release}
 
 %description testing-progs
-This package contains all testing programs from the VTK
-source. The source code of these programs can be found in the
-vtk-examples package.
+Testing programs for VTK
+
+%description testing-progs -l ja
+VTK のテスト用プログラムです。
+
 
+%package examples
+Summary: Examples for VTK
+Summary(ja): VTK のサンプル集
+Group: Applications/Engineering
+Requires: %{name} = %{version}-%{release}
+Requires: vtk-data = %{version}
+
+%description examples
+This package contains all the examples from the VTK source.
+To compile the C++ examples you will need to install the vtk-devel
+package as well. The Python and Tcl examples can be run with the
+corresponding packages (vtk-python, vtk-tcl).
 
 %package data
-Summary: Data for VTK.
+Summary: Example data file for VTK
+Summary(ja): VTK のサンプルデータファイル
 Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-Prefix: /usr
+BuildArch: noarch
 
 %description data
 This package contains all the data from the VTKData repository.
 These data are required to run various examples from the examples package.
 
-
 %prep
-%setup -q -n VTK
-%patch2 -p1 -b .boost-1.42
+%setup -q -n VTK-%{version}
+%patch0 -p1 -b .system
+%patch1 -p1 -b .install
+%patch2 -p1 -b .netcdf
+%patch3 -p1 -b .glext
+%patch4 -p1 -b .type
+# Remove included thirdparty sources just to be sure
+# TODO - vtksqlite
+for x in autobahn vtkexpat vtkfreetype vtkgl2ps vtkhdf5 vtkjpeg vtklibxml2 vtknetcdf vtkoggtheora vtkpng vtktiff twisted vtkzlib zope
+do
+  rm -r ThirdParty/*/${x}
+done
 
-# fix data path
-find . -type f | xargs sed -i -e 's|../../../../VTKData|%{vtkdata_dir}|g'
+# Replace relative path ../../../VTKData with %{_datadir}/vtkdata-%{version}
+# otherwise it will break on symlinks.
+grep -rl '\.\./\.\./\.\./\.\./VTKData' . | xargs \
+  perl -pi -e's,\.\./\.\./\.\./\.\./VTKData,%{_datadir}/vtkdata-%{version},g'
 
+# Save an unbuilt copy of the Example's sources for %doc
+mkdir vtk-examples
+cp -a Examples vtk-examples
+# Don't ship Win32 examples
+rm -r vtk-examples/Examples/GUI/Win32
+find vtk-examples -type f | xargs chmod -R a-x
 
 %build
-## This section wad fixed reference to Mandriva package
-# Remove old cmake files
-rm -f CMake/FindBoost*
+export CFLAGS="%{optflags} -D_UNICODE"
+export CXXFLAGS="%{optflags} -D_UNICODE"
+%if %{with java}
+export JAVA_HOME=/usr/lib/jvm/java
+# Arm/Aarch64 builders have less ram
+# https://bugzilla.redhat.com/show_bug.cgi?id=1115920
+%ifnarch s390
+export JAVA_TOOL_OPTIONS=-Xmx2048m
+%endif
+%endif
 
-# Due to cmake prefix point already for _prefix, we need
-# push only the necessary extra paths
+mkdir build
+pushd build
 %cmake \
-	-DVTK_INSTALL_BIN_DIR:PATH=/bin \
-	-DVTK_INSTALL_PACKAGE_DIR=/%{_lib}/vtk-%{vtkver} \
-	-DVTK_INSTALL_INCLUDE_DIR:PATH=/include/vtk-%{vtkver} \
-	-DVTK_PYTHON_MODULE_PLATFORM_INSTALL_DIR=/%{_lib}/pyhton%{pyver}/site-packages \
-	-DVTK_DATA_ROOT:PATH=/share/vtk-%{vtkver} \
-	\
-	-DVTK_USE_SYSTEM_LIBPROJ4:BOOL=OFF \
-	-DVTK_WRAP_PYTHON:BOOL=ON \
-	-DVTK_WRAP_JAVA:BOOL=OFF \
-	-DVTK_WRAP_TCL:BOOL=ON \
-	-DVTK_USE_RENDERING:BOOL=ON \
-	-DDESIRED_QT_VERSION=4 \
-	-DBUILD_DOCUMENTATION:BOOL=OFF \
-	-DBUILD_EXAMPLES:BOOL=ON \
-	-DBUILD_SHARED_LIBS:BOOL=ON \
-	-DBUILD_TESTING:BOOL=ON \
-	-DVTK_USE_SYSTEM_EXPAT=ON \
-	-DVTK_USE_SYSTEM_JPEG=ON \
-	-DVTK_USE_SYSTEM_PNG=ON \
-	-DVTK_USE_SYSTEM_TIFF=ON \
-	-DVTK_USE_SYSTEM_ZLIB=ON \
-	-DVTK_USE_SYSTEM_FREETYPE=ON \
-	-DVTK_USE_ANSI_STDLIB:BOOL=ON \
-	-DVTK_USE_PARALLEL:BOOL=ON \
-	-DVTK_USE_GUISUPPORT:BOOL=ON \
-	-DVTK_USE_QVTK=ON \
-	-DVTK_PYTHON_SETUP_ARGS:STRING="--prefix=%{_prefix} --root=%{buildroot}" \
-	-DVTK_INSTALL_QT_PLUGIN_DIR=%{qt_designer_plugins_dir} \
-	-DVTK_USE_GL2PS:BOOL=ON \
-	-DVTK_USE_SYSTEM_LIBXML2:BOOL=ON \
-	-DVTK_USE_QVTK_QTOPENGL:BOOL=ON \
-	-DVTK_USE_BOOST:BOOL=ON \
-	-DTCL_LIBRARY:FILEPATH=%{_libdir}/libtcl%{tcl_ver}.so\
-	-DTK_LIBRARY:FILEPATH=%{_libdir}/libtk%{tcl_ver}.so\
-	;
-
-## don't use _smp_mflags
-##%__make %{?_smp_mflags}
-%__make
+       -DBUILD_DOCUMENTATION:BOOL=ON \
+       -DBUILD_EXAMPLES:BOOL=ON \
+       -DBUILD_TESTING:BOOL=OFF \
+       -DVTK_CUSTOM_LIBRARY_SUFFIX="" \
+       -DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib}/vtk \
+       -DVTK_INSTALL_DATA_DIR=share/vtk \
+       -DVTK_INSTALL_INCLUDE_DIR:PATH=include/vtk \
+       -DVTK_INSTALL_LIBRARY_DIR:PATH=%{_lib}/vtk \
+       -DVTK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/vtk \
+       -DVTK_INSTALL_PYTHON_MODULE_DIR:PATH=%{_lib}/python%{python_version}/site-packages \
+       -DVTK_INSTALL_QT_DIR:PATH=%{_lib}/qt4/plugins/designer \
+       -DVTK_INSTALL_TCL_DIR:PATH=share/tcl%{tcl_version}/vtk \
+       -DTK_INTERNAL_PATH:PATH=/usr/include/tk-private/generic \
+%if %{with OSMesa}
+       -DVTK_OPENGL_HAS_OSMESA:BOOL=ON \
+%endif
+%if %{with java}
+       -DVTK_WRAP_JAVA:BOOL=ON \
+       -DJAVA_INCLUDE_PATH:PATH=$JAVA_HOME/include \
+       -DJAVA_INCLUDE_PATH2:PATH=$JAVA_HOME/include/linux \
+       -DJAVA_AWT_INCLUDE_PATH:PATH=$JAVA_HOME/include \
+%else
+       -DVTK_WRAP_JAVA:BOOL=OFF \
+%endif
+       -DVTK_WRAP_PYTHON:BOOL=ON \
+       -DVTK_WRAP_PYTHON_SIP:BOOL=ON \
+       -DSIP_INCLUDE_DIR:PATH=/usr/include/python%{python_version} \
+       -DVTK_WRAP_TCL:BOOL=ON \
+       -DVTK_Group_Imaging:BOOL=ON \
+       -DVTK_Group_Qt:BOOL=ON \
+       -DVTK_Group_Rendering:BOOL=ON \
+       -DVTK_Group_StandAlone:BOOL=ON \
+       -DVTK_Group_Tk:BOOL=ON \
+       -DVTK_Group_Views:BOOL=ON \
+       -DModule_vtkFiltersStatisticsGnuR:BOOL=ON \
+       -DModule_vtkTestingCore:BOOL=ON \
+       -DModule_vtkTestingRendering:BOOL=ON \
+       -DVTK_USE_OGGTHEORA_ENCODER=ON \
+       -DVTK_USE_SYSTEM_LIBRARIES=ON \
+       -DVTK_USE_SYSTEM_HDF5:BOOL=ON \
+       -DVTK_USE_SYSTEM_LIBPROJ4:BOOL=OFF \
+       -DVTK_USE_SYSTEM_NETCDF:BOOL=ON \
+       -DTCL_LIBRARY:FILEPATH=%{_libdir}/libtcl%{tcl_version}.so \
+       -DTK_LIBRARY:FILEPATH=%{_libdir}/libtk%{tcl_version}.so \
+       ..
+       
+# TODO - MPI
+#-DVTK_Group_MPI:BOOL=ON \
+# Needed for some tests.  Fails to compile at the moment.  We don't run test though.
+#  -DVTK_DATA_ROOT:PATH=%{_datadir}/vtkdata-%{version} \
+# Not working, see http://public.kitware.com/Bug/view.php?id=11978
+# -DVTK_USE_ODBC=ON \
+# Commented old flags in case we'd like to reactive some of them
+# -DVTK_USE_DISPLAY:BOOL=OFF \ # This prevents building of graphics tests
+# -DVTK_USE_MPI:BOOL=ON \
+
+# Got intermittent build error with -j
+make %{?_smp_mflags}
+
+# Remove executable bits from sources (some of which are generated)
+find . -name \*.c -or -name \*.cxx -or -name \*.h -or -name \*.hxx -or \
+       -name \*.gif | xargs chmod -x
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%makeinstall DESTDIR=$RPM_BUILD_ROOT
+pushd build
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# ld config
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d
+echo %{_libdir}/vtk > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/vtk-%{_arch}.conf
+
+# Gather list of non-python/tcl libraries
+ls $RPM_BUILD_ROOT%{_libdir}/vtk/*.so.* \
+  | grep -Ev '(Java|Qt|Python27D|TCL)' | sed -e's,^%{buildroot},,' > libs.list
+
+# List of executable utilities
+cat > utils.list << EOF
+vtkEncodeString
+EOF
+
+# List of executable examples
+cat > examples.list << EOF
+HierarchicalBoxPipeline
+MultiBlock
+Arrays
+Cube
+RGrid
+SGrid
+Medical1
+Medical2
+Medical3
+finance
+AmbientSpheres
+Cylinder
+DiffuseSpheres
+SpecularSpheres
+Cone
+Cone2
+Cone3
+Cone4
+Cone5
+Cone6
+EOF
+
+# Install examples too
+for filelist in examples.list; do
+    for file in `cat $filelist`; do
+	install -p bin/$file $RPM_BUILD_ROOT%{_bindir}
+    done
+done
 
-%if %{_lib} == lib64
-	mkdir -p $RPM_BUILD_ROOT%{_libdir}
-	mv $RPM_BUILD_ROOT%{_prefix}/lib/python%{pyver} $RPM_BUILD_ROOT%{_libdir}/
-	mv $RPM_BUILD_ROOT%{_prefix}/lib/vtk-%{vtkver}/* $RPM_BUILD_ROOT%{_libdir}/vtk-%{vtkver}/
-%endif
-mv $RPM_BUILD_ROOT%{_libdir}/vtk-%{vtkver}/lib*.so* $RPM_BUILD_ROOT%{_libdir}/
+# Fix up filelist paths
+for filelist in utils.list examples.list; do
+  perl -pi -e's,^,%{_bindir}/,' $filelist
+done
 
-rm -f bin/*.so*
-install -m 755 bin/* $RPM_BUILD_ROOT%{_bindir}
-rm -rf doc
-for d in Common Filtering GenericFiltering Graphics Hybrid IO Imaging Parallel Rendering VolumeRendering Widgets
-do
-        install -d -m 755 doc/Testing/$d
-        cp -a $d/Testing/* doc/Testing/$d
+# Remove any remnants of rpaths on files we install
+# Seems to be some kind of java path
+for file in `cat examples.list`; do
+  chrpath -d $RPM_BUILD_ROOT$file
 done
+chrpath -d  $RPM_BUILD_ROOT%{_qt4_plugindir}/designer/libQVTKWidgetPlugin.so
 
-cp -a Examples doc
-find doc -name "*.o" -exec rm {} \;
-find doc -name CMakeCache.txt -exec rm {} \;
-find doc -name Makefile -exec rm {} \;
-find doc -name DartTestfile.txt -exec rm {} \;
-find doc -name .NoDartCoverage -exec rm {} \;
-find doc -name "cmake.*" -exec rm {} \;
+# Main package contains utils and core libs
+cat libs.list utils.list > main.list
+popd
 
-echo "%defattr (-, root, root)" > testing-progs-list
-find ${RPM_BUILD_ROOT}%{_bindir} -type f | \
-        sed -e "s#^${RPM_BUILD_ROOT}##g" | \
-        egrep -v '^%{_bindir}/(vtk|pvtk|vtkWrap.*|vtkParseJava|VTKJavaExecutable|vtkpython|pvtkpython)$' \
-        >> testing-progs-list
+# Make scripts executable
+#chmod a+x %{buildroot}%{_libdir}/vtk/doxygen/*.pl
+#chmod a+x %{buildroot}%{_libdir}/vtk/testing/*.{py,tcl}
 
-tar zxvf %{SOURCE1}
-install -d $RPM_BUILD_ROOT%{_datadir}
-cp -r VTKData $RPM_BUILD_ROOT/%{vtkdata_dir}
+# Remove exec bit from non-scripts and %%doc
+for file in `find %{buildroot} -type f -perm 0755 \
+  | xargs -r file | grep ASCII | awk -F: '{print $1}'`; do
+    head -1 $file | grep '^#!' > /dev/null && continue
+    chmod 0644 $file
+done
+find Utilities/Upgrading -type f | xargs chmod -x
+
+# install VTKdata
+mkdir -p $RPM_BUILD_ROOT%{_datadir}
+pushd $RPM_BUILD_ROOT%{_datadir}
+tar -zpxf %{SOURCE1}
+mv VTK-%{version} %{name}-%{version}
+
+# (Verbosely) fix 0555 permissions
+find . -type f -perm 0555 | xargs -r echo chmod 0755 | sh -x
+# Remove execute bits from not-scripts
+for file in `find . -type f -perm 0755`; do
+  head -1 $file | grep '^#!' > /dev/null && continue
+  chmod 0644 $file
+done
+popd
 
-# Remove any possible verdict docs
-rm -rf %buildroot/%{_libdir}/vtk-%{vtkver}/doc
+# Setup Wrapping docs tree
+rm -rf _docs
+mkdir -p _docs
+cp -pr --parents Wrapping/*/README* _docs/ 
 
+%clean 
+rm -rf $RPM_BUILD_ROOT
 
 %post -p /sbin/ldconfig
-%post tcl -p /sbin/ldconfig
-%post python -p /sbin/ldconfig
-%post qt -p /sbin/ldconfig
+
 %postun -p /sbin/ldconfig
+
+%post tcl -p /sbin/ldconfig
+
 %postun tcl -p /sbin/ldconfig
+
+%post python -p /sbin/ldconfig
+
 %postun python -p /sbin/ldconfig
-%clean 
-rm -rf $RPM_BUILD_ROOT
 
-%files
+%if %{with java}
+%post java -p /sbin/ldconfig
+
+%postun java -p /sbin/ldconfig
+%endif
+
+%post qt -p /sbin/ldconfig
+
+%postun qt -p /sbin/ldconfig
+
+%post qt-tcl -p /sbin/ldconfig
+
+%postun qt-tcl -p /sbin/ldconfig
+
+%post qt-python -p /sbin/ldconfig
+
+%postun qt-python -p /sbin/ldconfig
+
+
+%files -f build/main.list
 %defattr(-,root,root)
-%doc Copyright.txt README.html TestingLogo.gif vtkLogo.jpg
-%{_libdir}/*.so.*
+%doc Copyright.txt README.html vtkLogo.jpg vtkBanner.gif _docs/Wrapping
+%config(noreplace) %{_sysconfdir}/ld.so.conf.d/vtk-%{_arch}.conf
+%{_datadir}/vtk
+%dir %{_libdir}/vtk
 
 %files devel
 %defattr(-,root,root)
 %doc Utilities/Upgrading
-%doc %{_libdir}/vtk-%{vtkver}/doxygen
-%{_includedir}/vtk-%{vtkver}/
-%{_libdir}/*.so
-%{_libdir}/vtk-%{vtkver}/CMake/
-%{_libdir}/vtk-%{vtkver}/*.cmake
-%{_libdir}/vtk-%{vtkver}/hints
-%{qt_designer_plugins_dir}/libQVTKWidgetPlugin.so
-
+%{_bindir}/vtkHashSource
+%{_bindir}/vtkWrapHierarchy
+%{_includedir}/vtk
+%{_libdir}/vtk/*.so
+%{_libdir}/vtk/libvtkWrappingTools.a
+%{_libdir}/cmake/vtk/
+%{_bindir}/vtkParseOGLExt
+%{_docdir}/vtk-6.1/
+%{tcl_sitelib}/vtk/vtktcl.c
 
 %files tcl
 %defattr(-,root,root)
-%dir %{_libdir}/vtk-%{vtkver}/testing
+%{_libdir}/vtk/*TCL.so.*
+%exclude %{_libdir}/vtk/*QtTCL.so.*
 %{_bindir}/vtk
 %{_bindir}/vtkWrapTcl
 %{_bindir}/vtkWrapTclInit
-%{_libdir}/libvtk*TCL.so.*
-%{_libdir}/vtk-%{vtkver}/tcl/
-%{_libdir}/vtk-%{vtkver}/testing/*tcl
-%{_libdir}/vtk-%{vtkver}/pkgIndex.tcl
-
+%{tcl_sitelib}/vtk/
+%exclude %{tcl_sitelib}/vtk/vtktcl.c
 
 %files python
 %defattr(-,root,root)
 %{_bindir}/vtkpython
 %{_bindir}/vtkWrapPython
 %{_bindir}/vtkWrapPythonInit
-%{_libdir}/libvtk*Python*.so.*
-%{_libdir}/python%{pyver}/site-packages/*
-%{_libdir}/vtk-%{vtkver}/testing/*py
+%{_libdir}/vtk/*Python27D.so.*
+%{python_sitearch}/*
+%exclude %{_libdir}/vtk/*QtPython27D.so.*
 
+%if %{with java}
+%files java
+%defattr(-,root,root)
+%{_libdir}/vtk/*Java.so.*
+%{_libdir}/vtk/vtk.jar
+%{_bindir}/vtkParseJava
+%{_bindir}/vtkWrapJava
+%endif
 
 %files qt
 %defattr(-,root,root)
-%{_libdir}/libQVTK.so.*
-
+%{_libdir}/vtk/lib*Qt*.so.*
+%exclude %{_libdir}/vtk/*TCL.so.*
+%exclude %{_libdir}/vtk/*Python27D.so.*
+%{_qt4_plugindir}/designer/libQVTKWidgetPlugin.so
 
-%files examples
+%files qt-python
 %defattr(-,root,root)
-%doc doc/Examples/
-%doc doc/Testing/
+%{_libdir}/vtk/*Python27D.so.*
 
+%files qt-tcl
+%defattr(-,root,root)
+%{_libdir}/vtk/*TCL.so.*
 
-%files testing-progs -f testing-progs-list
+%files testing-progs
+#-f testing-progs-list
 
+%files examples -f build/examples.list
+%defattr(-,root,root)
+%doc vtk-examples/Examples
 
 %files data
 %defattr(-,root,root)
-%{vtkdata_dir}
+%{_datadir}/%{name}-%{version}
 
 
 %changelog
+* Wed Jan 28 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 6.1.0-1
+- updated to 6.1.0
+- built with tcl/tk 8.5.15, libpng 1.6.12 and hdf5 1.8.14
+- added java, qt-tcl and qt-python subpackage
+
 * Mon May 09 2011 Shu KONNO <owa@bg.wakwak.com> 5.4.2-3
 - s/qt-devel/qt4-devel/ at BR:
 - add BR: libxml2-devel