]> git.pld-linux.org Git - packages/fltk2.git/blobdiff - fltk2.spec
- build fixed
[packages/fltk2.git] / fltk2.spec
index 78fc3d06501514fc9d5e7239c78f3ca2eb156025..18eec2bb327c9b0fa37bffd5dc5416d130a630ec 100644 (file)
@@ -1,19 +1,29 @@
 %define                _name           fltk
-%define                _snap           r6671
+%define                _snap           r6793
 %define                _version        2.0
+# Conditional build:
+%bcond_with    cairo   # without cairo support
+#
 Summary:       Fast Light Tool Kit 2.x
 Summary(pl.UTF-8):     FLTK - "lekki" X11 toolkit wersja 2.x
 Summary(pt_BR.UTF-8):  Interface gráfica em C++ para X, OpenGL e Windows
 Name:          fltk2
-Version:       2.0.%{_snap}
-Release:       1
+Version:       2.0
+Release:       0.%{_snap}.1
 License:       LGPL with amendments (see COPYING)
 Group:         X11/Libraries
 Source0:       http://ftp.easysw.com/pub/fltk/snapshots/%{_name}-%{_version}.x-%{_snap}.tar.bz2
-# Source0-md5: 6bcef5fd51eb3bc4dd0702f3ae6da6ba
+# Source0-md5: 3e413b2063bdb3d1a6ad4832458d885d
+Patch0:                %{name}-rpath.patch
+Patch1:                %{name}-soname.patch
+Patch2:                %{name}-gcc43.patch
+Patch3:                %{name}-glibc2.10-scandir.patch
 URL:           http://www.fltk.org/
 BuildRequires: autoconf
-BuildRequires: cairo-devel
+BuildRequires: Mesa-libGLU-devel
+# don't build with cairo support if you're planning to use fltk2 with
+# dillo 2.x
+%{?with_cairo:BuildRequires:   cairo-devel}
 BuildRequires: libstdc++-devel
 BuildRequires: rpmbuild(macros) >= 1.315
 BuildRequires: xorg-lib-libX11-devel
@@ -81,12 +91,16 @@ Bibliotecas estáticas para o FLTK2.
 
 %prep
 %setup -q -n %{_name}-%{_version}.x-%{_snap}
+%patch0 -p0
+%patch1 -p0
+%patch2 -p1
+%patch3 -p0
 
 %build
 %{__sed} -i -e '/fltk2-config/s/^\t/\t$(DESTDIR)/' fluid/Makefile
 %{__autoconf}
 %configure \
-       --enable-cairo \
+       --%{?with_cairo:en}%{!?with_cairo:dis}able-cairo \
        --enable-shared \
        --enable-threads \
        --enable-xinerama \
@@ -110,6 +124,14 @@ install -d $RPM_BUILD_ROOT%{_mandir}/man{1,3}
 %{__mv} documentation/fluid.man $RPM_BUILD_ROOT%{_mandir}/man1/fluid.1
 %{__mv} documentation/fltk.man $RPM_BUILD_ROOT%{_mandir}/man3/fltk.3
 
+# broken so linking, the idea stolen from
+# https://bugzilla.redhat.com/show_bug.cgi?id=477683
+ln -fs $(basename $RPM_BUILD_ROOT%{_libdir}/libfltk2.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libfltk2.so
+ln -fs $(basename $RPM_BUILD_ROOT%{_libdir}/libfltk2.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libfltk2.so
+ln -fs $(basename $RPM_BUILD_ROOT%{_libdir}/libfltk2_gl.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libfltk2_gl.so
+ln -fs $(basename $RPM_BUILD_ROOT%{_libdir}/libfltk2_glut.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libfltk2_glut.so
+ln -fs $(basename $RPM_BUILD_ROOT%{_libdir}/libfltk2_images.so.*.*) $RPM_BUILD_ROOT%{_libdir}/libfltk2_images.so
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
This page took 0.089858 seconds and 4 git commands to generate.