- unbreak fltk-config --ldstaticflags (#500201)

- (another?) gcc44 patch
- -devel: +Provides: %name-static
- fix multiarch conflicts (#341141)
This commit is contained in:
Rex Dieter 2009-05-13 15:37:43 +00:00
parent b8cb1977df
commit 4d5fa974b1
7 changed files with 91 additions and 52 deletions

View File

@ -0,0 +1,30 @@
diff -up fltk-1.1.9/fltk-config.in.ldstaticflags fltk-1.1.9/fltk-config.in
--- fltk-1.1.9/fltk-config.in.ldstaticflags 2008-02-20 12:10:13.000000000 -0600
+++ fltk-1.1.9/fltk-config.in 2009-05-13 10:23:15.071926233 -0500
@@ -57,7 +57,7 @@ ARCHFLAGS="@ARCHFLAGS@"
CFLAGS="@CFLAGS@ @LARGEFILE@ @PTHREAD_FLAGS@"
CXXFLAGS="@CXXFLAGS@ @LARGEFILE@ @PTHREAD_FLAGS@"
LDFLAGS="@LDFLAGS@"
-LDLIBS="@LIBS@"
+LDSTATICLIBS="@LIBS@"
OPTIM="@OPTIM@"
# Check for local invocation, and update paths accordingly...
@@ -216,7 +216,7 @@ else
includes=
fi
-if test "$libdir" != /usr/lib -a "$libdir" != /usr/lib32; then
+if test "$libdir" != /usr/lib -a "$libdir" != /usr/lib32 -a "$libdir" != /usr/lib64; then
libs=-L$libdir
else
libs=
@@ -240,7 +240,7 @@ if test x$use_images = xyes; then
fi
LDLIBS="$DSOLINK $LDFLAGS $libs $LDLIBS"
-LDSTATIC="$LDFLAGS $LDSTATIC"
+LDSTATIC="$LDFLAGS $LDSTATIC $LDSTATICLIBS"
# Answer to user requests
if test -n "$echo_help"; then

12
fltk-1.1.9-gcc44.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up fltk-1.1.9/src/filename_list.cxx.gcc44 fltk-1.1.9/src/filename_list.cxx
--- fltk-1.1.9/src/filename_list.cxx.gcc44 2006-06-09 11:16:34.000000000 -0500
+++ fltk-1.1.9/src/filename_list.cxx 2009-05-13 09:46:42.372917879 -0500
@@ -67,7 +67,7 @@ int fl_filename_list(const char *d, dire
// The vast majority of UNIX systems want the sort function to have this
// prototype, most likely so that it can be passed to qsort without any
// changes:
- int n = scandir(d, list, 0, (int(*)(const void*,const void*))sort);
+ int n = scandir(d, list, 0, (int(*)(const dirent **,const dirent **))sort);
#else
// This version is when we define our own scandir (WIN32 and perhaps
// some Unix systems) and apparently on IRIX:

View File

@ -1,6 +1,7 @@
--- 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 @@
diff -up fltk-1.1.9/configure.in.rpath fltk-1.1.9/configure.in
--- fltk-1.1.9/configure.in.rpath 2008-04-11 11:53:01.000000000 -0500
+++ fltk-1.1.9/configure.in 2009-05-13 10:20:15.159163817 -0500
@@ -180,9 +180,9 @@ if test x$enable_shared = xyes; then
GLDSONAME="libfltk_gl.so.$FL_API_VERSION"
IMGDSONAME="libfltk_images.so.$FL_API_VERSION"
DSOCOMMAND="\$(CXX) \$(DSOFLAGS) -Wl,-soname,\$@ \$(LDLIBS) -shared -fPIC $DEBUGFLAG -o"
@ -13,18 +14,18 @@
;;
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 @@
diff -up fltk-1.1.9/configure.rpath fltk-1.1.9/configure
--- fltk-1.1.9/configure.rpath 2008-04-27 03:28:21.000000000 -0500
+++ fltk-1.1.9/configure 2009-05-13 10:20:15.164164455 -0500
@@ -1930,9 +1930,9 @@ if test x$enable_shared = xyes; then
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"
+ if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/usr/lib32" -a "x$libdir" != "x/usr/lib64"; then
DSOLINK="-Wl,-rpath,$libdir"
- fi
+# if test "x$libdir" != "x/usr/lib"; then
+# DSOLINK="-Wl,-rpath,$libdir"
+# fi
+ fi
;;
AIX*)
DSONAME="libfltk_s.a"

View File

@ -1,5 +1,6 @@
--- 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
diff -up fltk-1.1.9/Makefile.test fltk-1.1.9/Makefile
--- fltk-1.1.9/Makefile.test 2007-11-20 15:15:08.000000000 -0600
+++ fltk-1.1.9/Makefile 2009-05-13 10:31:55.161166535 -0500
@@ -27,7 +27,7 @@
include makeinclude
@ -7,10 +8,10 @@
-DIRS = $(IMAGEDIRS) src fluid test documentation
+DIRS = $(IMAGEDIRS) src fluid documentation
all: makeinclude
all: makeinclude fltk-config
for dir in $(DIRS); do\
@@ -35,6 +35,9 @@
(cd $$dir; $(MAKE) $(MFLAGS)) || break;\
@@ -35,6 +35,9 @@ all: makeinclude fltk-config
(cd $$dir; $(MAKE) $(MFLAGS)) || exit 1;\
done
+test:

View File

@ -1,17 +0,0 @@
--- 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...

3
fltk-config.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
exec fltk-config-$(arch) "$@"

View File

@ -1,12 +1,10 @@
%define _default_patch_fuzz 2
#define snap r6027
#define _disable_static --disable-static
%global arch %(arch 2>/dev/null || echo undefined)
Summary: C++ user interface toolkit
Name: fltk
Version: 1.1.9
Release: 3%{?dist}
Release: 4%{?dist}
# see COPYING (or http://www.fltk.org/COPYING.php ) for exceptions details
License: LGPLv2+ with exceptions
@ -19,16 +17,18 @@ Source0: http://ftp.easysw.com/pub/fltk/%{version}/%{name}-%{version}-sou
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source1: fltk-config.sh
## FIXME/TODO: upstream these asap -- Rex
# 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
Patch1: fltk-1.1.9-fltk_config.patch
Patch2: fltk-1.1.9-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
Patch4: fltk-1.1.9-rpath.patch
Patch5: fltk-1.1.8-fluid_desktop.patch
Patch6: fltk-1.1.9-consts.patch
Patch7: fltk-1.1.9-gcc44.patch
%if 0%{?rhel} > 4 || 0%{?fedora} > 4
BuildRequires: libICE-devel libSM-devel
@ -63,6 +63,8 @@ Requires: libX11-devel libSM-devel libICE-devel
%else
Requires: xorg-x11-devel
%endif
# includes static libs
Provides: %{name}-static = %{version}-%{release}
%description devel
%{summary}.
@ -81,12 +83,13 @@ Requires: %{name}-devel = %{version}-%{release}
%setup -q
%endif
%patch1 -p1 -b .199656
%patch1 -p1 -b .fltk_config
%patch2 -p1 -b .test
%patch3 -p1 -b .undefined
%patch4 -p1 -b .rpath
%patch5 -p1 -b .fluid_desktop
%patch6 -p1 -b .consts
%patch7 -p1 -b .gcc44
%build
@ -96,7 +99,6 @@ export CFLAGS=" "
export CXXFLAGS=" "
%configure \
%{?_disable_static} \
--with-optim="%{optflags}" \
--enable-largefile \
--enable-shared \
@ -130,6 +132,11 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man?/{blocks,checkers,sudoku}*
rm -f $RPM_BUILD_ROOT%{_libdir}/../lib
%endif
# hack to make fltk-config multilib-safe
mv $RPM_BUILD_ROOT%{_bindir}/fltk-config \
$RPM_BUILD_ROOT%{_bindir}/fltk-config-%{arch}
install -p -m755 -D %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/fltk-config
desktop-file-install --vendor="%{name}" \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%{_datadir}/applications/fluid.desktop
@ -141,10 +148,6 @@ 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
%check
@ -173,27 +176,27 @@ update-desktop-database >& /dev/null ||:
%files
%defattr(-,root,root,-)
%doc ANNOUNCEMENT CHANGES COPYING CREDITS README
%{_libdir}/libfltk.so.*
%{_libdir}/libfltk_forms.so.*
%{_libdir}/libfltk_gl.so.*
%{_libdir}/libfltk_images.so.*
%{_libdir}/libfltk.so.1.1
%{_libdir}/libfltk_forms.so.1.1
%{_libdir}/libfltk_gl.so.1.1
%{_libdir}/libfltk_images.so.1.1
%files devel
%defattr(-,root,root,-)
%doc __docs/*
# fltk-config multilib-safe wrapper
%{_bindir}/fltk-config
%{_bindir}/fltk-config-%{arch}
%{_includedir}/FL/
%{_includedir}/Fl
%{_libdir}/libfltk.so
%{_libdir}/libfltk_forms.so
%{_libdir}/libfltk_gl.so
%{_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*
@ -208,6 +211,12 @@ update-desktop-database >& /dev/null ||:
%changelog
* Wed May 13 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.1.9-4
- unbreak fltk-config --ldstaticflags (#500201)
- (another?) gcc44 patch
- -devel: +Provides: %%name-static
- fix multiarch conflicts (#341141)
* Wed Mar 04 2009 Caolán McNamara <caolanm@redhat.com> - 1.1.9-3
- fix uses of strchr wrt. constness