File fltk.spec of Package fltk
#
# spec file for package fltk
#
# Copyright (c) 2015 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.3
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/
Source: http://fltk.org/pub/fltk/%{version}/fltk-%{version}-source.tar.gz
Source2: baselibs.conf
# PATCH-FIX-UPSTREAM fltk-1.3.2-do_not_add_unneeded_extra_dependencies.patch http://www.fltk.org/str.php?L2918 reddwarf@opensuse.org -- Don't ask dependent libraries to link against Xft without need. Broke games/toycars.
Patch0: fltk-1.3.2-do_not_add_unneeded_extra_dependencies.patch
# PATCH-FIX-OPENSUSE fltk-1.3.2-verbose_build.patch reddwarf@opensuse.org -- Make the build verbose so the post build checks can verify the CFLAGS
Patch2: fltk-1.3.2-verbose_build.patch
# PATCH-FIX-UPSTREAM fltk-1.3.3-do-not-use-internal-ABI.patch dimstar@opensuse.org -- Do not use internal functions
Patch3: fltk-1.3.3-do-not-use-internal-ABI.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: libjpeg-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xft)
BuildRequires: pkgconfig(xinerama)
%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}
Provides: fltk = %{version}
Requires: pkgconfig(gl)
Requires: pkgconfig(x11)
%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: System/Libraries
Obsoletes: fltk < 1.3.2
%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.
%package devel-static
Summary: Static Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: fltk-devel = %{version}
Requires: libfltk1 = %{version}
%description devel-static
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.
%prep
%setup -q
%patch0
%patch2
%patch3 -p0
%build
%configure \
--enable-shared --enable-threads
make %{?_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-devel/html/ \
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 devel
%defattr(-,root,root)
%doc examples makeinclude
%{_mandir}/man*/*
%{_libdir}/*.so
%{_includedir}/*
%{_bindir}/*
%files -n libfltk1
%defattr(-,root,root)
%doc CHANGES COPYING README
%{_libdir}/*.so.*
%files devel-static
%defattr(0644,root,root)
%{_libdir}/libfltk*.a
%changelog