#
# Conditional build:
+%bcond_without cups # CUPS support
+%bcond_without openjpeg # JPEG2000 support
%bcond_without static_libs # don't build static libraries
#
Summary: The FOX C++ GUI Toolkit
Summary(pl.UTF-8): FOX - toolkit graficzny w C++
Name: fox
-Version: 1.7.19
-Release: 7
-License: LGPL
+# NOTE: after switching to 1.8.x keep stable (1.8.x) on HEAD and devel (1.9.x) on DEVEL
+Version: 1.7.38
+Release: 1
+License: LGPL v3+ with relinking exemption
Group: X11/Libraries
-Source0: ftp://ftp.fox-toolkit.com/pub/%{name}-%{version}.tar.gz
-# Source0-md5: fb4d0934be26c27c7e76fcbefe2b5d30
+Source0: http://ftp.fox-toolkit.org/pub/%{name}-%{version}.tar.gz
+# Source0-md5: 11bf212e5e995ca19a0e82d86b5349b3
Patch0: %{name}-opt.patch
Patch1: %{name}-link.patch
Patch2: %{name}-Makefile.patch
-Patch3: pkgconfig.patch
URL: http://www.fox-toolkit.org/
BuildRequires: OpenGL-GLU-devel
BuildRequires: autoconf >= 2.59-9
BuildRequires: automake
BuildRequires: bzip2-devel >= 1.0.2
-BuildRequires: cups-devel
+%{?with_cups:BuildRequires: cups-devel}
BuildRequires: doxygen
BuildRequires: libjpeg-devel >= 6b
BuildRequires: libpng-devel >= 1.2.5
BuildRequires: libstdc++-devel
BuildRequires: libtiff-devel >= 3.5.7
BuildRequires: libtool >= 2:1.5
+BuildRequires: libwebp-devel
+%{?with_openjpeg:BuildRequires: openjpeg-devel}
BuildRequires: pkgconfig
BuildRequires: xorg-lib-libXcursor-devel
BuildRequires: xorg-lib-libXext-devel
Requires: libpng-devel >= 1.2.5
Requires: libstdc++-devel
Requires: libtiff-devel >= 3.5.7
+Requires: libwebp-devel
+%{?with_openjpeg:Requires: openjpeg-devel}
Requires: xorg-lib-libXcursor-devel
Requires: xorg-lib-libXext-devel
Requires: xorg-lib-libXft-devel
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p1
%build
%{__libtoolize}
%{__autoconf}
%{__automake}
%configure \
- --enable-cups \
+ %{?with_cups:--enable-cups} \
%{?debug:--enable-debug}%{!?debug:--enable-release} \
- --enable-static=%{?with_static_libs:yes}%{!?with_static_libs:no} \
+ %{?with_openjpeg:--enable-jp2} \
+ --enable-static%{!?with_static_libs:=no} \
+ --enable-webp \
--with-opengl \
- --with-xft \
--with-shape \
- --with-xshm \
--with-xcursor \
+ --with-xft \
+ --with-xim \
--with-xrandr \
- --with-xim
+ --with-xshm
%{__make}
-%{__make} -C doc docs
-
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_datadir},%{_examplesdir}/%{name}-%{version}}
ln -sf libFOX-1.7.so $RPM_BUILD_ROOT%{_libdir}/libFOX.so
-rm -f doc/Makefile* doc/*/Makefile*
-
%{__make} -C tests clean
cp -r tests/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+%{__rm} doc/Makefile* doc/*/Makefile*
+
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS LICENSE_ADDENDUM README
+%attr(755,root,root) %{_bindir}/ControlPanel
%attr(755,root,root) %{_libdir}/libCHART-1.7.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libCHART-1.7.so.0
%attr(755,root,root) %{_libdir}/libFOX-1.7.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libFOX-1.7.so.0
-%attr(755,root,root) %{_bindir}/ControlPanel
+%{_mandir}/man1/ControlPanel.1*
%files progs
%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/Adie.stx
+%attr(755,root,root) %{_bindir}/PathFinder
%attr(755,root,root) %{_bindir}/adie
%attr(755,root,root) %{_bindir}/calculator
-%attr(755,root,root) %{_bindir}/PathFinder
%attr(755,root,root) %{_bindir}/shutterbug
-%attr(755,root,root) %{_bindir}/Adie.stx
-%{_mandir}/man1/*
+%{_mandir}/man1/PathFinder.1*
+%{_mandir}/man1/adie.1*
+%{_mandir}/man1/calculator.1*
+%{_mandir}/man1/shutterbug.1*
%files devel
%defattr(644,root,root,755)
%{_libdir}/libCHART-1.7.la
%{_libdir}/libFOX-1.7.la
%{_includedir}/fox-1.7
-%{_pkgconfigdir}/fox.pc
+%{_pkgconfigdir}/fox17.pc
+%{_mandir}/man1/reswrap.1*
%if %{with static_libs}
%files static