File fltk.spec of Package fltk
#
# spec file for package fltk
#
# 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: fltk
# Migrating Code from FLTK 1.1 to 1.3: http://www.fltk.org/doc-1.3/migration_1_3.html
Version: 1.3.0
Release: 0
Summary: Free C++ GUI Toolkit for the X Window System, OpenGL, and WIN32
License: LGPL-2.1+
Group: Development/Libraries/X11
Url: http://www.fltk.org/
# some of files were updated from CinePaint CVS:
# http://cinepaint.cvs.sourceforge.net/cinepaint/cinepaint-project/fltk/
Source: %{name}-%{version}-source.tar.bz2
Source2: baselibs.conf
Patch0: fltk-as-needed.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: libfltk1 >= %{version}
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: pkgconfig
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
%if 0%{?rhel_version} && 0%{?rhel_version} < 501
BuildRequires: xorg-x11-devel
BuildRequires: xorg-x11-libs
BuildRequires: xorg-x11-Mesa-libGL
BuildRequires: xorg-x11-Mesa-libGLU
%else
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: libXinerama-devel
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLU-devel
%endif
BuildRequires: libjpeg
BuildRequires: libjpeg-devel
BuildRequires: libpng
BuildRequires: libpng-devel
%endif
%if 0%{?suse_version}
BuildRequires: Mesa-devel
BuildRequires: xorg-x11-devel
%if 0%{?suse_version} > 1120
BuildRequires: libjpeg8
%else
BuildRequires: libjpeg
%endif
BuildRequires: libjpeg-devel
BuildRequires: libpng
BuildRequires: libpng-devel
%endif
%if 0%{?mandriva_version}
%ifarch x86_64
BuildRequires: lib64x11_6-devel
BuildRequires: lib64xext6-devel
BuildRequires: lib64xinerama1-devel
BuildRequires: lib64mesagl1-devel
BuildRequires: lib64mesaglu1-devel
%if 0%{?mandriva_version} < 201000
BuildRequires: lib64jpeg62
BuildRequires: lib64jpeg62-devel
%else
BuildRequires: lib64jpeg7
BuildRequires: lib64jpeg-devel
%endif
BuildRequires: lib64png3
BuildRequires: lib64png-devel
%else
BuildRequires: libx11_6-devel
BuildRequires: libxext6-devel
BuildRequires: libxinerama1-devel
BuildRequires: libmesagl1-devel
BuildRequires: libmesaglu1-devel
%if 0%{?mandriva_version} < 201000
BuildRequires: libjpeg62
BuildRequires: libjpeg62-devel
%else
BuildRequires: libjpeg7
BuildRequires: libjpeg-devel
%endif
BuildRequires: libpng3
BuildRequires: libpng-devel
%endif
%endif
%description
The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a C++
graphical user interface toolkit for the X Window System (UNIX(r)),
OpenGL(r), and Microsoft(r) Windows(r) NT 4.0, 95, or 98. The
installation of this package requires you to install a 3D library. If
you do not have hardware 3D, you can use the software OpenGL library in
the mesasoft package (series x3d). The library can be recompiled
without 3D support.
%package devel
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: libfltk1 = %{version}
%if 0%{?suse_version}
BuildRequires: Mesa-devel
BuildRequires: xorg-x11-devel
%endif
%description devel
The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a C++
graphical user interface toolkit for the X Window System (UNIX(r)),
OpenGL(r), and Microsoft(r) Windows(r) NT 4.0, 95, or 98). Installation
of this package requires you to install a 3D library. If you do not
have 3D hardware you can use the software OpenGL library in the
mesasoft package (series x3d). The library can be recompiled without 3D
support.
%package -n libfltk1
Summary: FLTK Library
Group: Development/Libraries/C and C++
%description -n libfltk1
The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a C++
graphical user interface toolkit for the X Window System (UNIX(r)),
OpenGL(r), and Microsoft(r) Windows(r) NT 4.0, 95, or 98. The
installation of this package requires you to install a 3D library. If
you do not have hardware 3D, you can use the software OpenGL library in
the mesasoft package (series x3d). The library can be recompiled
without 3D support.
%prep
%setup -q
%patch0 -p1
%build
export CFLAGS="%optflags -fno-strict-aliasing"
export CXXFLAGS="%optflags -fno-strict-aliasing"
%configure \
--enable-shared --enable-threads
make glflags="-L%{_libdir} -lGL" \
fltkflags="-L%{_libdir} -lfltk" \
%{?_smp_mflags}
cd documentation
make html %{?_smp_mflags}
%install
make install libdir=${RPM_BUILD_ROOT}%{_libdir}/ \
includedir=${RPM_BUILD_ROOT}%{_includedir} \
bindir=${RPM_BUILD_ROOT}%{_bindir} \
docdir=${RPM_BUILD_ROOT}/%{_docdir}/fltk \
mandir=${RPM_BUILD_ROOT}%{_mandir} STRIP=true
rm -r ${RPM_BUILD_ROOT}%{_mandir}/cat*
rm ${RPM_BUILD_ROOT}%{_libdir}/libfltk*.a
%post -n libfltk1 -p /sbin/ldconfig
%postun -n libfltk1 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc CHANGES COPYING README
%files devel
%defattr(-,root,root)
%doc examples documentation/html makeinclude
%{_mandir}/man*/*
%{_libdir}/*.so
%{_includedir}/*
%{_bindir}/*
%files -n libfltk1
%defattr(-,root,root)
%{_libdir}/*.so.*
%changelog