---- fltk-1.1.3/src/Makefile.orig Thu Jan 30 21:43:17 2003
-+++ fltk-1.1.3/src/Makefile Tue May 13 14:36:19 2003
-@@ -232,7 +232,7 @@
+--- fltk-1.1.3/src/Makefile.orig 2003-01-30 22:43:17.000000000 +0100
++++ fltk-1.1.3/src/Makefile 2003-05-16 21:53:12.000000000 +0200
+@@ -200,7 +200,7 @@
- libfltk_forms.so.1.1: $(FLOBJECTS)
+ libfltk.so.1.1: $(OBJECTS)
+ echo $(DSOCOMMAND) $@ ...
+- $(DSOCOMMAND) $@ $(OBJECTS) $(IMAGELIBS)
++ $(DSOCOMMAND) $@ $(OBJECTS) $(LDLIBS)
+ -$(RM) libfltk.so
+ $(LN) libfltk.so.1.1 libfltk.so
+
+@@ -230,9 +230,9 @@
+ $(LIBCOMMAND) $@ $(FLOBJECTS)
+ $(RANLIB) $@
+
+-libfltk_forms.so.1.1: $(FLOBJECTS)
++libfltk_forms.so.1.1: $(FLOBJECTS) libfltk.so.1.1
echo $(DSOCOMMAND) $@ ...
- $(DSOCOMMAND) $@ $(FLOBJECTS)
-+ $(DSOCOMMAND) $@ $(FLOBJECTS) -L. -lfltk
++ $(DSOCOMMAND) $@ $(FLOBJECTS) -L. -lfltk $(LDLIBS) $(IMAGELIBS)
-$(RM) libfltk_forms.so
$(LN) libfltk_forms.so.1.1 libfltk_forms.so
-@@ -264,7 +264,7 @@
+@@ -262,9 +262,9 @@
+ $(LIBCOMMAND) $@ $(GLOBJECTS)
+ $(RANLIB) $@
- libfltk_gl.so.1.1: $(GLOBJECTS)
+-libfltk_gl.so.1.1: $(GLOBJECTS)
++libfltk_gl.so.1.1: $(GLOBJECTS) libfltk.so.1.1
echo $(DSOCOMMAND) $@ ...
- $(DSOCOMMAND) $@ $(GLOBJECTS)
-+ $(DSOCOMMAND) $@ $(GLOBJECTS) -L. -lfltk -L/usr/X11R6/lib -lGL
++ $(DSOCOMMAND) $@ $(GLOBJECTS) -L. -lfltk $(GLDLIBS)
-$(RM) libfltk_gl.so
$(LN) libfltk_gl.so.1.1 libfltk_gl.so
-@@ -296,7 +296,7 @@
+@@ -294,9 +294,9 @@
+ $(LIBCOMMAND) $@ $(IMGOBJECTS)
+ $(RANLIB) $@
- libfltk_images.so.1.1: $(IMGOBJECTS)
+-libfltk_images.so.1.1: $(IMGOBJECTS)
++libfltk_images.so.1.1: $(IMGOBJECTS) libfltk.so.1.1
echo $(DSOCOMMAND) $@ ...
- $(DSOCOMMAND) $@ $(IMGOBJECTS)
-+ $(DSOCOMMAND) $@ $(IMGOBJECTS) -L. -lfltk
++ $(DSOCOMMAND) $@ $(IMGOBJECTS) -L. -lfltk $(LDLIBS) $(IMAGELIBS)
-$(RM) libfltk_images.so
$(LN) libfltk_images.so.1.1 libfltk_images.so
+--- fltk-1.1.3/configure.in.orig 2003-01-30 22:38:18.000000000 +0100
++++ fltk-1.1.3/configure.in 2003-05-16 21:46:27.000000000 +0200
+@@ -169,7 +169,7 @@
+ FLDSONAME="libfltk_forms.so.$FL_API_VERSION"
+ GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
+ IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
+- DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
++ DSOCOMMAND="\$(CXX) -Wl,-soname,\$@ -shared -fPIC $DEBUGFLAG -o"
+ if test "$libdir" != "/usr/lib"; then
+ DSOLINK="-Wl,-rpath,$libdir"
+ fi
+@@ -649,22 +649,7 @@
+ # Previous versions of GCC do not have the reliance on the stdc++
+ # or g++ libraries, so the extra supc++ library is not needed.
+
+- AC_MSG_CHECKING(if libsupc++ is required)
+-
+- SUPC="`$CXX -print-file-name=libsupc++.a 2>/dev/null`"
+- case "$SUPC" in
+- libsupc++.a*)
+- # Library not found, so this is and older GCC...
+- AC_MSG_RESULT(no)
+- ;;
+- *)
+- # This is gcc 3.x, and it knows of libsupc++, so we need it
+- LIBS="$LIBS -lsupc++"
+- AC_MSG_RESULT(yes)
+- ;;
+- esac
+-
+- CXX="$CC"
++ # PLD: we link all C++ programs against the same version of shared libstdc++.
+
+ # Show all standard warnings + unused variables when compiling...
+ OPTIM="-Wall -Wunused $OPTIM"
#
# Conditional build:
-# _without_gl - without OpenGL support
+# _without_gl - without OpenGL libraries
+# _without_xft - without Xft support
#
Summary: Fast Light Tool Kit
Summary(pl): FLTK - "lekki" X11 toolkit
Source0: ftp://ftp.easysw.com/pub/%{name}/%{version}/%{name}-%{version}-source.tar.bz2
Source1: http://www.fltk.org/doc-1.1/%{name}.ps.gz
Patch0: %{name}-link.patch
+Patch1: %{name}-acfix.patch
URL: http://www.fltk.org/
%{!?_without_gl:BuildRequires: OpenGL-devel}
BuildRequires: XFree86-devel >= 3.3.6
-BuildRequires: gcc-c++
-%{!?_without_gl:Requires: OpenGL}
+BuildRequires: autoconf
+BuildRequires: libstdc++-devel
+%{!?_without_xft:BuildRequires: xft-devel}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Obsoletes: libfltk1.1
%description static -l pt_BR
Bibliotecas estáticas para o FLTK.
+%package gl
+Summary: FLTK GL library
+Summary(pl): Biblioteka FLTK GL
+Group: X11/Libraries
+Requires: %{name} = %{version}
+Requires: OpenGL
+
+%description gl
+FLTK GL library.
+
+%description gl -l pl
+Biblioteka FLTK GL.
+
+%package gl-devel
+Summary: Header files for FLTK GL library
+Summary(pl): Pliki nag³ówkowe biblioteki FLTK GL
+Group: X11/Development/Libraries
+Requires: %{name}-devel = %{version}
+Requires: %{name}-gl = %{version}
+
+%description gl-devel
+Header files for FLTK GL library.
+
+%description gl-devel -l pl
+Pliki nag³ówkowe biblioteki FLTK GL.
+
+%package gl-static
+Summary: FLTK GL static library
+Summary(pl): Statyczna biblioteka FLTK GL
+Group: X11/Development/Libraries
+Requires: %{name}-gl-devel = %{version}
+Requires: %{name}-static = %{version}
+
+%description gl-static
+FLTK GL static library.
+
+%description gl-static -l pl
+Statyczna biblioteka FLTK GL.
+
%prep
%setup -q
-%patch -p1
+%patch0 -p1
+%patch1 -p1
install %{SOURCE1} .
%build
CPPFLAGS="-I/usr/X11R6/include"
+CXXFLAGS="%{rpmcflags} -I/usr/include/freetype2"
+# no "-s" in LDFLAGS, they are propagated to fltk-config
+# (together with -L/usr/X11R6/lib, so cannot be removed)
+LDFLAGS=" "
+%{__autoconf}
%configure \
--enable-shared \
--with-x \
- %{?_without_gl:--disable-gl}
+ %{?_without_gl:--disable-gl} \
+ %{!?_without_xft:--enable-xft}
%{__make} depend
%{__make}
%defattr(644,root,root,755)
# note: COPYING contains amendments to LGPL, so don't remove!
%doc CHANGES COPYING CREDITS README
-%attr(755,root,root) %{_libdir}/lib*.so.*.*
+%attr(755,root,root) %{_libdir}/libfltk.so.*.*
+%attr(755,root,root) %{_libdir}/libfltk_forms.so.*.*
+%attr(755,root,root) %{_libdir}/libfltk_images.so.*.*
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/fltk-config
%attr(755,root,root) %{_bindir}/fluid
%attr(755,root,root) %{_libdir}/libfltk.so
+%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/gl*
%{_mandir}/man[13]/*
%files static
%defattr(644,root,root,755)
-%attr(644,root,root) %{_libdir}/lib*.a
+%attr(644,root,root) %{_libdir}/libfltk.a
+%attr(644,root,root) %{_libdir}/libfltk_forms.a
+%attr(644,root,root) %{_libdir}/libfltk_images.a
+
+%if 0%{!?_without_gl:1}
+%files gl
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libfltk_gl.so.*.*
+
+%files gl-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libfltk_gl.so
+%{_includedir}/FL/Fl_Gl_Window.*
+%{_includedir}/FL/gl*
+
+%files gl-static
+%defattr(644,root,root,755)
+%attr(644,root,root) %{_libdir}/libfltk_gl.a
+%endif