File povray.spec of Package povray

#
# spec file for package povray
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           povray
License:        SUSE-NonFree
Group:          Productivity/Graphics/Visualization/Raytracers
Version:        3.6.9.7
Release:        0
Summary:        Ray Tracer
Url:            http://www.povray.org

Source:         povray-3.7.0.RC7.tar.bz2
Patch1:         povray-%{version}-ini.patch
Patch2:         povray-%{version}-fix.patch
# boost changed TIME_UTC -> TIME_UTC_
Patch3:         povray-%{version}-TIME_UTC_.patch
# make boost link 
Patch4:         povray-%{version}-boost-link.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  automake
BuildRequires:  boost-devel
BuildRequires:  gcc-c++
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  xorg-x11-libXpm-devel
BuildRequires:  xorg-x11-libX11-devel
BuildRequires:  libjpeg-devel
BuildRequires:  zlib-devel
BuildRequires:  libSDL-devel 
BuildRequires:  openexr-devel 

%description
The Persistence of Vision Ray tracer creates three-dimensional,
photo-realistic images using a rendering technique called ray tracing.
It reads in a text file containing information describing the objects
and lighting in a scene and generates an image of that scene from the
view point of a camera also described in the text file. Ray tracing is
not a fast process by any means, (the generation of a complex image can
take several hours) but it produces very high quality images with
realistic reflections, shading, perspective, and other effects.

%prep
%setup -q -n povray-3.7.0.RC7
%patch1
%patch2
# boost changed TIME_UTC -> TIME_UTC_
%if 0%{suse_version} > 1220 
%patch4 
%endif
rm -rf libraries
%build
autoreconf -fi
%ifarch %arm
# work around ICE
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -O1"
%endif
CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-multichar" CFLAGS="$CXXFLAGS"\
%configure COMPILED_BY="SUSE LINUX Products GmbH, Nuernberg, Germany" \
	      --disable-optimiz --with-boost-libdir=%{_libdir} 
make %{?_smp_mflags}
perl -pi -e 's,^DEFAULT_DIR=.*,DEFAULT_DIR=/usr,' scripts/* 
perl -pi -e 's,^SYSCONFDIR=.*,SYSCONFDIR=/etc,' scripts/* 

%install
make DESTDIR=$RPM_BUILD_ROOT \
     povdocdir=%{_defaultdocdir}/%{name} \
     install
#     htmldir=%{_defaultdocdir}/%{name}/html \
#     imagesdir=%{_defaultdocdir}/%{name}/html/images \
#     vfaqdir=%{_defaultdocdir}/%{name}/html/images/vfaq \
mkdir -p $RPM_BUILD_ROOT/etc
install -m 644 povray.conf $RPM_BUILD_ROOT/etc

%files
%defattr(-,root,root)
%config /etc/*
/usr/bin/povray
/usr/share/povray-3.7
%{_mandir}/man*/*
%doc %{_defaultdocdir}/%{name}

%changelog
openSUSE Build Service is sponsored by