File povray.spec of Package povray

# spec file for package povray
# Copyright (c) 2015 SUSE LINUX 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

%define maj_version 3.7
%define min_version 0.0
Name:           povray
Version:        %{maj_version}.%{min_version}
Release:        0
Summary:        Ray Tracer
License:        AGPL-3.0 and CC-BY-SA-3.0
Group:          Productivity/Graphics/Visualization/Raytracers
Patch1:         povray-
Patch2:         povray-
# make boost link
Patch4:         povray-
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  boost-devel
BuildRequires:  dos2unix
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  xorg-x11-libX11-devel
BuildRequires:  xorg-x11-libXpm-devel
BuildRequires:  pkgconfig(OpenEXR)
BuildRequires:  pkgconfig(libtiff-4)
BuildRequires:  pkgconfig(sdl)
BuildRequires:  pkgconfig(zlib)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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.

%setup -q

# remove inline copies of shared libraries
rm -rf libraries

# add missing standard files
sed -i 's,automake --warnings=all,automake --warnings=all --add-missing,' \

# fix wrong newline encoding
dos2unix -k unix/scripts/*.sh

( cd unix && ./ )
%ifarch %arm
# work around ICE
RPM_OPT_FLAGS="%{optflags} -O1"
CXXFLAGS="%{optflags} -fno-strict-aliasing -Wno-multichar" CFLAGS="$CXXFLAGS" \
    %configure \
    COMPILED_BY="SUSE LINUX GmbH, Nuernberg, Germany" \
    --disable-strip \
    --disable-optimiz \

# fix up paths
sed -i -e 's,^DEFAULT_DIR=.*,DEFAULT_DIR=/usr,' scripts/*
sed -i -e 's,^SYSCONFDIR=.*,SYSCONFDIR=/etc,' scripts/*

make %{?_smp_mflags}

make DESTDIR=%{buildroot} \
     povdocdir=/deleteme \

# this only contains the AUTHORS and changelog files, not the actual
# documentation
rm -rf %{buildroot}/deleteme

# fix wrong permissions
chmod 755 %{buildroot}%{_datadir}/povray-%{maj_version}/scenes/camera/mesh_camera/

%fdupes %{buildroot}/%{_datadir}

%doc AUTHORS LICENSE changes.txt revision.txt
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/%{maj_version}
%config(noreplace) %{_sysconfdir}/%{name}/%{maj_version}/%{name}.*

openSUSE Build Service is sponsored by