+# TODO: enable cairo support?
#
# Conditional build:
%bcond_without opengl # without OpenGL libraries
Summary(pl.UTF-8): FLTK - "lekki" X11 toolkit
Summary(pt_BR.UTF-8): Interface gráfica em C++ para X, OpenGL e Windows
Name: fltk
-Version: 1.3.0
+Version: 1.3.3
Release: 1
-License: LGPL with amendments (see COPYING)
+License: LGPL v2 with amendments (see COPYING)
Group: X11/Libraries
-Source0: http://ftp.easysw.com/pub/fltk/%{version}/%{name}-%{version}-source.tar.gz
-# Source0-md5: 44d5d7ba06afdd36ea17da6b4b703ca3
-Source1: http://ftp.easysw.com/pub/fltk/%{version}/%{name}-%{version}-docs-html.tar.gz
-# Source1-md5: ee79155cffc211e1d70a3ad8d3f170ef
+Source0: http://fltk.org/pub/fltk/%{version}/%{name}-%{version}-source.tar.gz
+# Source0-md5: 9ccdb0d19dc104b87179bd9fd10822e3
Patch0: %{name}-desktop.patch
-Patch1: %{name}-1.3.0-as-needed.patch
-#Patch2: %{name}-1.1.9-glibc2.10-scandir.patch
-Patch3: %{name}-link.patch
+Patch1: %{name}-as-needed.patch
+Patch2: %{name}-link.patch
+Patch3: %{name}-libjpeg.patch
+Patch4: %{name}-export.patch
URL: http://www.fltk.org/
%{?with_opengl:BuildRequires: OpenGL-GLU-devel}
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.50
+BuildRequires: doxygen
BuildRequires: groff
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libstdc++-devel
BuildRequires: rpmbuild(macros) >= 1.315
+BuildRequires: xorg-lib-libXext-devel
%{?with_xft:BuildRequires: xorg-lib-libXft-devel}
BuildRequires: xorg-lib-libXinerama-devel
BuildRequires: xorg-util-makedepend
Obsoletes: libfltk1.1
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _noautoreqdep libGL.so.1 libGLU.so.1
-
# don't propagate strip-flags to fltk-config.
%define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.*
Gry FLTK: Atak Klocków!, Warcaby, Sudoku.
%prep
-%setup -q -a1
+%setup -q
%patch0 -p1
%patch1 -p1
-#%patch2 -p1
+%patch2 -p1
%patch3 -p1
-
-#install %{SOURCE1} .
+%patch4 -p1
%build
+# gold doesn't understand -l:path/to/library.so
+if [ -x /usr/bin/ld.bfd ]; then
+ install -d ld-dir
+ ln -sf /usr/bin/ld.bfd ld-dir/ld
+ export PATH=$(pwd)/ld-dir:$PATH
+fi
%{__autoconf}
%configure \
--enable-largefile \
%{?with_xft:--enable-xft}
%{__make}
+cd documentation
+%{__make} html
%install
rm -rf $RPM_BUILD_ROOT
# less generic games' names
for f in blocks checkers sudoku ; do
-mv -f $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f}
-mv -f $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f}
+%{__mv} $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6
done
+# we package mans in groff format
+%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/cat?
+
# add link to documentation for fluid help; remove /usr/share/doc/fltk contents - it is installed during make install
-rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
ln -sf %{name}-devel-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
%clean
%files devel
%defattr(644,root,root,755)
-%doc fltk-%{version}/documentation/html/*.{html,jpg,png}
+%doc documentation/html/*.{html,jpg,png}
%doc %{_datadir}/doc/%{name}
%attr(755,root,root) %{_bindir}/fltk-config
%attr(755,root,root) %{_bindir}/fluid
%attr(755,root,root) %{_libdir}/libfltk_forms.so
%attr(755,root,root) %{_libdir}/libfltk_images.so
%{_includedir}/FL
-%exclude %{_includedir}/FL/Fl_Gl_Window.*
+%exclude %{_includedir}/FL/Fl_Gl_Window.H
%exclude %{_includedir}/FL/gl*
-%{_iconsdir}/*/*/*/fluid.png
+%{_iconsdir}/hicolor/*/apps/fluid.png
%{_desktopdir}/fluid.desktop
# move to some KDE package?
#%{_datadir}/mimelnk/application/x-fluid.desktop
%files gl-devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libfltk_gl.so
-%{_includedir}/FL/Fl_Gl_Window.*
+%{_includedir}/FL/Fl_Gl_Window.H
%{_includedir}/FL/gl*
%files gl-static