summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/clanlib/Makefile35
-rw-r--r--graphics/clanlib/files/md53
-rw-r--r--graphics/clanlib/files/patch-sum13
-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
-rw-r--r--graphics/clanlib/pkg/COMMENT1
-rw-r--r--graphics/clanlib/pkg/DESCR5
-rw-r--r--graphics/clanlib/pkg/PLIST138
17 files changed, 697 insertions, 0 deletions
diff --git a/graphics/clanlib/Makefile b/graphics/clanlib/Makefile
new file mode 100644
index 00000000000..499e7090746
--- /dev/null
+++ b/graphics/clanlib/Makefile
@@ -0,0 +1,35 @@
+# $NetBSD: Makefile,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+
+DISTNAME= ClanLib-0.1.15
+CATEGORIES= games x11
+MASTER_SITES= http://dark.x.dtu.dk/clansoft/clanlib/download/
+
+MAINTAINER= root@garbled.net
+HOMEPAGE= http://www.clanlib.org/
+
+DEPENDS+= Hermes-1.2.5:../../graphics/hermes
+DEPENDS+= Mesa-3.0:../../graphics/Mesa
+DEPENDS+= png-1.0.3:../../graphics/png
+
+USE_X11BASE= yes
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+USE_PERL5= yes
+
+LDFLAGS+= -L${LOCALBASE}/lib
+CFLAGS+= -I${LOCALBASE}/include/Hermes
+CONFIGURE_ARGS+= --disable-asm386 \
+ --enable-libpng \
+ --enable-clansound \
+ --enable-dyn \
+ --enable-network --enable-mesa
+
+CONFIGURE_ENV+= LOCALBASE="${LOCALBASE}"# CC='cc ${CFLAGS} ${LDFLAGS}'
+MAKE_ENV+= LDFLAGS="${LDFLAGS}"
+
+BROKEN_LIBZ!=ar t /usr/lib/libz.a | grep -w example.o || echo "false"
+.if !empty(BROKEN_LIBZ:Mexample.o)
+BROKEN= "Update to NetBSD 1.4.1, or recompile /usr/lib/libz without example.c"
+.endif
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/clanlib/files/md5 b/graphics/clanlib/files/md5
new file mode 100644
index 00000000000..942b26da5f6
--- /dev/null
+++ b/graphics/clanlib/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+
+MD5 (ClanLib-0.1.15.tar.gz) = 967d0721918fe2372edb4e42fb2ec58c
diff --git a/graphics/clanlib/files/patch-sum b/graphics/clanlib/files/patch-sum
new file mode 100644
index 00000000000..61fca83a597
--- /dev/null
+++ b/graphics/clanlib/files/patch-sum
@@ -0,0 +1,13 @@
+$NetBSD: patch-sum,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+
+MD5 (patch-aa) = d00db11088d1df9c88baf1229b8a778e
+MD5 (patch-ab) = d3147151b40a0d3cff75065819cdb2e5
+MD5 (patch-ac) = 35c9336b18c8a420e51a1ff0081f64d5
+MD5 (patch-ad) = 9bdd72ec2cf530d60f4b920d07894afe
+MD5 (patch-ae) = d5d450a7ff806e375df3678947a86bdb
+MD5 (patch-af) = 88ab835403ca1d513d569634fe37119b
+MD5 (patch-ag) = 38186794a82a102c7cdaba0d7e09f2b2
+MD5 (patch-ah) = 4172a64a8f34f2680e6dd8cd641d7bc6
+MD5 (patch-ai) = fb7080c36cf90dea10b4856fc61b1622
+MD5 (patch-aj) = da715da3beff1da0199dfb2b709f065d
+MD5 (patch-ak) = 5ef731e7b8f81c1ccd7448036293fc1a
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
diff --git a/graphics/clanlib/pkg/COMMENT b/graphics/clanlib/pkg/COMMENT
new file mode 100644
index 00000000000..bfb9c165ad8
--- /dev/null
+++ b/graphics/clanlib/pkg/COMMENT
@@ -0,0 +1 @@
+The ClanLib Game SDK.
diff --git a/graphics/clanlib/pkg/DESCR b/graphics/clanlib/pkg/DESCR
new file mode 100644
index 00000000000..4d2e017a274
--- /dev/null
+++ b/graphics/clanlib/pkg/DESCR
@@ -0,0 +1,5 @@
+The ClanLib Game SDK is a crossplatform game library designed to ease the
+work for game developers. The goal is to provide a common interface to
+classical game problems (loading graphics eg.), so games can share as much
+code as possible. Ideally anyone with small resources should be able to
+write commercial quality games.
diff --git a/graphics/clanlib/pkg/PLIST b/graphics/clanlib/pkg/PLIST
new file mode 100644
index 00000000000..0e8d927863b
--- /dev/null
+++ b/graphics/clanlib/pkg/PLIST
@@ -0,0 +1,138 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 1999/07/21 22:56:35 garbled Exp $
+bin/datafile_compiler
+include/ClanLib/Layer1/Display/API/cliprect.h
+include/ClanLib/Layer1/Display/API/display.h
+include/ClanLib/Layer1/Display/API/displaycard.h
+include/ClanLib/Layer1/Display/API/palette.h
+include/ClanLib/Layer1/Display/API/pixelformat.h
+include/ClanLib/Layer1/Display/API/surface.h
+include/ClanLib/Layer1/Display/API/surfacepriority.h
+include/ClanLib/Layer1/Display/API/surfaceprovider.h
+include/ClanLib/Layer1/Display/API/vidmode.h
+include/ClanLib/Layer1/IOData/API/endian.h
+include/ClanLib/Layer1/IOData/API/inputsource.h
+include/ClanLib/Layer1/IOData/API/inputsource_provider.h
+include/ClanLib/Layer1/IOData/API/outputsource.h
+include/ClanLib/Layer1/IOData/API/outputsource_provider.h
+include/ClanLib/Layer1/Input/API/inputaxis.h
+include/ClanLib/Layer1/Input/API/input.h
+include/ClanLib/Layer1/Input/API/inputbuffer.h
+include/ClanLib/Layer1/Input/API/inputbutton.h
+include/ClanLib/Layer1/Input/API/inputcursor.h
+include/ClanLib/Layer1/Input/API/inputdevice.h
+include/ClanLib/Layer1/Input/API/inputhat.h
+include/ClanLib/Layer1/Input/API/keyboard.h
+include/ClanLib/Layer1/Input/API/mouse.h
+include/ClanLib/Layer1/Network/API/netchannel.h
+include/ClanLib/Layer1/Network/API/netcomputer.h
+include/ClanLib/Layer1/Network/API/netgame.h
+include/ClanLib/Layer1/Network/API/netgroup.h
+include/ClanLib/Layer1/Network/API/netmessage.h
+include/ClanLib/Layer1/Network/API/network.h
+include/ClanLib/Layer1/Sound/API/sound.h
+include/ClanLib/Layer1/Sound/API/soundbuffer.h
+include/ClanLib/Layer1/Sound/API/soundbuffer_session.h
+include/ClanLib/Layer1/Sound/API/soundformat.h
+include/ClanLib/Layer1/Sound/API/static_soundprovider.h
+include/ClanLib/Layer1/Sound/API/stream_soundprovider.h
+include/ClanLib/Layer1/System/API/cl_assert.h
+include/ClanLib/Layer1/System/API/clanapp.h
+include/ClanLib/Layer1/System/API/error.h
+include/ClanLib/Layer1/System/API/system.h
+include/ClanLib/Layer1/System/API/timer_manager.h
+include/ClanLib/Layer2/InputConverters/inputaxis_basic.h
+include/ClanLib/Layer2/InputConverters/inputaxis_group.h
+include/ClanLib/Layer2/InputConverters/inputbutton_basic.h
+include/ClanLib/Layer2/InputConverters/inputbutton_group.h
+include/ClanLib/Layer2/InputConverters/inputbutton_to_axis_analog.h
+include/ClanLib/Layer2/InputConverters/inputbutton_to_axis_digital.h
+include/ClanLib/Layer2/Misc/font.h
+include/ClanLib/Layer2/Misc/layermanager.h
+include/ClanLib/Layer2/NetChannels/netchannel_filetransfer.h
+include/ClanLib/Layer2/NetChannels/netchannel_portnumbers.h
+include/ClanLib/Layer2/NetChannels/netchannel_resource.h
+include/ClanLib/Layer2/NetChannels/netchannels.h
+include/ClanLib/Layer2/NetPorts/netport_filetransfer.h
+include/ClanLib/Layer2/NetPorts/netport_portnumbers.h
+include/ClanLib/Layer2/NetPorts/netport_sms.h
+include/ClanLib/Layer2/Resources/resource.h
+include/ClanLib/Layer2/Resources/resource_manager.h
+include/ClanLib/Layer2/Resources/resourceoption.h
+include/ClanLib/Layer2/Resources/resourceoptions.h
+include/ClanLib/Layer2/Resources/resourcetype.h
+include/ClanLib/Layer2/Resources/resourcetype_font.h
+include/ClanLib/Layer2/Resources/resourcetype_palette.h
+include/ClanLib/Layer2/Resources/resourcetype_raw.h
+include/ClanLib/Layer2/Resources/resourcetype_sample.h
+include/ClanLib/Layer2/Resources/resourcetype_surface.h
+include/ClanLib/Layer2/StaticSoundProviders/raw_sample.h
+include/ClanLib/Layer2/StaticSoundProviders/wave_sample.h
+include/ClanLib/Layer2/StreamSoundProviders/mikmod/include/mikmod.h
+include/ClanLib/Layer2/StreamSoundProviders/mikmod/include/mikmod_build.h
+include/ClanLib/Layer2/StreamSoundProviders/mikmod/include/mikmod_internals.h
+include/ClanLib/Layer2/StreamSoundProviders/mikmod/streamed_mikmod_sample.h
+include/ClanLib/Layer2/StreamSoundProviders/streamed_raw_sample.h
+include/ClanLib/Layer2/StreamSoundProviders/streamed_wave_sample.h
+include/ClanLib/Layer2/SurfaceProviders/generic_surfaceprovider.h
+include/ClanLib/Layer2/SurfaceProviders/provider_convpoly.h
+include/ClanLib/Layer2/SurfaceProviders/provider_convpoly_basics.h
+include/ClanLib/Layer2/SurfaceProviders/provider_empty.h
+include/ClanLib/Layer2/SurfaceProviders/provider_fli.h
+include/ClanLib/Layer2/SurfaceProviders/provider_pcx.h
+include/ClanLib/Layer2/SurfaceProviders/provider_png.h
+include/ClanLib/Layer2/SurfaceProviders/provider_targa.h
+include/ClanLib/Layer2/SurfaceProviders/sprite.h
+include/ClanLib/Layer2/SurfaceProviders/sprite_subarray_provider.h
+include/ClanLib/Layer2/SurfaceProviders/sprite_subsection_provider.h
+include/ClanLib/Layer2/SurfaceProviders/surface_manager.h
+include/ClanLib/Common/clanstring.h
+include/ClanLib/Common/array.h
+include/ClanLib/Common/hashtable.h
+include/ClanLib/Common/error.h
+include/ClanLib/Common/formatted_data.h
+include/ClanLib/Common/link.h
+include/ClanLib/Common/matrix.h
+include/ClanLib/Common/memory.h
+include/ClanLib/Common/queue.h
+include/ClanLib/Common/stack.h
+include/ClanLib/Common/vector.h
+include/ClanLib/clanlib.h
+include/ClanLib/clanlayer2.h
+lib/libclan.so.0.0
+lib/libclanlayer1.so.0.0
+lib/libclanlayer2.so.0.0
+lib/libclancommon.so.0.0
+lib/libclan-network.so.0.0
+lib/libclan-sound.so.0.0
+lib/libclan-display-x11.so.0.0
+lib/libclan-display-mesa.so.0.0
+@dirrm include/ClanLib/Layer1/Display/API
+@dirrm include/ClanLib/Layer1/Display
+@dirrm include/ClanLib/Layer1/IOData/API
+@dirrm include/ClanLib/Layer1/IOData
+@dirrm include/ClanLib/Layer1/Input/API
+@dirrm include/ClanLib/Layer1/Input
+@dirrm include/ClanLib/Layer1/Network/API
+@dirrm include/ClanLib/Layer1/Network
+@dirrm include/ClanLib/Layer1/Sound/API
+@dirrm include/ClanLib/Layer1/Sound
+@dirrm include/ClanLib/Layer1/System/API
+@dirrm include/ClanLib/Layer1/System
+@dirrm include/ClanLib/Layer1
+@dirrm include/ClanLib/Layer2/InputConverters
+@dirrm include/ClanLib/Layer2/Misc
+@dirrm include/ClanLib/Layer2/NetChannels
+@dirrm include/ClanLib/Layer2/NetPorts
+@dirrm include/ClanLib/Layer2/Resources
+@dirrm include/ClanLib/Layer2/StreamSoundProviders/mikmod/drivers
+@dirrm include/ClanLib/Layer2/StreamSoundProviders/mikmod/include
+@dirrm include/ClanLib/Layer2/StreamSoundProviders/mikmod/loaders
+@dirrm include/ClanLib/Layer2/StreamSoundProviders/mikmod/mmio
+@dirrm include/ClanLib/Layer2/StreamSoundProviders/mikmod/playercode
+@dirrm include/ClanLib/Layer2/StreamSoundProviders/mikmod
+@dirrm include/ClanLib/Layer2/StreamSoundProviders
+@dirrm include/ClanLib/Layer2/StaticSoundProviders
+@dirrm include/ClanLib/Layer2/SurfaceProviders
+@dirrm include/ClanLib/Layer2
+@dirrm include/ClanLib/Common
+@dirrm include/ClanLib