From cca3c248421a6cca5e83c982acbe7066456487e8 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: May 12 2007 21:47:14 +0000 Subject: - *really* fix --rpath issue, using non-empty patch this time (#238284) --- diff --git a/.cvsignore b/.cvsignore index fa4dc85..f344422 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,3 @@ fltk-1.1.7-source.tar.bz2 +fltk-1.1.x-r5555.tar.bz2 +fltk-1.1.x-r5750.tar.bz2 diff --git a/fltk-1.1.7-test.patch b/fltk-1.1.7-test.patch new file mode 100644 index 0000000..d36ec76 --- /dev/null +++ b/fltk-1.1.7-test.patch @@ -0,0 +1,21 @@ +--- fltk-1.1.7/Makefile.test 2006-01-15 12:36:16.000000000 -0600 ++++ fltk-1.1.7/Makefile 2006-12-12 00:34:49.000000000 -0600 +@@ -27,7 +27,7 @@ + + include makeinclude + +-DIRS = $(IMAGEDIRS) src fluid test documentation ++DIRS = $(IMAGEDIRS) src fluid documentation + + all: makeinclude + for dir in $(DIRS); do\ +@@ -35,6 +35,9 @@ + (cd $$dir; $(MAKE) $(MFLAGS)) || break;\ + done + ++test: ++ (cd test;; $(MAKE) $(MFLAGS)) || exit 1 ++ + install: makeinclude + -mkdir -p $(DESTDIR)$(bindir) + $(RM) $(DESTDIR)$(bindir)/fltk-config diff --git a/fltk-1.1.x-r5750-199656.patch b/fltk-1.1.x-r5750-199656.patch new file mode 100644 index 0000000..de79758 --- /dev/null +++ b/fltk-1.1.x-r5750-199656.patch @@ -0,0 +1,17 @@ +--- fltk-1.1.x-r5750/fltk-config.in.199656 2007-03-06 14:00:04.000000000 -0600 ++++ fltk-1.1.x-r5750/fltk-config.in 2007-04-05 07:36:57.000000000 -0500 +@@ -54,10 +54,10 @@ + + # flags for C++ compiler: + ARCHFLAGS="@ARCHFLAGS@" +-CFLAGS="@CFLAGS@ @LARGEFILE@ @PTHREAD_FLAGS@" +-CXXFLAGS="@CXXFLAGS@ @LARGEFILE@ @PTHREAD_FLAGS@" +-LDFLAGS="@LDFLAGS@" +-LDLIBS="@LIBS@" ++#CFLAGS="@CFLAGS@ @LARGEFILE@ @PTHREAD_FLAGS@" ++#CXXFLAGS="@CXXFLAGS@ @LARGEFILE@ @PTHREAD_FLAGS@" ++#LDFLAGS="@LDFLAGS@" ++#LDLIBS="@LIBS@" + OPTIM="@OPTIM@" + + # Check for local invocation, and update paths accordingly... diff --git a/fltk-1.1.x-r5750-rpath.patch b/fltk-1.1.x-r5750-rpath.patch new file mode 100644 index 0000000..820ab1f --- /dev/null +++ b/fltk-1.1.x-r5750-rpath.patch @@ -0,0 +1,30 @@ +--- fltk-1.1.x-r5750/configure.in.rpath 2007-02-10 15:21:02.000000000 -0600 ++++ fltk-1.1.x-r5750/configure.in 2007-04-29 12:47:29.000000000 -0500 +@@ -180,9 +180,9 @@ + GLDSONAME="libfltk_gl.so.$FL_API_VERSION" + IMGDSONAME="libfltk_images.so.$FL_API_VERSION" + DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o" +- if test "x$libdir" != "x/usr/lib"; then +- DSOLINK="-Wl,-rpath,$libdir" +- fi ++# if test "x$libdir" != "x/usr/lib"; then ++# DSOLINK="-Wl,-rpath,$libdir" ++# fi + ;; + AIX*) + DSONAME="libfltk_s.a" +--- fltk-1.1.x-r5750/configure.rpath 2007-03-23 00:00:35.000000000 -0500 ++++ fltk-1.1.x-r5750/configure 2007-04-29 12:47:59.000000000 -0500 +@@ -1482,9 +1482,9 @@ + GLDSONAME="libfltk_gl.so.$FL_API_VERSION" + IMGDSONAME="libfltk_images.so.$FL_API_VERSION" + DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o" +- if test "x$libdir" != "x/usr/lib"; then +- DSOLINK="-Wl,-rpath,$libdir" +- fi ++# if test "x$libdir" != "x/usr/lib"; then ++# DSOLINK="-Wl,-rpath,$libdir" ++# fi + ;; + AIX*) + DSONAME="libfltk_s.a" diff --git a/fltk-1.1.x-r5750-undefined.patch b/fltk-1.1.x-r5750-undefined.patch new file mode 100644 index 0000000..8f51c95 --- /dev/null +++ b/fltk-1.1.x-r5750-undefined.patch @@ -0,0 +1,11 @@ +--- fltk-1.1.x-r5750/src/Makefile.undefined 2007-02-10 08:31:12.000000000 -0600 ++++ fltk-1.1.x-r5750/src/Makefile 2007-04-05 07:51:31.000000000 -0500 +@@ -282,7 +282,7 @@ + + libfltk_gl.so.1.1: $(GLOBJECTS) libfltk.so.1.1 + echo $(DSOCOMMAND) $@ ... +- $(DSOCOMMAND) $@ $(GLOBJECTS) -L. -lfltk ++ $(DSOCOMMAND) $@ $(GLOBJECTS) -L. $(GLDLIBS) -lfltk + $(RM) libfltk_gl.so + $(LN) libfltk_gl.so.1.1 libfltk_gl.so + diff --git a/fltk.spec b/fltk.spec index 323082f..f605217 100644 --- a/fltk.spec +++ b/fltk.spec @@ -1,91 +1,148 @@ -Summary: C++ user interface toolkit for X11, Win32, and MacOS X + +%define snap r5750 +#define _disable_static --disable-static + +Summary: C++ user interface toolkit Name: fltk -Version: 1.1.7 -Release: 2%{?dist} +Version: 1.1.8 +Release: 0.3.%{snap}%{?dist} License: LGPL with exceptions Group: System Environment/Libraries URL: http://www.fltk.org/ -Source0: http://ftp.easysw.com/pub/fltk/%{version}/%{name}-%{version}-source.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot -BuildRequires: libjpeg-devel zlib-devel libpng-devel libXt-devel libX11-devel -BuildRequires: xorg-x11-proto-devel libXft-devel libSM-devel libICE-devel -BuildRequires: mesa-libGL-devel mesa-libGLU-devel libXext-devel -BuildRequires: pkgconfig -BuildRequires: ImageMagick desktop-file-utils man +%if "%{?snap:1}" == "1" +Source0: ftp://ftp3.easysw.com/pub/fltk/snapshots/fltk-1.1.x-%{snap}.tar.bz2 +%else +Source0: http://ftp3.easysw.com/pub/fltk/%{version}/%{name}-%{version}-source.tar.bz2 +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# omit extraneous bits from fltk-config --cflags|--libs (http://bugzilla.redhat.com/199656) +Patch1: fltk-1.1.x-r5750-199656.patch +Patch2: fltk-1.1.7-test.patch +# libfltk_gl.so had undefined symbols +Patch3: fltk-1.1.x-r5750-undefined.patch +# nuke --rpath (#238284) +Patch4: fltk-1.1.x-r5750-rpath.patch + +%if 0%{?rhel} > 4 || 0%{?fedora} > 4 +BuildRequires: libICE-devel libSM-devel +BuildRequires: libXext-devel libXinerama-devel libXft-devel libXt-devel libX11-devel +BuildRequires: xorg-x11-proto-devel xorg-x11-utils +%else +BuildRequires: xorg-x11-devel +%endif +BuildRequires: libjpeg-devel +BuildRequires: zlib-devel +BuildRequires: libpng-devel +BuildRequires: libGL-devel libGLU-devel +BuildRequires: pkgconfig +BuildRequires: desktop-file-utils +BuildRequires: man + +%description +FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit. +It provides modern GUI functionality without the bloat, and supports +3D graphics via OpenGL and its built-in GLUT emulation. + %package devel -Summary: Development package for %{name} +Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: libstdc++-devel -Requires: libXft-devel libXext-devel mesa-libGL-devel mesa-libGLU-devel +Requires: libGL-devel libGLU-devel +%if 0%{?rhel} > 4 || 0%{?fedora} > 4 +Requires: libXft-devel libXext-devel Requires: libX11-devel libSM-devel libICE-devel +%else +Requires: xorg-x11-devel +%endif +%description devel +%{summary}. %package fluid Summary: Fast Light User Interface Designer Group: Development/Tools Requires: %{name}-devel = %{version}-%{release} +%description fluid +%{summary}, an interactive GUI designer for %{name}. -%description -FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for -UNIX/Linux (X11), Microsoft Windows, and Mac OS X. It provides modern -GUI functionality without the bloat, and supports 3D graphics via -OpenGL and its built-in GLUT emulation. FLTK is designed to be small -and modular enough to be statically linked, and also works fine as a -shared library. +%prep +%if "%{?snap:1}" == "1" +%setup -q -n fltk-1.1.x-%{snap} +%else +%setup -q +%endif -%description devel -This package contains development files for %{name} -FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for -UNIX/Linux (X11), Microsoft Windows, and Mac OS X. It provides modern -GUI functionality without the bloat, and supports 3D graphics via -OpenGL and its built-in GLUT emulation. +%patch1 -p1 -b .199656 +%patch2 -p1 -b .test +%patch3 -p1 -b .undefined +%patch4 -p1 -b .rpath -%description fluid -fluid stands for the Fast Light User Interface Designer. It is an -interactive GUI designer for FLTK. +%build -%prep -%setup -q -n %{name}-%{version}%{?extraversion} +# using --with-optim, so unset CFLAGS/CXXFLAGS +export CFLAGS=" " +export CXXFLAGS=" " +%configure \ + %{?_disable_static} \ + --with-optim="%{optflags}" \ + --enable-shared \ + --enable-threads \ + --enable-xdbe \ + --enable-xinerama \ + --enable-xft -%build -perl -pi -e "s^\\\$prefix/share/doc/fltk^$RPM_DOC_DIR/%{name}-devel-%{version}^" configure -export CPPFLAGS="$(pkg-config xft --cflags)" -export LDFLAGS="$(pkg-config xft --libs)" -%configure --enable-shared --enable-threads --enable-xdbe --enable-xft make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT __documentation -%makeinstall docdir=$(pwd)/__documentation +rm -rf $RPM_BUILD_ROOT + +# Makefile hack for 64bitness +%if "%{_lib}" != "lib" +mkdir -p $RPM_BUILD_ROOT%{_libdir} +pushd $RPM_BUILD_ROOT%{_libdir}/.. +ln -s %{_lib} lib +popd +%endif + +make install install-desktop DESTDIR=$RPM_BUILD_ROOT + +# Makefile hack for 64bitness +%if "%{_lib}" != "lib" +rm -f $RPM_BUILD_ROOT%{_libdir}/../lib +%endif + +desktop-file-install --vendor=%{name} \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + --add-category="Development" \ + --add-category="GUIDesigner" \ + --delete-original \ + $RPM_BUILD_ROOT%{_datadir}/applnk/Development/*.desktop + +# docs +rm -rf __docs +mv $RPM_BUILD_ROOT%{_docdir}/fltk __docs + +## unpackaged files +# errant docs rm -rf $RPM_BUILD_ROOT%{_mandir}/cat* +# static libs +%if "%{?_disable_static:1}" == "1" +rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a +%endif +# omit examples/games: +make -C test uninstall-linux DESTDIR=$RPM_BUILD_ROOT +rm -f $RPM_BUILD_ROOT%{_mandir}/man?/{blocks,checkers,sudoku}* -cat > fluid.desktop < /dev/null ||: +update-desktop-database >& /dev/null ||: + +%postun fluid +touch --no-create %{_datadir}/icons/hicolor ||: +gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||: +update-desktop-database >& /dev/null ||: + + %files %defattr(-,root,root,-) %doc ANNOUNCEMENT CHANGES COPYING CREDITS README @@ -105,18 +174,20 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root,-) -%doc __documentation/* +%doc __docs/* %{_bindir}/fltk-config -%{_includedir}/FL +%{_includedir}/FL/ %{_includedir}/Fl -%{_libdir}/libfltk.a %{_libdir}/libfltk.so -%{_libdir}/libfltk_forms.a %{_libdir}/libfltk_forms.so -%{_libdir}/libfltk_gl.a %{_libdir}/libfltk_gl.so -%{_libdir}/libfltk_images.a %{_libdir}/libfltk_images.so +%if "%{?_disable_static:1}" != "1" +%{_libdir}/libfltk.a +%{_libdir}/libfltk_forms.a +%{_libdir}/libfltk_gl.a +%{_libdir}/libfltk_images.a +%endif %{_mandir}/man1/fltk-config.1* %{_mandir}/man3/fltk.3* @@ -125,10 +196,46 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/fluid %{_mandir}/man1/fluid.1* %{_datadir}/applications/*fluid.desktop -%{_datadir}/pixmaps/fluid.png +%{_datadir}/icons/hicolor/*/*/* +# FIXME +%{_datadir}/mimelnk/*/*.desktop %changelog +* Sun Apr 29 2007 Rex Dieter 1.1.8-0.3.r5750 +- *really* fix --rpath issue, using non-empty patch this time (#238284) + +* Sun Apr 29 2007 Rex Dieter 1.1.8-0.2.r5750 +- nuke --rpath (#238284) + +* Thu Apr 05 2007 Rex Dieter 1.1.8-0.1.r5750 +- fltk-1.1.x-r5750 snapshot (1.1.8 pre-release) +- --enable-xinerama +- patch for undefined symbols in libfltk_gl + +* Wed Apr 4 2007 Thomas Fitzsimmons - 1.1.7-9.r5555 +- Always apply fltk-config patch (#199656) +- Update fltk-1.1.7-config.patch + +* Wed Dec 13 2006 Rex Dieter 1.1.7-8.r5555 +- more 64bit hackage to workaround broken Makefile logic (#219348) + +* Wed Dec 13 2006 Rex Dieter 1.1.7-7.r5555 +- fltk-1.1.x-r5555 snapshot, for 64bit issues (#219348) +- restore static libs (they're tightly coupled with fltk-config) +- cleanup %%description's + +* Mon Dec 11 2006 Rex Dieter 1.1.7-6 +- move tests to %%check section + +* Mon Dec 11 2006 Rex Dieter 1.1.7-5 +- use included icon/.desktop files +- fix up fltk-config (#199656) + +* Mon Dec 11 2006 Rex Dieter 1.1.7-3 +- follow icon spec +- omit static libs + * Wed Sep 06 2006 Michael J. Knox - 1.1.7-2 - rebuild for FC6 diff --git a/sources b/sources index 3d8f3e2..95d5fd8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2e29319119adc9d63b2f26b72cae0a88 fltk-1.1.7-source.tar.bz2 +aa00ebba4fdec4ebab2881537b7d626f fltk-1.1.x-r5750.tar.bz2