debian/0000755000000000000000000000000012146447376007204 5ustar debian/control0000644000000000000000000000221012146046005010562 0ustar Source: libsx Section: utils Priority: optional Maintainer: Alastair McKinstry Build-Depends: debhelper (>= 9), pkg-config, libxpm-dev, libxt-dev, libxaw7-dev, libx11-dev Standards-Version: 3.9.4 Homepage: ftp://ftp.ac-grenoble.fr/ge/Xlibraries/ Package: libsx0 Section: libs Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends} Description: Simple X library Libsx (the Simple X library) is a library of code that sits on top of and to the side of the Athena widget set. Its purpose is to make writing X applications *much* easier. Package: libsx-dev Section: libdevel Architecture: any Depends: libsx0 ( = ${binary:Version} ), ${misc:Depends}, ${shlibs:Depends} Recommends: pkg-config, libxaw7-dev, libxpm-dev, libxt-dev, libx11-dev Description: Development files (headers and static libraries) for libsx Libsx (the Simple X library) is a library of code that sits on top of and to the side of the Athena widget set. Its purpose is to make writing X applications *much* easier. . This package contains header files, pkgconfig files and static libraries for libsx. debian/libsx-dev.install0000644000000000000000000000015412146447027012462 0ustar src/libsx.h usr/include docs/html/* usr/share/doc/libsx-dev/html docs/text/* usr/share/doc/libsx-dev/text debian/source/0000755000000000000000000000000012146046005010464 5ustar debian/source/format0000644000000000000000000000001412146046005011672 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012146046005010613 5ustar debian/patches/libsx-maxpathlen.diff0000644000000000000000000000346012146046005014730 0ustar Description: Define MAXPATHLEN if necessary (not defined on Hurd) Author: Alastair McKinstry Last-Updated: 20111-07-17 Forwarded: no Index: libsx-2.05/src/dirlist.c =================================================================== --- libsx-2.05.orig/src/dirlist.c 2011-07-16 12:05:56.000000000 +0100 +++ libsx-2.05/src/dirlist.c 2011-07-16 12:05:56.000000000 +0100 @@ -32,6 +32,10 @@ #include #include +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 +#endif + #ifndef strdup extern char *strdup(char *str); #endif Index: libsx-2.05/freq/dirlist.c =================================================================== --- libsx-2.05.orig/freq/dirlist.c 2011-07-16 12:20:43.000000000 +0100 +++ libsx-2.05/freq/dirlist.c 2011-07-16 12:20:51.000000000 +0100 @@ -31,6 +31,9 @@ #include #include +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 +#endif void free_table(char **table, int n) { Index: libsx-2.05/freq/freq.c =================================================================== --- libsx-2.05.orig/freq/freq.c 2011-07-16 12:20:20.000000000 +0100 +++ libsx-2.05/freq/freq.c 2011-07-16 12:20:34.000000000 +0100 @@ -19,6 +19,10 @@ #include "libsx.h" +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 +#endif + #ifndef CLK_TCK #include #define CLK_TCK sysconf(_SC_CLK_TCK) /* seems to work right */ Index: libsx-2.05/src/freq.c =================================================================== --- libsx-2.05.orig/src/freq.c 2011-07-16 12:21:07.000000000 +0100 +++ libsx-2.05/src/freq.c 2011-07-16 12:21:13.000000000 +0100 @@ -20,6 +20,10 @@ #include "libsx.h" +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 +#endif + #ifndef CLK_TCK #define CLK_TCK sysconf(_SC_CLK_TCK) /* seems to work right */ #endif /* CLK_TCK */ debian/patches/series0000644000000000000000000000030512146046005012026 0ustar libsx-simple_freq.c libsx-examples.diff libsx-link_mkdir.diff libsx-no_nested_prototypes.diff libsx-rgb.diff libsx-strdup.diff libsx-pic-shlib.diff libsx-maxpathlen.diff fortify.patch #clang.patch debian/patches/fortify.patch0000644000000000000000000001417412146046005013325 0ustar Author: Alastair McKinstry Description: Add compiler flags explicity; needed for fortified compilation. Last-Updated: 2013-05-18 Forwarded: no Index: libsx-2.05/bezier/makefile =================================================================== --- libsx-2.05.orig/bezier/makefile 2013-05-19 03:34:58.000000000 +0100 +++ libsx-2.05/bezier/makefile 2013-05-19 04:32:03.000000000 +0100 @@ -8,8 +8,7 @@ OBJS = main.o callbacks.o bezier.o gfx.o bez : $(OBJS) - $(CC) -o bez $(OBJS) $(LIBS) $(LOCAL_LIBS) - + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o bez $(OBJS) $(LIBS) $(LOCAL_LIBS) # main.o depends on main.c (of course) and main.h and callbacks.h main.o : main.c main.h callbacks.h gfx.h Index: libsx-2.05/freq/makefile =================================================================== --- libsx-2.05.orig/freq/makefile 2013-05-19 03:34:58.000000000 +0100 +++ libsx-2.05/freq/makefile 2013-05-19 04:33:24.000000000 +0100 @@ -9,7 +9,6 @@ all : libfreq.a freq libsimplefreq.a simple_freq - libfreq.a : $(FREQ_OBJS) rm -f libfreq.a ar rc libfreq.a $(FREQ_OBJS) @@ -21,10 +20,10 @@ $(RANLIB) libsimplefreq.a freq : $(OBJS) - $(CC) -o $@ $(OBJS) $(LIBS) + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) simple_freq : $(SIMPLE_OBJS) - $(CC) -o $@ $(SIMPLE_OBJS) $(LIBS) + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(SIMPLE_OBJS) $(LIBS) main.o : main.c freq.h Index: libsx-2.05/src/Makefile =================================================================== --- libsx-2.05.orig/src/Makefile 2013-05-19 03:34:58.000000000 +0100 +++ libsx-2.05/src/Makefile 2013-05-19 04:28:00.000000000 +0100 @@ -26,7 +26,10 @@ # %.pic: %.c - $(CC) -c -o $@ $(CFLAGS) -fPIC $< + $(CC) $(CPPFLAGS) -c -o $@ $(CFLAGS) -fPIC $< + +%.o: %.c + $(CC) $(CPPFLAGS) -c -o $@ $(CFLAGS) $< LIBSXOBJS := draw.o toggle.o button.o string_entry.o libsx.o misc.o list.o\ font.o scrollbar.o menu.o popups.o colormap.o drawing.o\ @@ -45,7 +48,7 @@ libsx.so : $(SHLIBOBJS) rm -f libsx.so - $(CC) -shared -Wl,-z,noexecstack -Wl,-soname,libsx.so.0 $(SHLIBOBJS) -o libsx.so $(XLIBS) + $(CC) $(CPPFLAGS) $(LDFLAGS) -shared -Wl,-z,noexecstack -Wl,-soname,libsx.so.0 $(SHLIBOBJS) -o libsx.so $(XLIBS) draw.o : draw.c libsx.h libsx_private.h Index: libsx-2.05/controlbox/makefile =================================================================== --- libsx-2.05.orig/controlbox/makefile 2013-05-19 03:34:58.000000000 +0100 +++ libsx-2.05/controlbox/makefile 2013-05-19 04:33:33.000000000 +0100 @@ -6,7 +6,7 @@ OBJS = main.o callbacks.o controlbox.o cbox : $(OBJS) - $(CC) -o $@ $(OBJS) $(LIBS) + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) # main.o depends on main.c (of course) and main.h and callbacks.h Index: libsx-2.05/creq/makefile =================================================================== --- libsx-2.05.orig/creq/makefile 2013-05-19 03:34:58.000000000 +0100 +++ libsx-2.05/creq/makefile 2013-05-19 03:34:58.000000000 +0100 @@ -8,7 +8,7 @@ all : creq creq : $(OBJS) - $(CC) -o $@ $(OBJS) $(LIBS) + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) main.o : main.c creq.h Index: libsx-2.05/multireq/makefile =================================================================== --- libsx-2.05.orig/multireq/makefile 2013-05-19 03:34:58.000000000 +0100 +++ libsx-2.05/multireq/makefile 2013-05-19 03:34:58.000000000 +0100 @@ -7,7 +7,7 @@ all : multireq multireq : $(OBJS) - $(CC) -g -o $@ $(OBJS) $(LIBS) + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -g -o $@ $(OBJS) $(LIBS) main.o : main.c multireq.h Index: libsx-2.05/pcurve/makefile =================================================================== --- libsx-2.05.orig/pcurve/makefile 2013-05-19 03:34:58.000000000 +0100 +++ libsx-2.05/pcurve/makefile 2013-05-19 03:34:58.000000000 +0100 @@ -3,7 +3,7 @@ CFLAGS = -g -I../controlbox CLIBS = -lGLU -lGL -lXaw -lXt -lXmu -lX11 -lm -LDFLAGS = $(LIBPATH) $(LIBS) $(CLIBS) +LDFLAGS := $(LIBPATH) $(LIBS) $(CLIBS) $(LDFLAGS) OBJS = fogl.o cfogl.o OTHEROBJS = controlbox.o @@ -11,13 +11,13 @@ default: $(OTHEROBJS) pcurve controlbox.o: ../controlbox/controlbox.c - cc -c $(CFLAGS) ../controlbox/controlbox.c -o controlbox.o + cc -c $(CPPFLAGS) $(CFLAGS) ../controlbox/controlbox.c -o controlbox.o clean: rm -f $(OBJS) cool pcurve: pcurve.c $(OTHEROBJS) - cc $(CFLAGS) pcurve.c -o pcurve $(OTHEROBJS) $(LDFLAGS) + cc $(CFLAGS) $(CPPFLAGS) pcurve.c -o pcurve $(OTHEROBJS) $(LDFLAGS) cool2: cool2.c $(OTHEROBJS) - cc $(CFLAGS) cool2.c $(OTHEROBJS) -o cool2 $(LDFLAGS) + cc $(CFLAGS) $(CPPFLAGS) cool2.c $(OTHEROBJS) -o cool2 $(LDFLAGS) Index: libsx-2.05/skel/makefile =================================================================== --- libsx-2.05.orig/skel/makefile 2013-05-19 03:34:58.000000000 +0100 +++ libsx-2.05/skel/makefile 2013-05-19 03:34:58.000000000 +0100 @@ -6,7 +6,7 @@ OBJS = main.o callbacks.o skel : $(OBJS) - $(CC) -o skel $(OBJS) $(LIBS) + $(CC) $(CFLAGS) $(LFDLAGS) -o skel $(OBJS) $(LIBS) # main.o depends on main.c (of course) and main.h and callbacks.h Index: libsx-2.05/xrootbg/makefile =================================================================== --- libsx-2.05.orig/xrootbg/makefile 2013-05-19 03:34:58.000000000 +0100 +++ libsx-2.05/xrootbg/makefile 2013-05-19 03:34:58.000000000 +0100 @@ -3,7 +3,7 @@ #XAWLIB=Xaw95 XAWLIB=Xaw include ../libsx_defs -CFLAGS = -Wall -O2 -D_POSIX_SOURCE -D$(XAWLIB) +CFLAGS := -Wall -O2 -D_POSIX_SOURCE -D$(XAWLIB) $(CFLAGS) OBJS = xrootbg.o @@ -11,7 +11,7 @@ all : xrootbg xrootbg : $(OBJS) - $(CC) -o $@ $(OBJS) $(LIBS) -lm + $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) -lm strip xrootbg xrootbg.o : xrootbg.c Index: libsx-2.05/libsx_defs =================================================================== --- libsx-2.05.orig/libsx_defs 2013-05-19 03:34:51.000000000 +0100 +++ libsx-2.05/libsx_defs 2013-05-19 04:32:31.000000000 +0100 @@ -11,6 +11,9 @@ CC = gcc #CC = cc +# Needed for fortify +%.o: %.c + $(CC) $(CPPFLAGS) -c -o $@ $(CFLAGS) $< # Using gcc it's nice to be real strict and compile with -Wall, for # production versions of the library you probably just want -O or -O2 debian/patches/libsx-no_nested_prototypes.diff0000644000000000000000000000246212146046005017056 0ustar Description: Don't nest prototypes; not valid C Origin: libsx-2.05-18.fc12.src.rpm fedora package diff -u --recursive libsx-2.05_orig/src/grabpix.c libsx-2.05/src/grabpix.c --- libsx-2.05_orig/src/grabpix.c 1999-06-22 21:28:38.000000000 +0200 +++ libsx-2.05/src/grabpix.c 2005-08-11 14:44:41.000000000 +0200 @@ -43,6 +43,13 @@ } RootWindowRec; static void Realize(); +/* +static void InitCursors(); +static void SetupGC(); +static Window FindWindow(int x, int y); +static void CreateRoot(); +static void StartRootPtrGrab(); +*/ RootWindowClassRec rootWindowClassRec = { { /* core fields */ @@ -138,7 +145,7 @@ 0x8f, 0x07, 0x77, 0x07, 0xfe, 0x0f, 0xfc, 0x1f, 0xf8, 0x3f, 0x00, 0x7f, 0x00, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x10}; -static void +void InitCursors() { Pixmap cursor,mask; @@ -155,7 +162,7 @@ lens_x_hot,lens_y_hot); } -static void +void SetupGC() { selectGCV.function = GXxor; @@ -165,7 +172,7 @@ &selectGCV); } -static Window +Window FindWindow(x, y) int x, y; { @@ -187,14 +194,14 @@ return findW; } -static void +void CreateRoot() { root = XtCreateWidget("root", rootWindowWidgetClass, toplevel, NULL, 0); XtRealizeWidget(root); } -static void +void StartRootPtrGrab() { Window rootR, childR, window; debian/patches/libsx-examples.diff0000644000000000000000000001252512146046005014407 0ustar Description: Build libsx examples Origin: Fedora libsx port: libsx-2.05-18.fc12.src.rpm --- 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 debian/patches/libsx-rgb.diff0000644000000000000000000000122312146046005013334 0ustar Origin: libsx-2.05-18.fc12.src.rpm Fedora package Description: Don't define RGBTXT twice. Change the path on the Debian version; on fedora its /usr/lib, debian its /etc. Last-Updated: 2010-05-09 Forwarded: no Index: libsx-2.05/src/colorsel.c =================================================================== --- libsx-2.05.orig/src/colorsel.c 2010-05-09 20:57:02.000000000 +0100 +++ libsx-2.05/src/colorsel.c 2010-05-09 21:00:28.000000000 +0100 @@ -12,7 +12,9 @@ char *SX_ColorSelector_Label[] = { }; -#define RGBTXT "/usr/lib/X11/rgb.txt" +#ifndef RGBTXT +#define RGBTXT "/etc/X11/rgb.txt" +#endif #include #include debian/patches/libsx-comment_caddr_t.diff0000644000000000000000000000111512146046005015704 0ustar Description: caddr_t not a macro, and so this ifdef will fail on new systems. Origin: Fedora port of libsx. Last-Updated: 2010-05-09 Forwarded: no Index: libsx/src/drawing.c =================================================================== --- libsx.orig/src/drawing.c 2009-09-09 11:47:07.000000000 +0100 +++ libsx/src/drawing.c 2009-09-09 11:47:24.000000000 +0100 @@ -15,9 +15,11 @@ #include #include "drawingP.h" +/* #ifndef caddr_t extern char *caddr_t; #endif +*/ static void Initialize(); static void MyRealize(); /* So we can do our own visual */ debian/patches/libsx-simple_freq.c0000644000000000000000000000072412146046005014407 0ustar Origin: libsx-2.05-18.fc12.src.rpm fedora package Description: Need simple missing function. Index: libsx/freq/simple_freq.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ libsx/freq/simple_freq.c 2009-09-09 12:03:59.000000000 +0100 @@ -0,0 +1,7 @@ +#include "libsx.h" +#include "freq.h" + +char *SimpleGetFile(char *path) +{ + return GetFile("Simple file requestor", path, NULL, NULL); +} debian/patches/libsx-strdup.diff0000644000000000000000000000275012146046005014111 0ustar Origin: libsx-2.05-18.fc12.src.rpm Fedora package Description: Conditionally include strdup(). --- libsx-2.05/src/dirlist.c.strdup 1999-12-30 08:22:14.000000000 +0100 +++ libsx-2.05/src/dirlist.c 2007-02-15 16:15:22.000000000 +0100 @@ -32,7 +32,9 @@ #include #include +#ifndef strdup extern char *strdup(char *str); +#endif extern char _FreqFilter[84]; extern int view_dir, view_pt; --- libsx-2.05/src/freq.c.strdup 2007-02-15 16:16:18.000000000 +0100 +++ libsx-2.05/src/freq.c 2007-02-15 16:16:48.000000000 +0100 @@ -60,8 +60,9 @@ * in the butt. Why on earth isn't strdup() in the POSIX standard * but something completely useless like mbstowcs() is? */ +#ifndef strdup char *strdup(const char *str); - +#endif /* * Here's where the real code begins. --- libsx-2.05/src/dialog.c.strdup 2000-07-23 18:02:11.000000000 +0200 +++ libsx-2.05/src/dialog.c 2007-02-15 16:15:22.000000000 +0100 @@ -247,8 +247,10 @@ void PopdownDialog(Dialog popup, char **answer) { - char *tmp; +#ifndef strdup extern char *strdup(char *str); +#endif + char *tmp; if (answer) { --- libsx-2.05/freq/freq.c.strdup 1999-07-04 06:07:13.000000000 +0200 +++ libsx-2.05/freq/freq.c 2007-02-15 16:15:22.000000000 +0100 @@ -56,8 +56,9 @@ * in the butt. Why on earth isn't strdup() in the POSIX standard * but something completely useless like mbstowcs() is? */ +#ifndef strdup char *strdup(const char *str); - +#endif /* * Here's where the real code begins. debian/patches/libsx-pic-shlib.diff0000644000000000000000000000305112146046005014435 0ustar Author: Alastair McKinstry Description: Add Dynamic shared version of library. Forwarded: no Last-Updated: 2010-05-09 Index: libsx-2.05/src/Makefile =================================================================== --- libsx-2.05.orig/src/Makefile 2009-09-11 19:55:15.000000000 +0100 +++ libsx-2.05/src/Makefile 2009-09-11 19:55:39.000000000 +0100 @@ -25,15 +25,17 @@ # # -LIBSXOBJS = draw.o toggle.o button.o string_entry.o libsx.o misc.o list.o\ +%.pic: %.c + $(CC) -c -o $@ $(CFLAGS) -fPIC $< + +LIBSXOBJS := draw.o toggle.o button.o string_entry.o libsx.o misc.o list.o\ font.o scrollbar.o menu.o popups.o colormap.o drawing.o\ dialog.o dirlist.o freq.o grabpix.o colorsel.o version.o +SHLIBOBJS := $(subst .o,.pic, $(LIBSXOBJS)) OBJS = main.o callbacks.o - - all : libsx.a libsx.so libsx.a : $(LIBSXOBJS) @@ -41,12 +43,9 @@ ar rc libsx.a $(LIBSXOBJS) $(RANLIB) libsx.a -libsx.so : $(LIBSXOBJS) +libsx.so : $(SHLIBOBJS) rm -f libsx.so - $(CC) -shared -Wl,-soname,libsx.so.0 draw.o toggle.o \ - button.o string_entry.o libsx.o misc.o list.o font.o scrollbar.o \ - menu.o popups.o colormap.o drawing.o dialog.o dirlist.o freq.o \ - grabpix.o colorsel.o version.o -o libsx.so $(XLIBS) + $(CC) -shared -Wl,-z,noexecstack -Wl,-soname,libsx.so.0 $(SHLIBOBJS) -o libsx.so $(XLIBS) draw.o : draw.c libsx.h libsx_private.h @@ -102,4 +101,4 @@ $(copyfile) dialogs/dialogs* $(SHAREDIR) clean: - rm -f *.o *~ dialogs/*~ core libsx.a libsx.so + rm -f *.o *~ dialogs/*~ core libsx.a libsx.so *.pic debian/patches/libsx-link_mkdir.diff0000644000000000000000000000441112146046005014707 0ustar Origin: libsx-2.05-18.fc12.src.rpm fedora package Description: Use mkdir -p not makeheirdir diff -up libsx-2.05/src/Makefile.link_mkdir libsx-2.05/src/Makefile --- libsx-2.05/src/Makefile.link_mkdir 2003-08-09 13:17:23.000000000 +0200 +++ libsx-2.05/src/Makefile 2007-12-27 09:39:41.000000000 +0100 @@ -13,6 +13,11 @@ LIBDIR=/usr/X11R6/lib INCLUDEDIR=/usr/X11R6/include/X11/SX SHAREDIR=/usr/share/libsx +mkinstalldirs = mkdir -p +#mkinstalldirs = mkdirhier + +copyfile = cp -f + CC=gcc # @@ -38,10 +43,10 @@ libsx.a : $(LIBSXOBJS) libsx.so : $(LIBSXOBJS) rm -f libsx.so - $(CC) -shared -Wl,-soname,libsx.so draw.o toggle.o \ + $(CC) -shared -Wl,-soname,libsx.so.0 draw.o toggle.o \ button.o string_entry.o libsx.o misc.o list.o font.o scrollbar.o \ menu.o popups.o colormap.o drawing.o dialog.o dirlist.o freq.o \ - grabpix.o colorsel.o version.o -o libsx.so + grabpix.o colorsel.o version.o -o libsx.so $(XLIBS) draw.o : draw.c libsx.h libsx_private.h @@ -89,12 +94,12 @@ main.o : main.c main.h libsx.h callbacks callbacks.o : libsx.h callbacks.c install: - mkdirhier $(LIBDIR) - cp -f libsx.a libsx.so $(LIBDIR) - mkdirhier $(INCLUDEDIR) - cp -f libsx.h $(INCLUDEDIR) - mkdirhier $(SHAREDIR) - cp -f dialogs/dialogs* $(SHAREDIR) + $(mkinstalldirs) $(LIBDIR) + $(copyfile) libsx.a libsx.so $(LIBDIR) + $(mkinstalldirs) $(INCLUDEDIR) + $(copyfile) -f libsx.h $(INCLUDEDIR) + $(mkinstalldirs) $(SHAREDIR) + $(copyfile) dialogs/dialogs* $(SHAREDIR) clean: rm -f *.o *~ dialogs/*~ core libsx.a libsx.so diff -up libsx-2.05/libsx_defs.link_mkdir libsx-2.05/libsx_defs --- libsx-2.05/libsx_defs.link_mkdir 1999-12-14 13:59:35.000000000 +0100 +++ libsx-2.05/libsx_defs 2007-12-27 09:31:42.000000000 +0100 @@ -44,7 +44,7 @@ CC = gcc # CFLAGS = -O3 -D_POSIX_SOURCE # # On Linux, use CC=cc, RANLIB=ranlib, and: -CFLAGS = -Wall -O2 -D_POSIX_SOURCE +CFLAGS = -Wall -g -O2 -D_POSIX_SOURCE # # On a Motorola Delta/88K box, you can use (with gcc): # CFLAGS = -O2 -DSYSV -DUSG -DMOTOROLA -DMOTOR32V2 @@ -98,9 +98,11 @@ endif # #LIBSX = ../src/libsx.a -LIBSX = -lsx -L/usr/X11R6/lib +LIBSX = -L../src -lsx + +XLIBS = -lXpm -l$(XAWLIB) -lXmu -lXt -lX11 XPM_SUPPORT = yes -LIBS = $(LIBSX) -lXpm -l$(XAWLIB) -lXmu -lXt -lX11 -L/usr/X11R6/lib +LIBS = $(LIBSX) $(XLIBS) debian/rules0000755000000000000000000000145512146447370010263 0ustar #!/usr/bin/make -f # The magic debhelper rule: %: dh $@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) CFLAGS = `dpkg-buildflags --get CFLAGS` CFLAGS += `dpkg-buildflags --get CPPFLAGS` override_dh_installexamples: $(MAKE) clean dh_installexamples -Xlibsx.h override_dh_install: dh_install mkdir -p debian/libsx0/$(LIBDIR) mkdir -p debian/libsx-dev/$(LIBDIR) mv src/libsx.so debian/libsx0/$(LIBDIR)/libsx.so.0.0.0 mv src/libsx.a debian/libsx-dev/$(LIBDIR) mkdir -p debian/libsx-dev/$(LIBDIR)/pkgconfig/ sed -e 's@LIBDIR@$(LIBDIR)@' < debian/libsx.pc.in > debian/libsx-dev/$(LIBDIR)/pkgconfig/libsx.pc dh_link -p libsx0 $(LIBDIR)/libsx.so.0.0.0 $(LIBDIR)/libsx.so.0 dh_link -p libsx-dev $(LIBDIR)/libsx.so.0.0.0 $(LIBDIR)/libsx.so debian/compat0000644000000000000000000000000212146046005010362 0ustar 9 debian/README.source0000644000000000000000000000047512146046005011351 0ustar README.source ============= This package uses 'quilt' to apply patches; these patches are present in debian/patches. To build the source, as well as 'dpkg-source -x' , you should run: $ ./debian/rules patch This is done as part of the './debian/rules/binary' target by default. - Alastair McKinstry, 2009-09-09. debian/libsx0.dirs0000644000000000000000000000003212146046005011243 0ustar /usr/share/libsx /usr/lib debian/libsx-dev.docs0000644000000000000000000000004512146046005011732 0ustar CHANGES HELP HINTS debian/libsx.spec debian/libsx0.install0000644000000000000000000000004712146046005011756 0ustar src/dialogs/dialogs.* usr/share/libsx debian/libsx.spec0000644000000000000000000001331712146046005011166 0ustar Name: libsx Summary: Simple X library Version: 2.05 Release: 16%{?dist} Group: System Environment/Libraries License: LGPLv2+ Url: ftp://ftp.ac-grenoble.fr/ge/Xlibraries/ Source: ftp://ftp.ac-grenoble.fr/ge/Xlibraries/%{name}-%{version}.tar.bz2 # simpler example for freq Source1: libsx-simple_freq.c Patch0: libsx-no_nested_prototypes.diff Patch1: libsx-comment_caddr_t.diff Patch2: libsx-strdup.diff Patch3: libsx-examples.diff Patch4: libsx-link_mkdir.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 %description Libsx (the Simple X library) is a library of code that sits on top of and to the side of the Athena widget set. Its purpose is to make writing X applications *much* easier. %package devel Summary: Headers and development libraries for libsx Group: Development/Libraries Requires: %{name} = %{version}-%{release} #Requires: xorg-x11-devel Requires: libXaw-devel libXpm-devel libXt-devel %description devel Libsx (the Simple X library) is a library of code that sits on top of and to the side of the Athena widget set. The libsx-devel package contains headers and development libraries necessary for building programs against libsx. %prep %setup -q # 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 -b .strdup # 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 # shared library with fine soname # fix compile flags %patch4 -p1 -b .link_mkdir # allow the rgb file location to be redefined %patch6 -p1 -b .rgb # example of a simple use of the new GetFile cp -p %{SOURCE1} freq/simple_freq.c %build make CFLAGS="%{optflags} -fPIC -DRGBTXT=\"\\\"%{_datadir}/X11/rgb.txt\\\"\"" %install rm -rf %{buildroot} pushd src make install LIBDIR=%{buildroot}%{_libdir} \ INCLUDEDIR=%{buildroot}%{_includedir} \ SHAREDIR=%{buildroot}%{_datadir}/libsx \ copyfile='cp -p' popd rm %{buildroot}%{_libdir}/libsx.a # prepare examples directory rm -rf __dist_examples mkdir -p __dist_examples/examples # pcurve doesn't build since it requires OPENGL_SUPPORT to be used, # and we don't use it, since it is maked as experimental. example_dirs="bezier controlbox creq demo* draw_demo frac freq multireq skel xmore xrootbg" cp -a $example_dirs libsx_defs pcurve __dist_examples/examples/ # remove symlinks pointing to libsx.h in example directories find __dist_examples/examples/ -name libsx.h -a -type l -exec rm \{\} \; find __dist_examples/examples/ -name makefile.examples -exec rm \{\} \; rm __dist_examples/examples/freq/freq.c.strdup for dir in $example_dirs; do make -C __dist_examples/examples/$dir clean done # 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 %postun -p /sbin/ldconfig %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc CHANGES HELP HINTS LICENSE README %{_libdir}/libsx.so.* %{_datadir}/libsx/ %files devel %defattr(-,root,root,-) %doc docs/ __dist_examples/examples/ %{_libdir}/libsx.so %{_includedir}/libsx.h %changelog * Wed Feb 25 2009 Fedora Release Engineering - 2.05-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Tue Feb 19 2008 Fedora Release Engineering - 2.05-15 - Autorebuild for GCC 4.3 * Thu Dec 27 2007 Patrice Dumas 2.05-14 - remove static lib * Thu Dec 27 2007 Patrice Dumas 2.05-13 - keep timestamps * Thu Feb 15 2007 Patrice Dumas 2.05-12 - build examples as part of building the library - replace libsx-protect_strdup.diff with libsx-strdup.diff, which has the fix for freq/freq.c, not only for file in src/ - merge libsx-shared.diff and libsx-mkdir_p.diff in libsx-link_mkdir.diff * Thu Feb 15 2007 Patrice Dumas 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 2.05-10 - add defattr to devel * Sat Jul 15 2006 Patrice Dumas 2.05-9 - fix wrong link - link against X libraries * Fri Feb 17 2006 Patrice Dumas 2.05-8 - rebuild for fc5 * Thu Dec 22 2005 Patrice Dumas 2.05-7 - rebuild * Wed Nov 16 2005 Patrice Dumas 2.05-6 - adapt for modular X * Fri Aug 26 2005 Patrice Dumas 2.05-5 - replace mkinstalldirs with mkdir -p * Fri Aug 26 2005 Patrice Dumas 2.05-4 - correct Requires - remove links to the libsx.h header files in the example directories * Tue Aug 16 2005 Patrice Dumas 2.05-3 - don't ship freq.h or libfreq.a, it is an example - add a simpler definition of SimpleGetFile in freq - ship the example dirs and the doc - use and ship mkinstalldirs to create the dirs instead of mkdirhier - handle correctly shared libraries * Fri Aug 12 2005 Patrice Dumas 2.05-2 - use %%{optflags} and build on fedora with gcc4 - reused spec from http://monkeyrpms.net/fc2-i386/html/libsx.html debian/libsx-dev.examples0000644000000000000000000000016012146046005012616 0ustar bezier controlbox creq demo0 demo1 demo2 demo3 demo4 draw_demo frac freq multireq skel xmore xrootbg libsx_defs debian/changelog0000644000000000000000000000237412146447010011045 0ustar libsx (2.05-5) unstable; urgency=low * libsx.h not shipped in -dev after m-a. Fix install. -- Alastair McKinstry Mon, 20 May 2013 17:22:48 +0100 libsx (2.05-4) unstable; urgency=low * Standards-Version now 3.9.4 * debhelper 9 for multi-arch. * Make multi-arch. * Add $(CFLAGS), $(CPPFLAGS) $(LDFLAGS) to makefiles for fortify. -- Alastair McKinstry Sun, 19 May 2013 10:08:36 +0100 libsx (2.05-3) unstable; urgency=low * Standards-Version: 3.9.2. No changes required. * MAXPATHLEN needs to be defined in multiple source files. fixed patch. -- Alastair McKinstry Sat, 16 Jul 2011 12:21:43 +0100 libsx (2.05-2) unstable; urgency=low * Move to Source-format 3.0 ; removed dependency on quilt * Standards-Version: 3.8.4. No changes required. * Add DEP-3 comments documenting patches. * Change RGBTXT path in libsx-rgb patch to point to file location on Debian. * Add MAXPATHLEN in dirlist.c if undefined; needed to build on Hurd. -- Alastair McKinstry Sun, 09 May 2010 20:40:59 +0100 libsx (2.05-1) unstable; urgency=low * Initial release. (Closes: #546183) -- Alastair McKinstry Fri, 11 Sep 2009 17:32:42 +0100 debian/copyright0000644000000000000000000000253412146046005011123 0ustar This package was debianised by Alastair McKinstry on Wednesday, 9 September 2009. Copyright (C) 2000 Jean-Pierre Demailly It is licensed under the GNU General Public License, version 2.1. On Debian systems, a copy of this license may be found at /usr/share/common-licenses/GPL-2 Downloaded from: ftp://ftp.ac-grenoble.fr/ge/Xlibraries/ Early versions of libsx have been released around 1993 by Dominic Giampaolo (n-Pierre Demaillydbg@sgi.com), using also code provided by Allen Martin (amartin@wpi.wpi.edu). The present release includes an html documentation produced by Stephen Chenney (stephen@cs.su.oz.au) and Winston Holmes (winston@nestor.engr.utk.edu), and some useful additional routines (pixmap buttons, file selector, color selector, internationalization). Libsx-2.05 should be mostly API compatible with earlier versions -- at least as much as libsx-1.1 was with libsx-1.0. These modifications have been made step by step over a period of 2 years 1998-2000. The first widely announced public release of version 2 was 2.03. Version 2.0x, especially, include an internationalization routine. To produce dialogs for a new language, it is only needed to translate the (20 lines) file src/dialogs/dialogs.XX where XX is the country code. Jean-Pierre Demailly Universit\'e de Grenoble I July 29, 2000 demailly@fourier.ujf-grenoble.fr debian/libsx.pc.in0000644000000000000000000000035012146446304011242 0ustar prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/LIBDIR Name: libsx Description: Simple X library Version: 2.05 Libs: -L${libdir} -lsx Requires.private: xt xmu xpm xaw7 Libs.private: -$L{libdir} -lsx -lX11 -lXpm -Xaw -Xmu