diff -urN svgalib-1.9.17/Makefile svgalib-1.9.17.gentoo/Makefile --- svgalib-1.9.17/Makefile 2002-12-09 17:33:14.000000000 +0200 +++ svgalib-1.9.17.gentoo/Makefile 2002-12-26 03:05:36.000000000 +0200 @@ -78,10 +78,10 @@ installheaders: @echo Installing header files in $(includedir). - @if [ -f /usr/include/vga.h ]; then \ - rm -f /usr/include/vga.h /usr/include/vgagl.h; \ - echo Old header files in /usr/include removed.; \ - fi +# @if [ -f /usr/include/vga.h ]; then \ +# rm -f /usr/include/vga.h /usr/include/vgagl.h; \ +# echo Old header files in /usr/include removed.; \ +# fi @mkdir -p $(includedir) @cp $(srcdir)/src/vga.h $(includedir)/vga.h @chmod a+r $(includedir)/vga.h @@ -95,10 +95,10 @@ @chmod a+r $(includedir)/vgakeyboard.h installsharedlib: $(SHAREDLIBS) $(SVGALIBSHAREDSTUBS) - @if [ -f /usr/lib/libvga.sa ]; then \ - rm -f /usr/lib/libvga.sa /usr/lib/libvgagl.sa; \ - echo Old stubs in /usr/lib removed.; \ - fi +# @if [ -f /usr/lib/libvga.sa ]; then \ +# rm -f /usr/lib/libvga.sa /usr/lib/libvgagl.sa; \ +# echo Old stubs in /usr/lib removed.; \ +# fi ifndef KEEPSHAREDLIBS @echo "Removing shared library images (old & current)..." @for i in $(OBSOLETELDIRS); do \ @@ -112,16 +112,16 @@ (cd $(sharedlibdir); \ ln -sf $$foo `echo $$foo | sed 's/\.so\..*/.so/'` ); \ done - @./fixldsoconf - @ldconfig +# @./fixldsoconf +# @ldconfig installstaticlib: static @echo Installing static libraries in $(libdir). @mkdir -p $(libdir) - @rm -f /usr/lib/libvga.a +# @rm -f /usr/lib/libvga.a @$(INSTALL_DATA) staticlib/libvga.a $(libdir)/libvga.a @chmod a+r $(libdir)/libvga.a - @rm -f /usr/lib/libvgagl.a +# @rm -f /usr/lib/libvgagl.a @$(INSTALL_DATA) staticlib/libvgagl.a $(libdir)/libvgagl.a @chmod a+r $(libdir)/libvgagl.a @@ -130,14 +130,14 @@ echo No $(bindir) directory, creating it.; \ mkdir -p $(bindir); \ fi - @if [ -f /usr/bin/restorefont ]; then \ - echo Removing old utilities in /usr/bin.; \ - for x in $(UTILS); do rm -f /usr/bin/$$x; done; \ - fi - @if [ -f /usr/bin/convfont ]; then \ - echo Removing inappropriate utilities in /usr/bin.; \ - rm -f /usr/bin/convfont /usr/bin/setmclk; \ - fi +# @if [ -f /usr/bin/restorefont ]; then \ +# echo Removing old utilities in /usr/bin.; \ +# for x in $(UTILS); do rm -f /usr/bin/$$x; done; \ +# fi +# @if [ -f /usr/bin/convfont ]; then \ +# echo Removing inappropriate utilities in /usr/bin.; \ +# rm -f /usr/bin/convfont /usr/bin/setmclk; \ +# fi @echo Installing textmode utilities in $(bindir): @echo "restorefont: Save/restore textmode font." @cp utils/restorefont $(bindir) @@ -163,22 +163,22 @@ mkdir $(datadir); \ chmod go-w $(datadir); \ fi - @if [ \( -f /usr/local/lib/libvga.config -a ! -f $(datadir)/libvga.config \) ]; then \ - echo "Moving old config file /usr/local/lib/libvga.config to $(datadir)." ; \ - mv -f /usr/local/lib/libvga.config $(datadir)/libvga.config; \ - fi - @if [ \( -f /usr/local/lib/libvga.et4000 -a ! -f $(datadir)/libvga.et4000 \) ]; then \ - echo "Moving old config file /usr/local/lib/libvga.et4000 to $(datadir)." ; \ - mv -f /usr/local/lib/libvga.et4000 $(datadir)/libvga.et4000; \ - fi - @if [ \( -f /usr/local/lib/libvga.ega -a ! -f $(datadir)/libvga.ega \) ]; then \ - echo "Moving old config file /usr/local/lib/libvga.ega to $(datadir)." ; \ - mv -f /usr/local/lib/libvga.ega $(datadir)/libvga.ega; \ - fi - @if [ \( -f /etc/mach32.eeprom -a ! -f $(datadir)/mach32.eeprom \) ]; then \ - echo Consider moving your /etc/mach32.eeprom file to $(datadir) ; \ - echo and changing $(datadir)/libvga.config appropriately. ; \ - fi +# @if [ \( -f /usr/local/lib/libvga.config -a ! -f $(datadir)/libvga.config \) ]; then \ +# echo "Moving old config file /usr/local/lib/libvga.config to $(datadir)." ; \ +# mv -f /usr/local/lib/libvga.config $(datadir)/libvga.config; \ +# fi +# @if [ \( -f /usr/local/lib/libvga.et4000 -a ! -f $(datadir)/libvga.et4000 \) ]; then \ +# echo "Moving old config file /usr/local/lib/libvga.et4000 to $(datadir)." ; \ +# mv -f /usr/local/lib/libvga.et4000 $(datadir)/libvga.et4000; \ +# fi +# @if [ \( -f /usr/local/lib/libvga.ega -a ! -f $(datadir)/libvga.ega \) ]; then \ +# echo "Moving old config file /usr/local/lib/libvga.ega to $(datadir)." ; \ +# mv -f /usr/local/lib/libvga.ega $(datadir)/libvga.ega; \ +# fi +# @if [ \( -f /etc/mach32.eeprom -a ! -f $(datadir)/mach32.eeprom \) ]; then \ +# echo Consider moving your /etc/mach32.eeprom file to $(datadir) ; \ +# echo and changing $(datadir)/libvga.config appropriately. ; \ +# fi @if [ ! -f $(datadir)/libvga.config ]; then \ echo Installing default configuration file in $(datadir).; \ cp $(confdir)/libvga.config $(datadir)/libvga.config; \ @@ -208,8 +208,8 @@ lib3dkit-install: (cd threeDKit/; $(MAKE) install) -install: uninstall installheaders $(INSTALLSHAREDLIB) installconfig \ - $(INSTALLSTATICLIB) $(INSTALLUTILS) $(INSTALLMAN) installmodule $(INSTALLDEV) \ +install: installheaders $(INSTALLSHAREDLIB) installconfig \ + $(INSTALLSTATICLIB) $(INSTALLUTILS) $(INSTALLMAN) installmodule \ lib3dkit-install @echo @echo @@ -286,15 +286,23 @@ @rm -f sharedlib/DISTRIBUTION (cd $(dir $@); \ $(MAKE) -f $(srcdir)/src/Makefile $(notdir $@) \ - srcdir="$(srcdir)" DLLFLAGS="$(DLLFLAGS)" \ + srcdir="$(srcdir)" DLLFLAGS="$(DLLFLAGS)" ; \ + ln -sf libvga.so.$(VERSION) libvga.so \ ) -sharedlib/libvgagl.a sharedlib/libvgagl.so.$(VERSION): $(SHAREDDIRS) +sharedlib/libvgagl.a: $(SHAREDDIRS) (cd $(dir $@); \ $(MAKE) -f $(srcdir)/gl/Makefile $(notdir $@) \ srcdir="$(srcdir)" DLLFLAGS="$(DLLFLAGS)" \ ) +sharedlib/libvgagl.so.$(VERSION): $(SHAREDDIRS) + (cd $(dir $@); \ + $(MAKE) -f $(srcdir)/gl/Makefile $(notdir $@) \ + srcdir="$(srcdir)" DLLFLAGS="$(DLLFLAGS)" ; \ + ln -sf libvgagl.so.$(VERSION) libvgagl.so \ + ) + demoprogs: $(PREDEMO) $(DEMODIRS) @for dir in $(DEMODIRS); do \ if [ -d $(srcdir)/$$dir ]; then \ diff -urN svgalib-1.9.17/Makefile.cfg svgalib-1.9.17.gentoo/Makefile.cfg --- svgalib-1.9.17/Makefile.cfg 2002-12-03 11:53:56.000000000 +0200 +++ svgalib-1.9.17.gentoo/Makefile.cfg 2002-12-26 03:07:28.000000000 +0200 @@ -44,7 +44,7 @@ # Common prefix for installation directories. # NOTE: This directory must exist when you start the install. TOPDIR= -prefix = $(TOPDIR)/usr/local +prefix = $(TOPDIR)/usr exec_prefix = $(prefix) # Directory where the shared stubs and static library will be installed. @@ -57,13 +57,13 @@ bindir = $(exec_prefix)/bin # Directory where the run-time configuration files will be installed. -datadir = $(TOPDIR)/etc/vga +datadir = $(TOPDIR)/etc/svgalib # Directory where the header files will be installed. includedir = $(prefix)/include # Directory where the man files will be installed. -mandir = $(prefix)/man +mandir = $(prefix)/share/man # Target binary format. TARGET_FORMAT = elf @@ -93,7 +93,7 @@ # LIBC_MEMCPY = y # Uncomment this if you want to compile and install the static libs. -# INSTALLSTATICLIB = installstaticlib +INSTALLSTATICLIB = installstaticlib # Comment this out if you don't want to install the shared libs. # If you do not install the shared nor the static libs, 'make static' @@ -104,7 +104,7 @@ # Comment this out if you want to keep old shared images. Old header files, # library stubs and static libraries CANNOT be kept in public locations # except when you rename them yourself. -# KEEPSHAREDLIBS = keep +KEEPSHAREDLIBS = keep # Comment this out if you don't want to compile and install the utilities. INSTALLUTILS = installutils @@ -281,10 +281,8 @@ endif -ifndef CFLAGS - OPTIMIZE = -fomit-frame-pointer -O2 -fno-strength-reduce -pipe -g -else - OPTIMIZE := $(CFLAGS) +ifndef OPTIMIZE + OPTIMIZE = -fomit-frame-pointer -O2 -fno-strength-reduce -pipe endif # You might want to add -m386 here if you have a recently installed @@ -292,15 +290,15 @@ # generous alignment padding of function entry-points for the 486. WARN = -Wall -Wstrict-prototypes INCLUDES = -I$(srcdir)/include -I. -CFLAGS = $(WARN) $(DLLFLAGS) $(INCLUDES) $(OPTIMIZE) $(DEFINES) +CFLAGS += $(WARN) $(DLLFLAGS) $(INCLUDES) $(OPTIMIZE) $(DEFINES) -LDFLAGS = -s +LDFLAGS = # additional flags for shared lib. DLLFLAGS = -fPIC # Utilites used. AR = ar -INSTALL_PROGRAM = install -c -s -m 755 -o root -g bin +INSTALL_PROGRAM = install -c -m 755 -o root -g bin INSTALL_SHLIB = install -c -m 755 -o root -g bin INSTALL_DATA = install -c -m 644 -o root -g bin diff -urN svgalib-1.9.17/kernel/svgalib_helper/Makefile svgalib-1.9.17.gentoo/kernel/svgalib_helper/Makefile --- svgalib-1.9.17/kernel/svgalib_helper/Makefile 2002-10-28 18:25:47.000000000 +0200 +++ svgalib-1.9.17.gentoo/kernel/svgalib_helper/Makefile 2002-12-26 03:04:43.000000000 +0200 @@ -35,8 +35,8 @@ install: device modules_install modules_install: $(TARGET).o - mkdir -p /lib/modules/$(VER)/kernel/misc - install -m 0644 -c $(TARGET).o /lib/modules/$(VER)/kernel/misc + mkdir -p $(TOPDIR)/lib/modules/$(VER)/misc + install -m 0644 -c $(TARGET).o $(TOPDIR)/lib/modules/$(VER)/misc device: rm -f /dev/svgalib_helper* /dev/svga /dev/svga? diff -urN svgalib-1.9.17/src/Makefile svgalib-1.9.17.gentoo/src/Makefile --- svgalib-1.9.17/src/Makefile 2002-07-06 19:59:26.000000000 +0200 +++ svgalib-1.9.17.gentoo/src/Makefile 2002-12-26 02:57:40.000000000 +0200 @@ -461,10 +461,6 @@ vga.o: vga.c $(CC) $(CFLAGS) $(VGA_DEFINES) -c -o $@ $< -#lrmi must NOT be compiled as -fPIC -lrmi.o: lrmi.c - $(CC) $(CFLAGS:-fPIC=) -c -o $@ $< - $(RAMDAC): %.o: %.c $(CC) $(CFLAGS) $(RAMDAC_DEFINES) -c -o $@ $< diff -urN svgalib-1.9.17/threeDKit/Makefile svgalib-1.9.17.gentoo/threeDKit/Makefile --- svgalib-1.9.17/threeDKit/Makefile 2002-07-26 16:16:10.000000000 +0200 +++ svgalib-1.9.17.gentoo/threeDKit/Makefile 2002-12-26 02:57:40.000000000 +0200 @@ -14,7 +14,7 @@ # Compiler Section (overrides Makefile.cfg) #---------------------------------------------------------------------- -INCLUDES += -I$(srcdir)/src +INCLUDES += -I$(srcdir)/src -I$(srcdir)/gl #---------------------------------------------------------------------- # Rules Section diff -urN svgalib-1.9.17/utils/Makefile svgalib-1.9.17.gentoo/utils/Makefile --- svgalib-1.9.17/utils/Makefile 1999-07-21 18:41:18.000000000 +0200 +++ svgalib-1.9.17.gentoo/utils/Makefile 2002-12-26 02:57:40.000000000 +0200 @@ -13,10 +13,11 @@ # Compiler Section (overrides Makefile.cfg) #---------------------------------------------------------------------- -CFLAGS = $(WARN) $(OPTIMIZE) -I../include +INCLUDES=-I../include +CFLAGS = $(WARN) $(OPTIMIZE) $(INCLUDES) #Use the next one for the Alpha/AXP if you need it #LDFLAGS = -L../staticlib -LIBS = -lvga -lm +LIBS = -L$(srcdir)/sharedlib -L$(srcdir)/staticlib -lvga -lm #---------------------------------------------------------------------- # Rules Section @@ -56,7 +57,7 @@ $(INSTALLPROG) $(UTILPROGS) $(UTILINSTALLDIR) .depend: - gcc -MM $(patsubst %.o,$(srcdir)/utils/%.c,$(OBJECTS)) >.depend + gcc $(INCLUDES) -MM $(patsubst %.o,$(srcdir)/utils/%.c,$(OBJECTS)) >.depend # # include a dependency file if one exists --- svgalib-1.9.17/demos/lineart.c 2003-08-03 14:13:02.000000000 +0200 +++ svgalib-1.9.17.gentoo/demos/lineart.c 2003-08-03 14:13:09.000000000 +0200 @@ -19,7 +19,7 @@ if(mode == 0) { - printf("Usage:linp [mode mode ...]\n + printf("Usage:linp [mode mode ...]\n\ where mode is an integer.\n"); return; }