rpms/libsx/devel libsx-examples.diff, NONE, 1.1 libsx-rgb.diff, NONE, 1.1 libsx-simple_freq.c, NONE, 1.1 libsx.spec, 1.7, 1.8 libsx-freq_simple.diff, 1.1, NONE
Patrice Dumas (pertusus)
fedora-extras-commits at redhat.com
Thu Feb 15 15:08:41 UTC 2007
- Previous message: rpms/lyx/devel lyx-1.4.4-xdg_open.patch, NONE, 1.1 lyx-qt.desktop, 1.2, 1.3 lyx-xforms.desktop, 1.2, 1.3 lyx.desktop, 1.4, 1.5 lyx.spec, 1.48, 1.49 lyx-1.4.3-helpers.patch, 1.2, NONE
- Next message: rpms/lyx/devel .cvsignore, 1.15, 1.16 lyx.spec, 1.49, 1.50 sources, 1.14, 1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: pertusus
Update of /cvs/extras/rpms/libsx/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12016
Modified Files:
libsx.spec
Added Files:
libsx-examples.diff libsx-rgb.diff libsx-simple_freq.c
Removed Files:
libsx-freq_simple.diff
Log Message:
* Thu Feb 15 2007 Patrice Dumas <pertusus at free.fr> 2.05-11
- use only %{buildroot}
- put examples in a directory and fix them
- set the rgb database location to a correct value
- replace libsx-freq_simple.diff by libsx-examples.diff + libsx-simple_freq.c
libsx-examples.diff:
--- NEW FILE libsx-examples.diff ---
--- libsx-2.05/demo0/makefile.examples 1999-06-22 14:41:40.000000000 +0200
+++ libsx-2.05/demo0/makefile 2007-02-15 13:46:00.000000000 +0100
@@ -21,9 +21,9 @@
# main.o depends on main.c (of course) and main.h and callbacks.h
-main.o : main.c main.h callbacks.h libsx.h
+main.o : main.c main.h callbacks.h
-callbacks.o : libsx.h callbacks.c main.h
+callbacks.o : callbacks.c main.h
#
--- libsx-2.05/pcurve/makefile.examples 1994-11-06 00:21:09.000000000 +0100
+++ libsx-2.05/pcurve/makefile 2007-02-15 13:46:00.000000000 +0100
@@ -1,20 +1,23 @@
-#!smake
+include ../libsx_defs
CFLAGS = -g -I../controlbox
-CLIBS = ../src/libsxGL.a -lGLU -lGL -lXaw -lXt -lXmu -lX11 -lm
-LDFLAGS = $(LIBPATH) $(LIBS)
+CLIBS = -lGLU -lGL -lXaw -lXt -lXmu -lX11 -lm
+LDFLAGS = $(LIBPATH) $(LIBS) $(CLIBS)
OBJS = fogl.o cfogl.o
-OTHEROBJS = ../controlbox/controlbox.o
+OTHEROBJS = controlbox.o
-default: pcurve
+default: $(OTHEROBJS) pcurve
+
+controlbox.o: ../controlbox/controlbox.c
+ cc -c $(CFLAGS) ../controlbox/controlbox.c -o controlbox.o
clean:
rm -f $(OBJS) cool
-pcurve: pcurve.c
- cc $(CFLAGS) pcurve.c -o pcurve $(OTHEROBJS) $(LIBPATH) $(CLIBS)
+pcurve: pcurve.c $(OTHEROBJS)
+ cc $(CFLAGS) pcurve.c -o pcurve $(OTHEROBJS) $(LDFLAGS)
-cool2: cool2.c
- cc $(CFLAGS) cool2.c $(OTHEROBJS) -o cool2 $(LIBPATH) $(CLIBS)
+cool2: cool2.c $(OTHEROBJS)
+ cc $(CFLAGS) cool2.c $(OTHEROBJS) -o cool2 $(LDFLAGS)
--- libsx-2.05/demo3/makefile.examples 2007-02-15 13:48:46.000000000 +0100
+++ libsx-2.05/demo3/makefile 2007-02-15 15:47:47.000000000 +0100
@@ -10,9 +10,9 @@
# main.o depends on main.c (of course) and main.h and callbacks.h
-main.o : main.c main.h callbacks.h libsx.h
+main.o : main.c main.h callbacks.h
-callbacks.o : libsx.h callbacks.c main.h
+callbacks.o : callbacks.c main.h
clean :
--- libsx-2.05/controlbox/makefile.examples 2000-07-23 20:57:49.000000000 +0200
+++ libsx-2.05/controlbox/makefile 2007-02-15 13:46:00.000000000 +0100
@@ -10,9 +10,9 @@
# main.o depends on main.c (of course) and main.h and callbacks.h
-main.o : main.c main.h callbacks.h libsx.h controlbox.h
+main.o : main.c main.h callbacks.h controlbox.h
-callbacks.o : libsx.h callbacks.c
+callbacks.o : callbacks.c
controlbox.o : controlbox.c controlbox.c
--- libsx-2.05/freq/makefile.examples 1994-02-02 17:54:22.000000000 +0100
+++ libsx-2.05/freq/makefile 2007-02-15 13:46:00.000000000 +0100
@@ -3,9 +3,11 @@
include ../libsx_defs
FREQ_OBJS = freq.o dirlist.o
+SIMPLE_FREQ_OBJS = simple_freq.o
OBJS = main.o libfreq.a
+SIMPLE_OBJS = main.o libsimplefreq.a
-all : libfreq.a freq
+all : libfreq.a freq libsimplefreq.a simple_freq
libfreq.a : $(FREQ_OBJS)
@@ -13,16 +15,24 @@
ar rc libfreq.a $(FREQ_OBJS)
$(RANLIB) libfreq.a
+libsimplefreq.a : $(SIMPLE_FREQ_OBJS)
+ rm -f libsimplefreq.a
+ ar rc libsimplefreq.a $(SIMPLE_FREQ_OBJS)
+ $(RANLIB) libsimplefreq.a
freq : $(OBJS)
$(CC) -o $@ $(OBJS) $(LIBS)
+simple_freq : $(SIMPLE_OBJS)
+ $(CC) -o $@ $(SIMPLE_OBJS) $(LIBS)
-main.o : main.c libsx.h freq.h
+main.o : main.c freq.h
freq.o : freq.c
+simple_freq.o : simple_freq.c
+
dirlist.o : dirlist.c
clean:
- rm -f *.o *~ core freq libfreq.a
+ rm -f *.o *~ core freq libfreq.a simple_freq libsimplefreq.a
--- libsx-2.05/multireq/makefile.examples 2007-02-15 13:47:36.000000000 +0100
+++ libsx-2.05/multireq/makefile 2007-02-15 13:47:45.000000000 +0100
@@ -9,7 +9,7 @@
multireq : $(OBJS)
$(CC) -g -o $@ $(OBJS) $(LIBS)
-main.o : main.c libsx.h multireq.h
+main.o : main.c multireq.h
multireq.o : multireq.c multireq.h
--- libsx-2.05/skel/makefile.examples 1994-01-19 21:10:46.000000000 +0100
+++ libsx-2.05/skel/makefile 2007-02-15 13:46:00.000000000 +0100
@@ -10,9 +10,9 @@
# main.o depends on main.c (of course) and main.h and callbacks.h
-main.o : main.c main.h callbacks.h libsx.h
+main.o : main.c main.h callbacks.h
-callbacks.o : libsx.h callbacks.c
+callbacks.o : callbacks.c
clean :
rm -f *.o *~ core skel
--- libsx-2.05/demo2/makefile.examples 1994-01-19 21:12:08.000000000 +0100
+++ libsx-2.05/demo2/makefile 2007-02-15 13:46:00.000000000 +0100
@@ -10,9 +10,9 @@
# main.o depends on main.c (of course) and main.h and callbacks.h
-main.o : main.c main.h callbacks.h libsx.h
+main.o : main.c main.h callbacks.h
-callbacks.o : libsx.h callbacks.c main.h
+callbacks.o : callbacks.c main.h
clean :
--- libsx-2.05/demo1/makefile.examples 1994-01-19 21:12:13.000000000 +0100
+++ libsx-2.05/demo1/makefile 2007-02-15 13:46:00.000000000 +0100
@@ -10,9 +10,9 @@
# main.o depends on main.c (of course) and main.h and callbacks.h
-main.o : main.c main.h callbacks.h libsx.h
+main.o : main.c main.h callbacks.h
-callbacks.o : libsx.h callbacks.c main.h
+callbacks.o : callbacks.c main.h
#
--- libsx-2.05/xrootbg/makefile.examples 1999-12-14 21:02:00.000000000 +0100
+++ libsx-2.05/xrootbg/makefile 2007-02-15 13:46:00.000000000 +0100
@@ -1,7 +1,7 @@
#
#
-XAWLIB=Xaw95
-# XAWLIB=Xaw
+#XAWLIB=Xaw95
+XAWLIB=Xaw
include ../libsx_defs
CFLAGS = -Wall -O2 -D_POSIX_SOURCE -D$(XAWLIB)
--- libsx-2.05/creq/makefile.examples 1994-01-19 21:21:40.000000000 +0100
+++ libsx-2.05/creq/makefile 2007-02-15 13:46:00.000000000 +0100
@@ -10,7 +10,7 @@
creq : $(OBJS)
$(CC) -o $@ $(OBJS) $(LIBS)
-main.o : main.c libsx.h creq.h
+main.o : main.c creq.h
creq.o : creq.c
libsx-rgb.diff:
--- NEW FILE libsx-rgb.diff ---
--- libsx-2.05/src/colorsel.c.rgb 2000-07-29 11:10:32.000000000 +0200
+++ libsx-2.05/src/colorsel.c 2007-02-15 15:49:55.000000000 +0100
@@ -12,7 +12,9 @@
char *SX_ColorSelector_Label[] = {
};
+#ifndef RGBTXT
#define RGBTXT "/usr/lib/X11/rgb.txt"
+#endif
#include <stdio.h>
#include <stdlib.h>
--- NEW FILE libsx-simple_freq.c ---
#include "libsx.h"
#include "freq.h"
char *SimpleGetFile(char *path)
{
return GetFile("Simple file requestor", path, NULL, NULL);
}
Index: libsx.spec
===================================================================
RCS file: /cvs/extras/rpms/libsx/devel/libsx.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- libsx.spec 10 Sep 2006 21:59:15 -0000 1.7
+++ libsx.spec 15 Feb 2007 15:08:09 -0000 1.8
@@ -1,17 +1,20 @@
Name: libsx
Summary: Simple X library
Version: 2.05
-Release: 10%{?dist}
+Release: 11%{?dist}
Group: System Environment/Libraries
License: LGPL
Url: ftp://ftp.ac-grenoble.fr/ge/Xlibraries/
Source: ftp://ftp.ac-grenoble.fr/ge/Xlibraries/%{name}-%{version}.tar.bz2
-Patch: libsx-no_nested_prototypes.diff
+# simpler example for freq
+Source1: libsx-simple_freq.c
+Patch0: libsx-no_nested_prototypes.diff
Patch1: libsx-comment_caddr_t.diff
Patch2: libsx-protect_strdup.diff
-Patch3: libsx-freq_simple.diff
+Patch3: libsx-examples.diff
Patch4: libsx-mkdir_p.diff
Patch5: libsx-shared.diff
+Patch6: libsx-rgb.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# libXt-devel requires libX11-devel and libXaw-devel requires libXmu-devel
BuildRequires: libXaw-devel libXpm-devel libXt-devel
@@ -38,39 +41,54 @@
%prep
%setup -q
-%patch -p1
-# caddr_t redefined?
-%patch -P 1
-# with RPM_OPT_FLAGS (maybe FORTIFY_SOURCE) all the strdup prototypes
-# have to be commented.
-%patch -p1 -P 2
-# use the new GetFile in freq
-%patch -p1 -P 3
+# static function cannot be within other function
+%patch0 -p1
+# don't redefine caddr_t
+%patch1
+# set strdup prototypes only if strdup isn't a macro
+%patch2 -p1
+# use the new GetFile in freq, remove libsx.h from prerequisite and other
+# fixes allowing examples to compile
+%patch3 -p1 -b .examples
# use mkdir -p to create directories
-%patch -p1 -P 4
+%patch4 -p1
# shared library with fine soname
-%patch -p1 -P 5
+%patch5 -p1
+# allow the rgb file location to be redefined
+%patch6 -p1 -b .rgb
+
+# example of a simple use of the new GetFile
+cp %{SOURCE1} freq/simple_freq.c
%build
-make CFLAGS="%{optflags} -fPIC" src
+make CFLAGS="%{optflags} -fPIC -DRGBTXT=\"\\\"%{_datadir}/X11/rgb.txt\\\"\"" src
%install
rm -rf %{buildroot}
-# remove symlinks pointing to libsx.h in example directories
-find . -name libsx.h -a -type l -exec rm \{\} \;
-
-cd src
-%makeinstall LIBDIR=%{buildroot}%{_libdir} \
+pushd src
+make install LIBDIR=%{buildroot}%{_libdir} \
INCLUDEDIR=%{buildroot}%{_includedir} \
SHAREDIR=%{buildroot}%{_datadir}/libsx
+popd
-# fix symbolic links for shared library
-cd $RPM_BUILD_ROOT/%{_libdir}
+# prepare examples directory
+rm -rf examples
+mkdir examples
+cp -a bezier controlbox creq demo* draw_demo frac freq multireq \
+ pcurve skel xmore xrootbg libsx_defs examples/
+# remove symlinks pointing to libsx.h in example directories
+find examples/ -name libsx.h -a -type l -exec rm \{\} \;
+find examples/ -name makefile.examples -exec rm \{\} \;
+
+# fix symbolic links for shared library. It is not completly obvious
+# that using 0.0.0 like in libtool makes sense, do it anyway.
+pushd %{buildroot}/%{_libdir}
mv libsx.so libsx.so.0.0.0
chmod +x libsx.so.0.0.0
ln -s libsx.so.0.0.0 libsx.so.0
ln -s libsx.so.0 libsx.so
+popd
%post -p /sbin/ldconfig
@@ -87,13 +105,18 @@
%files devel
%defattr(-,root,root,-)
-%doc bezier controlbox creq demo* docs draw_demo frac freq multireq
-%doc pcurve skel xmore xrootbg libsx_defs
+%doc docs/ examples/
%{_libdir}/libsx.a
%{_libdir}/libsx.so
%{_includedir}/libsx.h
%changelog
+* Thu Feb 15 2007 Patrice Dumas <pertusus at free.fr> 2.05-11
+- use only %%{buildroot}
+- put examples in a directory and fix them
+- set the rgb database location to a correct value
+- replace libsx-freq_simple.diff by libsx-examples.diff + libsx-simple_freq.c
+
* Sun Sep 10 2006 Patrice Dumas <pertusus at free.fr> 2.05-10
- add defattr to devel
--- libsx-freq_simple.diff DELETED ---
- Previous message: rpms/lyx/devel lyx-1.4.4-xdg_open.patch, NONE, 1.1 lyx-qt.desktop, 1.2, 1.3 lyx-xforms.desktop, 1.2, 1.3 lyx.desktop, 1.4, 1.5 lyx.spec, 1.48, 1.49 lyx-1.4.3-helpers.patch, 1.2, NONE
- Next message: rpms/lyx/devel .cvsignore, 1.15, 1.16 lyx.spec, 1.49, 1.50 sources, 1.14, 1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list