summaryrefslogtreecommitdiff
path: root/graphics/clanlib/patches
diff options
context:
space:
mode:
authorgarbled <garbled>1999-07-21 22:56:35 +0000
committergarbled <garbled>1999-07-21 22:56:35 +0000
commita7c95429d55a91793b030482bb3b067fb0238bf2 (patch)
tree2f1aca5fe4c554fe79c8bca8b5361fd4026df66b /graphics/clanlib/patches
parent0f347d3e1ac564919026dff5b7e67d0680e3615c (diff)
downloadpkgsrc-a7c95429d55a91793b030482bb3b067fb0238bf2.tar.gz
Import of clanlib 0.1.15. Known to work on ELF.. a.out may need some
work. The ClanLib Game SDK.
Diffstat (limited to 'graphics/clanlib/patches')
-rw-r--r--graphics/clanlib/patches/patch-aa61
-rw-r--r--graphics/clanlib/patches/patch-ab12
-rw-r--r--graphics/clanlib/patches/patch-ac27
-rw-r--r--graphics/clanlib/patches/patch-ad15
-rw-r--r--graphics/clanlib/patches/patch-ae31
-rw-r--r--graphics/clanlib/patches/patch-af23
-rw-r--r--graphics/clanlib/patches/patch-ag57
-rw-r--r--graphics/clanlib/patches/patch-ah239
-rw-r--r--graphics/clanlib/patches/patch-ai11
-rw-r--r--graphics/clanlib/patches/patch-aj14
-rw-r--r--graphics/clanlib/patches/patch-ak12
11 files changed, 502 insertions, 0 deletions
diff --git a/graphics/clanlib/patches/patch-aa b/graphics/clanlib/patches/patch-aa
new file mode 100644
index 00000000000..4e2f522a320
--- /dev/null
+++ b/graphics/clanlib/patches/patch-aa
@@ -0,0 +1,61 @@
+$NetBSD: patch-aa,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+--- configure.orig Wed Jun 9 15:47:21 1999
++++ configure Fri Jul 9 09:01:33 1999
+@@ -1981,8 +1981,11 @@
+
+
+
+-
+-libs1="-lz -lHermes"
++if test -f "libz.a"; then
++ libs1="libz.a -lHermes"
++else
++ libs1="-lz -lHermes"
++fi
+ libs2=""
+
+ if test "$USE_LIBPNG" = "enabled"; then
+@@ -2004,27 +2007,27 @@
+ display_targets=""
+
+ if test "$USE_X11" = "enabled"; then
+- display_targets="$display_targets libclan-display-x11.so"
++ display_targets="$display_targets libclan-display-x11.so.0.0"
+ fi
+
+ if test "$USE_MESA" = "enabled"; then
+- display_targets="$display_targets libclan-display-mesa.so"
++ display_targets="$display_targets libclan-display-mesa.so.0.0"
+ fi
+
+ if test "$USE_PTC" = "enabled"; then
+- display_targets="$display_targets libclan-display-ptc.so"
++ display_targets="$display_targets libclan-display-ptc.so.0.0"
+ fi
+
+ if test "$USE_GGI" = "enabled"; then
+- display_targets="$display_targets libclan-display-ggi.so"
++ display_targets="$display_targets libclan-display-ggi.so.0.0"
+ fi
+
+ if test "$USE_SVGALIB" = "enabled"; then
+- display_targets="$display_targets libclan-display-svgalib.so"
++ display_targets="$display_targets libclan-display-svgalib.so.0.0"
+ fi
+
+ if test "$USE_FBDEV" = "enabled"; then
+- display_targets="$display_targets libclan-display-fbdev.so"
++ display_targets="$display_targets libclan-display-fbdev.so.0.0"
+ fi
+
+
+@@ -2040,6 +2043,9 @@
+ fi
+ if test -x /usr/local/bin/perl; then
+ perl_exec="/usr/local/bin/perl"
++fi
++if test -x $LOCALBASE/bin/perl; then
++ perl_exec="$LOCALBASE/bin/perl"
+ fi
+ if test "$perl_exec" = ""; then
+ perl_exec="/usr/bin/perl"
diff --git a/graphics/clanlib/patches/patch-ab b/graphics/clanlib/patches/patch-ab
new file mode 100644
index 00000000000..716697f6cc2
--- /dev/null
+++ b/graphics/clanlib/patches/patch-ab
@@ -0,0 +1,12 @@
+$NetBSD: patch-ab,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+--- Common/formatted_data.h.BAK Sat Apr 17 00:41:13 1999
++++ Common/formatted_data.h Sat Apr 17 00:41:36 1999
+@@ -8,6 +8,8 @@
+ #ifdef WIN32
+ #include <winsock.h>
+ #else
++#include <sys/param.h>
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #endif
+
diff --git a/graphics/clanlib/patches/patch-ac b/graphics/clanlib/patches/patch-ac
new file mode 100644
index 00000000000..f904012bb86
--- /dev/null
+++ b/graphics/clanlib/patches/patch-ac
@@ -0,0 +1,27 @@
+$NetBSD: patch-ac,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+--- Layer1/Sound/ClanSound/ClanSound/oss.cpp.orig Mon Dec 21 16:24:50 1998
++++ Layer1/Sound/ClanSound/ClanSound/oss.cpp Sat Jul 17 08:41:13 1999
+@@ -8,7 +8,11 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
++#ifdef __NetBSD__
++#include <soundcard.h>
++#else
+ #include <sys/soundcard.h>
++#endif
+ #include <iostream.h>
+
+ #include "oss.h"
+@@ -24,7 +28,11 @@
+ int cs_oss_init()
+ //: Initialize sound playback.
+ {
++#ifndef __NetBSD__
+ dev_dsp_fd = open("/dev/dsp", O_WRONLY);
++#else
++ dev_dsp_fd = open("/dev/sound", O_WRONLY);
++#endif
+ if (dev_dsp_fd == -1)
+ {
+ cout << "ClanSound: Could not open /dev/dsp. No sound will be available." << endl;
diff --git a/graphics/clanlib/patches/patch-ad b/graphics/clanlib/patches/patch-ad
new file mode 100644
index 00000000000..41233c7095e
--- /dev/null
+++ b/graphics/clanlib/patches/patch-ad
@@ -0,0 +1,15 @@
+$NetBSD: patch-ad,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+--- Makefile.conf.in.orig Sun May 30 15:43:50 1999
++++ Makefile.conf.in Thu Jul 8 11:27:24 1999
+@@ -9,9 +9,9 @@
+ INC_PREFIX = @includedir@
+ BIN_PREFIX = @bindir@
+
+-INCLUDE_DIRS = -I . -I Layer1 -I Layer2 -I Layer2/StreamSoundProviders/mikmod/include @x_includes@
++INCLUDE_DIRS = -I . -I Layer1 -I Layer2 -I Layer2/StreamSoundProviders/mikmod/include @x_includes@ -I$(LOCALBASE)/include
+
+-COMP_OPTIONS = -Wall -g $(INCLUDE_DIRS) -fPIC -O2 @DEFS@
++COMP_OPTIONS = -g $(CFLAGS) $(INCLUDE_DIRS) -fPIC -O2 @DEFS@
+
+ LINK_LIBS1 = @libs1@
+ LINK_LIBS2 = @libs2@
diff --git a/graphics/clanlib/patches/patch-ae b/graphics/clanlib/patches/patch-ae
new file mode 100644
index 00000000000..5d6867bdcb6
--- /dev/null
+++ b/graphics/clanlib/patches/patch-ae
@@ -0,0 +1,31 @@
+$NetBSD: patch-ae,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+--- Layer1/Input/X11/joystick_linux.h.orig Thu Jul 8
+11:36:50 1999
++++ Layer1/Input/X11/joystick_linux.h Thu Jul 8 11:41:55 1999
+@@ -21,13 +21,16 @@
+ #define header_joystick_linux
+
+ // TODO: ifdef this out if it isn't a linux system.
+-
+-#include <linux/version.h>
+-
+ #ifndef KERNEL_VERSION
+ #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+ #endif
+
++#ifdef __NetBSD__
++#define LINUX_VERSION_CODE KERNEL_VERSION(1,0,0)
++#else
++
++#include <linux/version.h>
++
+ #ifndef LINUX_VERSION_CODE
+ #error "You need to use at least 2.0 Linux kernel."
+ #endif
+@@ -109,5 +112,5 @@
+ };
+
+ #endif
+-
++#endif
+ #endif
diff --git a/graphics/clanlib/patches/patch-af b/graphics/clanlib/patches/patch-af
new file mode 100644
index 00000000000..79b9c39d291
--- /dev/null
+++ b/graphics/clanlib/patches/patch-af
@@ -0,0 +1,23 @@
+$NetBSD: patch-af,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+--- Layer1/System/Unix/init_linux.cpp.orig Thu Jun 3
+19:58:39 1999
++++ Layer1/System/Unix/init_linux.cpp Tue Jul 20 08:34:23 1999
+@@ -193,7 +193,7 @@
+
+ if (dynload_add_network == NULL)
+ {
+- cout << "Unable to load any sound implementation. Sorry." << endl;
++ cout << "Unable to load any network implementation. Sorry." << endl;
+ exit(1);
+ }
+
+@@ -275,7 +275,9 @@
+ // init signal handling
+ act.sa_handler = signal_handler;
+ act.sa_flags = 0;
++#ifndef __NetBSD__
+ act.sa_restorer = NULL;
++#endif
+ sigemptyset(&act.sa_mask);
+ sigaction(SIGTERM,&act,&old); // terminated, by kill
+ sigaction(SIGINT,&act,&old); // interrupt, ctrl-c
diff --git a/graphics/clanlib/patches/patch-ag b/graphics/clanlib/patches/patch-ag
new file mode 100644
index 00000000000..5688e312ea7
--- /dev/null
+++ b/graphics/clanlib/patches/patch-ag
@@ -0,0 +1,57 @@
+$NetBSD: patch-ag,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+--- Layer1/System/Unix/appconf.cpp.orig Thu Jul 8 11:48:23 1999
++++ Layer1/System/Unix/appconf.cpp Thu Jul 8 12:01:20 1999
+@@ -56,12 +56,14 @@
+ # include <windows.h>
+ #endif // WIN32
+
+-#ifdef __unix__
++#if defined(__unix__) || defined(__NetBSD__)
+ # include <sys/param.h>
+ # include <sys/stat.h>
+ # include <unistd.h>
++#ifndef __NetBSD__
+ # define MAX_PATH MAXPATHLEN
+ #endif
++#endif
+
+ #include <fcntl.h>
+ #include <sys/types.h>
+@@ -161,7 +163,7 @@
+ #if APPCONF_CASE_SENSITIVE
+ # define StrCmp(s1,s2) strcmp((s1),(s2))
+ #else
+-# ifdef __unix__
++# if defined(__unix__) || defined(__NetBSD__)
+ extern "C" int strcasecmp(const char *s1, const char *s2); // it's not ansi
+ # define StrCmp(s1,s2) strcasecmp((s1),(s2))
+ # else
+@@ -1306,6 +1308,10 @@
+ // ----------------------------------------------------------------------------
+ // config files standard locations
+ // ----------------------------------------------------------------------------
++#ifdef __NetBSD__
++#include <sys/syslimits.h>
++#define MAX_PATH PATH_MAX
++#endif
+
+ // ### buffer overflows in sight...
+ const char *FileConfig::GlobalConfigFile() const
+@@ -1315,7 +1321,7 @@
+ // check if file has extension
+ Bool bNoExt = strchr(m_szFileName, '.') == NULL;
+
+-#ifdef __unix__
++#if defined(__unix__) || defined(__NetBSD__)
+ strcpy(s_szBuf, "/etc/");
+ strcat(s_szBuf, m_szFileName);
+ if ( bNoExt )
+@@ -1338,7 +1344,7 @@
+ {
+ static char s_szBuf[MAX_PATH];
+
+-#ifdef __unix__
++#if defined(__unix__) || defined(__NetBSD__)
+ const char *szHome = getenv("HOME");
+ if ( szHome == NULL ) {
+ // we're homeless...
diff --git a/graphics/clanlib/patches/patch-ah b/graphics/clanlib/patches/patch-ah
new file mode 100644
index 00000000000..cb2e07c63be
--- /dev/null
+++ b/graphics/clanlib/patches/patch-ah
@@ -0,0 +1,239 @@
+$NetBSD: patch-ah,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+--- Makefile.in.orig Fri Jun 4 08:44:28 1999
++++ Makefile.in Tue Jul 20 20:16:34 1999
+@@ -96,7 +96,6 @@
+ OutputFiles/cardplayback_clan.o \
+ OutputFiles/clansound.o \
+ OutputFiles/mixer.o \
+- OutputFiles/mixer_asm.o \
+ OutputFiles/oss.o \
+ OutputFiles/sample.o \
+ OutputFiles/session.o \
+@@ -209,11 +208,11 @@
+
+ display_targets: @display_targets@
+
+-sound_targets: libclan-sound.so
++sound_targets: libclan-sound.so.0.0
+
+-network_targets: libclan-network.so
++network_targets: libclan-network.so.0.0
+
+-core_libs: libclan.so libclanlayer1.so libclanlayer2.so libclancommon.so
++core_libs: libclan.so.0.0 libclanlayer1.so.0.0 libclanlayer2.so.0.0 libclancommon.so.0.0
+
+ install: all
+ @echo ""
+@@ -225,33 +224,33 @@
+ @for i in `find Layer1 -name 'API'`; do install -d $(INC_PREFIX)/ClanLib/$$i; done
+ @for i in `find Layer2 -type d|grep -v CVS`; do install -d $(INC_PREFIX)/ClanLib/$$i; done
+ @install -d $(INC_PREFIX)/ClanLib/Common
+- @for i in `find Layer1 -name '*.h'|grep API`; do install -m 0644 $$i $(INC_PREFIX)/ClanLib/$$i; done
+- @for i in `find Layer2 -name '*.h'`; do install -m 0644 $$i $(INC_PREFIX)/ClanLib/$$i; done
+- @for i in `find Common -name '*.h'`; do install -m 0644 $$i $(INC_PREFIX)/ClanLib/$$i; done
+- @install -m 0644 clanlib.h $(INC_PREFIX)/ClanLib/clanlib.h
+- @install -m 0644 clanlayer2.h $(INC_PREFIX)/ClanLib/clanlayer2.h
++ @for i in `find Layer1 -name '*.h'|grep API`; do install -c -m 0644 $$i $(INC_PREFIX)/ClanLib/$$i; done
++ @for i in `find Layer2 -name '*.h'`; do install -c -m 0644 $$i $(INC_PREFIX)/ClanLib/$$i; done
++ @for i in `find Common -name '*.h'`; do install -c -m 0644 $$i $(INC_PREFIX)/ClanLib/$$i; done
++ @install -c -m 0644 clanlib.h $(INC_PREFIX)/ClanLib/clanlib.h
++ @install -c -m 0644 clanlayer2.h $(INC_PREFIX)/ClanLib/clanlayer2.h
+ @strip Utils/DatafileCompiler/datafile_compiler
+ @echo "Datafile compiler is being installed in $(BIN_PREFIX)."
+ @install Utils/DatafileCompiler/datafile_compiler $(BIN_PREFIX)
+ @echo "Libraries are being installed in $(LIB_PREFIX)."
+- @install libclan.so $(LIB_PREFIX)
+- @install libclanlayer1.so $(LIB_PREFIX)
+- @install libclanlayer2.so $(LIB_PREFIX)
+- @install libclancommon.so $(LIB_PREFIX)
+- @install libclan-network.so $(LIB_PREFIX)
+- @install libclan-sound.so $(LIB_PREFIX)
+- @if [ -f libclan-display-x11.so ]; then install libclan-display-x11.so $(LIB_PREFIX); fi
+- @if [ -f libclan-display-mesa.so ]; then install libclan-display-mesa.so $(LIB_PREFIX); fi
+- @if [ -f libclan-display-fbdev.so ]; then install libclan-display-fbdev.so $(LIB_PREFIX); fi
+- @if [ -f libclan-display-ptc.so ]; then install libclan-display-ptc.so $(LIB_PREFIX); fi
+- @if [ -f libclan-display-svgalib.so ]; then install libclan-display-svgalib.so $(LIB_PREFIX); fi
+- @if [ -f libclan-display-ggi.so ]; then install libclan-display-ggi.so $(LIB_PREFIX); fi
++ @install libclan.so.0.0 $(LIB_PREFIX)
++ @install libclanlayer1.so.0.0 $(LIB_PREFIX)
++ @install libclanlayer2.so.0.0 $(LIB_PREFIX)
++ @install libclancommon.so.0.0 $(LIB_PREFIX)
++ @install libclan-network.so.0.0 $(LIB_PREFIX)
++ @install libclan-sound.so.0.0 $(LIB_PREFIX)
++ @if [ -f libclan-display-x11.so.0.0 ]; then install libclan-display-x11.so.0.0 $(LIB_PREFIX); fi
++ @if [ -f libclan-display-mesa.so.0.0 ]; then install libclan-display-mesa.so.0.0 $(LIB_PREFIX); fi
++ @if [ -f libclan-display-fbdev.so.0.0 ]; then install libclan-display-fbdev.so.0.0 $(LIB_PREFIX); fi
++ @if [ -f libclan-display-ptc.so.0.0 ]; then install libclan-display-ptc.so.0.0 $(LIB_PREFIX); fi
++ @if [ -f libclan-display-svgalib.so.0.0 ]; then install libclan-display-svgalib.so.0.0 $(LIB_PREFIX); fi
++ @if [ -f libclan-display-ggi.so.0.0 ]; then install libclan-display-ggi.so.0.0 $(LIB_PREFIX); fi
+
+ docs: configure
+- cd Docs; make
++ cd Docs; gmake
+
+ docs_install: docs
+- cd Docs; make install
++ cd Docs; gmake install
+
+ configure: configure.in
+ @autoconf
+@@ -263,16 +262,16 @@
+ @echo ""
+ @cat ascii-logo
+
+-utils: libclan.so
+- @cd Utils; make
++utils: libclan.so.0.0
++ @cd Utils; gmake
+
+ examples:
+- @cd Docs/examples; make
++ @cd Docs/examples; gmake
+
+ clean:
+ @echo "Cleaning project..."
+ @find . -name '*.o' -exec rm "{}" \;
+- @find . -name '*.so' -exec rm "{}" \;
++ @find . -name '*.so.0.0' -exec rm "{}" \;
+ @find . -name '*.a' -exec rm "{}" \;
+ @if [ -d "OutputFiles" ]; then rm -rf OutputFiles; fi
+ @rm -f ./Utils/DatafileCompiler/datafile_compiler
+@@ -286,8 +285,8 @@
+ @rm -f Docs/perceps
+ @rm -f Docs/reference/.perceps
+ @find . -name '.#*' -exec rm "{}" \;
+- @cd Docs && make distclean
+- @cd Docs/examples && make distclean
++ @cd Docs && gmake distclean
++ @cd Docs/examples && gmake distclean
+ @autoconf
+
+ dep:
+@@ -305,55 +304,79 @@
+
+ # Dynamic linking:
+
+-LIB_OPTIONS = -fPIC -fpic -g -shared
++LIB_OPTIONS = -fPIC -g -shared $(LDFLAGS)
+
+-libclancommon.so: $(OBJF_COMMON)
+- @echo "Building dynamic library (libclancommon.so)"
+- @g++ $(LIB_OPTIONS) -o libclancommon.so $(OBJF_COMMON)
+-
+-libclanlayer1.so: libclancommon.so $(OBJF_GENERIC_ALL) $(OBJF_UNIX)
+- @echo "Building dynamic library (libclanlayer1.so)"
+- @g++ $(LIB_OPTIONS) -ldl -o libclanlayer1.so -L. -lclancommon $(LINK_LIBS1) $(OBJF_GENERIC_ALL) $(OBJF_UNIX)
+-
+-libclanlayer2.so: $(OBJF_LAYER2)
+- @echo "Building dynamic library (libclanlayer2.so)"
+- @g++ $(LIB_OPTIONS) -o libclanlayer2.so $(LINK_LIBS2) $(OBJF_LAYER2)
+-
+-libclan.so: $(OBJF_COMMON) $(OBJF_GENERIC_ALL) $(OBJF_UNIX)
+- @echo "Building dynamic library (libclan.so)"
+- @g++ $(LIB_OPTIONS) -ldl -o libclan.so $(LINK_LIBS1) $(OBJF_COMMON) $(OBJF_GENERIC_ALL) $(OBJF_UNIX)
+-
+-libclan-network.so: $(OBJF_NETWORK_UNIX)
+- @echo "Building dynamic library (libclan-network.so)"
+- @g++ $(LIB_OPTIONS) -o libclan-network.so $(OBJF_NETWORK_UNIX)
+-
+-libclan-sound.so: $(OBJF_SOUND_CLANSOUND)
+- @echo "Building dynamic library (libclan-sound.so)"
+- @g++ $(LIB_OPTIONS) -o libclan-sound.so $(OBJF_SOUND_CLANSOUND)
+-
+-libclan-display-x11.so: $(OBJF_DISP_X11)
+- @echo "Building dynamic library (libclan-display-x11.so)"
+- @g++ $(LIB_OPTIONS) @x_libraries@ -o libclan-display-x11.so $(OBJF_DISP_X11)
+-
+-libclan-display-ptc.so: $(OBJF_DISP_PTC) libclan-display-x11.so
+- @echo "Building dynamic library (libclan-display-ptc.so)"
+- @g++ $(LIB_OPTIONS) -L . -lclan-display-x11 -lptc -o libclan-display-ptc.so $(OBJF_DISP_PTC)
+-
+-libclan-display-mesa.so: $(OBJF_DISP_MESA) libclan-display-x11.so
+- @echo "Building dynamic library (libclan-display-mesa.so)"
+- @g++ $(LIB_OPTIONS) -L . -lclan-display-x11 @x_libraries@ -lMesaGL -o libclan-display-mesa.so $(OBJF_DISP_MESA)
+-
+-libclan-display-ggi.so: $(OBJF_DISP_GGI)
+- @echo "Building dynamic library (libclan-display-ggi.so)"
+- @g++ $(LIB_OPTIONS) -lggi -o libclan-display-ggi.so $(OBJF_DISP_GGI)
+-
+-libclan-display-fbdev.so: $(OBJF_DISP_FBDEV)
+- @echo "Building dynamic library (libclan-display-fbdev.so)"
+- @g++ $(LIB_OPTIONS) -o libclan-display-fbdev.so $(OBJF_DISP_FBDEV)
+-
+-libclan-display-svgalib.so: $(OBJF_DISP_SVGALIB)
+- @echo "Building dynamic library (libclan-display-svgalib.so)"
+- @g++ $(LIB_OPTIONS) -lvga -o libclan-display-svgalib.so $(OBJF_DISP_SVGALIB)
++libclancommon.so.0.0: $(OBJF_COMMON)
++ @echo "Building dynamic library (libclancommon.so.0.0)"
++ @g++ $(LIB_OPTIONS) -o libclancommon.so.0.0 $(OBJF_COMMON)
++ -@ln -s libclancommon.so.0.0 libclancommon.so.0
++ -@ln -s libclancommon.so.0.0 libclancommon.so
++
++libclanlayer1.so.0.0: libclancommon.so.0.0 $(OBJF_GENERIC_ALL) $(OBJF_UNIX)
++ @echo "Building dynamic library (libclanlayer1.so.0.0)"
++ @g++ $(LIB_OPTIONS) -o libclanlayer1.so.0.0 -L. -lclancommon $(LINK_LIBS1) $(OBJF_GENERIC_ALL) $(OBJF_UNIX)
++ -@ln -s libclanlayer1.so.0.0 libclanlayer1.so.0
++ -@ln -s libclanlayer1.so.0.0 libclanlayer1.so
++
++libclanlayer2.so.0.0: $(OBJF_LAYER2)
++ @echo "Building dynamic library (libclanlayer2.so.0.0)"
++ @g++ $(LIB_OPTIONS) -o libclanlayer2.so.0.0 $(LINK_LIBS2) $(OBJF_LAYER2)
++ -@ln -s libclanlayer2.so.0.0 libclanlayer2.so.0
++ -@ln -s libclanlayer2.so.0.0 libclanlayer2.so
++
++libclan.so.0.0: $(OBJF_COMMON) $(OBJF_GENERIC_ALL) $(OBJF_UNIX)
++ @echo "Building dynamic library (libclan.so.0.0)"
++ @g++ $(LIB_OPTIONS) -o libclan.so.0.0 $(LINK_LIBS1) $(OBJF_COMMON) $(OBJF_GENERIC_ALL) $(OBJF_UNIX)
++ -@ln -s libclan.so.0.0 libclan.so.0
++ -@ln -s libclan.so.0.0 libclan.so
++
++libclan-network.so.0.0: $(OBJF_NETWORK_UNIX)
++ @echo "Building dynamic library (libclan-network.so.0.0)"
++ @g++ $(LIB_OPTIONS) -o libclan-network.so.0.0 $(OBJF_NETWORK_UNIX)
++ -@ln -s libclan-network.so.0.0 libclan-network.so.0
++ -@ln -s libclan-network.so.0.0 libclan-network.so
++
++libclan-sound.so.0.0: $(OBJF_SOUND_CLANSOUND)
++ @echo "Building dynamic library (libclan-sound.so.0.0)"
++ @g++ $(LIB_OPTIONS) -lossaudio -o libclan-sound.so.0.0 $(OBJF_SOUND_CLANSOUND)
++ -@ln -s libclan-sound.so.0.0 libclan-sound.so.0
++ -@ln -s libclan-sound.so.0.0 libclan-sound.so
++
++libclan-display-x11.so.0.0: $(OBJF_DISP_X11)
++ @echo "Building dynamic library (libclan-display-x11.so.0.0)"
++ @g++ $(LIB_OPTIONS) @x_libraries@ -o libclan-display-x11.so.0.0 $(OBJF_DISP_X11)
++ -@ln -s libclan-display-x11.so.0.0 libclan-display-x11.so.0
++ -@ln -s libclan-display-x11.so.0.0 libclan-display-x11.so
++
++libclan-display-ptc.so.0.0: $(OBJF_DISP_PTC) libclan-display-x11.so.0.0
++ @echo "Building dynamic library (libclan-display-ptc.so.0.0)"
++ @g++ $(LIB_OPTIONS) -L . -lclan-display-x11 -lptc -o libclan-display-ptc.so.0.0 $(OBJF_DISP_PTC)
++ -@ln -s libclan-display-ptc.so.0.0 libclan-display-ptc.so.0
++ -@ln -s libclan-display-ptc.so.0.0 libclan-display-ptc.so
++
++libclan-display-mesa.so.0.0: $(OBJF_DISP_MESA) libclan-display-x11.so.0.0
++ @echo "Building dynamic library (libclan-display-mesa.so.0.0)"
++ @g++ $(LIB_OPTIONS) -L . -lclan-display-x11 @x_libraries@ -lMesaGL -o libclan-display-mesa.so.0.0 $(OBJF_DISP_MESA)
++ -@ln -s libclan-display-mesa.so.0.0 libclan-display-mesa.so.0
++ -@ln -s libclan-display-mesa.so.0.0 libclan-display-mesa.so
++
++libclan-display-ggi.so.0.0: $(OBJF_DISP_GGI)
++ @echo "Building dynamic library (libclan-display-ggi.so.0.0)"
++ @g++ $(LIB_OPTIONS) -lggi -o libclan-display-ggi.so.0.0 $(OBJF_DISP_GGI)
++ -@ln -s libclan-display-ggi.so.0.0 libclan-display-ggi.so.0
++ -@ln -s libclan-display-ggi.so.0.0 libclan-display-ggi.so
++
++libclan-display-fbdev.so.0.0: $(OBJF_DISP_FBDEV)
++ @echo "Building dynamic library (libclan-display-fbdev.so.0.0)"
++ @g++ $(LIB_OPTIONS) -o libclan-display-fbdev.so.0.0 $(OBJF_DISP_FBDEV)
++ -@ln -s libclan-display-fbdev.so.0.0 libclan-display-fbdev.so.0
++ -@ln -s libclan-display-fbdev.so.0.0 libclan-display-fbdev.so
++
++libclan-display-svgalib.so.0.0: $(OBJF_DISP_SVGALIB)
++ @echo "Building dynamic library (libclan-display-svgalib.so.0.0)"
++ @g++ $(LIB_OPTIONS) -lvga -o libclan-display-svgalib.so.0.0 $(OBJF_DISP_SVGALIB)
++ -@ln -s libclan-display-svgalib.so.0.0 libclan-display-svgalib.so.0
++ -@ln -s libclan-display-svgalib.so.0.0 libclan-display-svgalib.so
+
+ include Makefile.dep
+
diff --git a/graphics/clanlib/patches/patch-ai b/graphics/clanlib/patches/patch-ai
new file mode 100644
index 00000000000..ad254ea2e9a
--- /dev/null
+++ b/graphics/clanlib/patches/patch-ai
@@ -0,0 +1,11 @@
+$NetBSD: patch-ai,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+--- Utils/Makefile.orig Thu Jul 8 12:30:26 1999
++++ Utils/Makefile Thu Jul 8 12:30:31 1999
+@@ -1,6 +1,6 @@
+
+ all:
+- cd DatafileCompiler;make
++ cd DatafileCompiler;gmake
+
+ cvsstrip:
+ g++ cvsstrip.cpp -o cvsstrip
diff --git a/graphics/clanlib/patches/patch-aj b/graphics/clanlib/patches/patch-aj
new file mode 100644
index 00000000000..b3c49ed2511
--- /dev/null
+++ b/graphics/clanlib/patches/patch-aj
@@ -0,0 +1,14 @@
+$NetBSD: patch-aj,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+--- Utils/DatafileCompiler/Makefile.conf.orig Sat Mar 27 17:05:17 1999
++++ Utils/DatafileCompiler/Makefile.conf Fri Jul 16 20:03:00 1999
+@@ -1,7 +1,9 @@
+
+ COMP_OPTIONS = -Wall -O2 -I ../.. -fpic
+
+-LINK_OPTIONS = -lz -L../.. -Wl,-rpath,../.. -lclan -lclanlayer2
++LINK_OPTIONS = -L../.. $(LDFLAGS) -lclan -lclanlayer2
++
++LINK_OPTIONS+= $(shell if test -f ../../libz.a; then echo "../../libz.a"; else echo " -lz";fi)
+
+ %.o : %.cpp
+ @echo "Compiling $<"
diff --git a/graphics/clanlib/patches/patch-ak b/graphics/clanlib/patches/patch-ak
new file mode 100644
index 00000000000..2aeb8b24222
--- /dev/null
+++ b/graphics/clanlib/patches/patch-ak
@@ -0,0 +1,12 @@
+$NetBSD: patch-ak,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+--- Layer1/Sound/ClanSound/ClanSound/Makefile.options.orig Thu Jul 8 19:24:02 1999
++++ Layer1/Sound/ClanSound/ClanSound/Makefile.options Thu Jul 8 19:24:16 1999
+@@ -5,7 +5,7 @@
+ #
+ #
+
+-COMP_OPTIONS = -Wall -O2 -pedantic
++COMP_OPTIONS = -Wall -O2 -pedantic -fPIC
+ LINK_OPTIONS =
+
+ %.o : %.cpp