
--- tornado-1.2/Makefile	2002-10-11 12:04:15.000000000 -0700
+++ tornado-1.2-patched/Makefile	2002-10-12 04:33:46.000000000 -0700
@@ -9,7 +9,9 @@
 LOCALES = de
 MAN = doc/man
 DISTDIR = tornado-$(VERSION)
-
+SCOREDIR = $(PREFIX)/var/games
+DESTDIR = 
+MANDIR = $(PREFIX)/share/man
 ###                                                       ###
 ### You shouldn't need to edit anything beyond this point ###
 ###                                                       ###
@@ -42,25 +44,25 @@
 	$(MAKE) -C $(MAN) clean
 
 install: tornado tornado.6 install-locale-data
-	@echo "Installing tornado binary in $(PREFIX)/bin..."
-	if [ ! -d "$(PREFIX)/bin" ]; then \
-	  mkdir -p $(PREFIX)/bin; \
+	@echo "Installing tornado binary in $(DESTDIR)$(PREFIX)/bin..."
+	if [ ! -d "$(DESTDIR)$(PREFIX)/bin" ]; then \
+	  mkdir -p $(DESTDIR)$(PREFIX)/bin; \
 	fi
-	install -s tornado $(PREFIX)/bin
+	install -s tornado $(DESTDIR)$(PREFIX)/bin
 
 	$(MAKE) -C $(MAN) install-man
 
-	if [ -f "/var/games/tornado.scores" ]; then \
+	if [ -f "$(DESTDIR)$(SCOREDIR)/tornado.scores" ]; then \
 	  echo "Skipping install of the highscores file. File exists."; \
-	  cat /var/games/tornado.scores | ./convert-highscorefile > score.tmp; \
-	  mv -f score.tmp /var/games/tornado.scores; \
-	  chmod a+rw-x "/var/games/tornado.scores"; \
+	  cat $(SCOREDIR)/tornado.scores | ./convert-highscorefile > score.tmp; \
+	  mv -f score.tmp $(DESTDIR)$(SCOREDIR)/tornado.scores; \
+	  chmod a+rw-x "$(DESTDIR)$(SCOREDIR)/tornado.scores"; \
 	else \
-	  if [ ! -d "/var/games" ]; then \
-	    mkdir /var/games; \
+	  if [ ! -d "$(DESTDIR)$(SCOREDIR)" ]; then \
+	    mkdir -p $(DESTDIR)$(SCOREDIR); \
 	  fi; \
-	  install tornado.scores /var/games; \
-	  chmod a+w-x "/var/games/tornado.scores"; \
+	  install tornado.scores $(DESTDIR)$(SCOREDIR); \
+	  chmod a+w-x "$(DESTDIR)$(SCOREDIR)/tornado.scores"; \
 	fi
 
 install-locale-data:
@@ -75,26 +77,26 @@
 tornado-no-locales: tornado tornado.6
 
 tornado-no-locales-install: tornado tornado.6
-	if [ ! -d "$(PREFIX)/bin" ]; then \
-	  mkdir -p $(PREFIX)/bin; \
+	if [ ! -d "$(DESTDIR)$(PREFIX)/bin" ]; then \
+	  mkdir -p $(DESTDIR)$(PREFIX)/bin; \
 	fi
-	install -s tornado $(PREFIX)/bin
-	if [ ! -d "$(PREFIX)/man/man6" ]; then \
-	  mkdir -p $(PREFIX)/man/man6; \
+	install -s tornado $(DESTDIR)$(PREFIX)/bin
+	if [ ! -d "$(DESTDIR)$(MANDIR)/man6" ]; then \
+	  mkdir -p $(DESTDIR)$(MANDIR)/man6; \
 	fi
-	install -m 0644 tornado.6 $(PREFIX)/man/man6
+	install -m 0644 tornado.6 $(MANDIR)/man6
 
-	if [ -f "/var/games/tornado.scores" ]; then \
+	if [ -f "$(DESTDIR)$(SCOREDIR)/tornado.scores" ]; then \
 	  echo "Skipping install of the highscores file. File exists."; \
-	  cat /var/games/tornado.scores | ./convert-highscorefile > score.tmp; \
-	  mv -f score.tmp /var/games/tornado.scores; \
-	  chmod a+rw-x "/var/games/tornado.scores"; \
+	  cat $(DESTDIR)$(SCOREDIR)/tornado.scores | ./convert-highscorefile > score.tmp; \
+	  mv -f score.tmp $(DESTDIR)$(SCOREDIR)/tornado.scores; \
+	  chmod a+rw-x "$(DESTDIR)$(SCOREDIR)/tornado.scores"; \
 	else \
-	  if [ ! -d "/var/games" ]; then \
-	    mkdir /var/games; \
+	  if [ ! -d "$(DESTDIR)$(SCOREDIR)" ]; then \
+	    mkdir -p $(DESTDIR)$(SCOREDIR); \
 	  fi; \
-	  install tornado.scores /var/games; \
-	  chmod a+w-x "/var/games/tornado.scores"; \
+	  install tornado.scores $(DESTDIR)$(SCOREDIR); \
+	  chmod a+w-x "$(DESTDIR)$(SCOREDIR)/tornado.scores"; \
 	fi
 
 dist: clean
--- tornado-1.2/network.c	2002-09-09 10:07:15.000000000 -0700
+++ tornado-1.2-patched/network.c	2002-10-12 04:09:44.000000000 -0700
@@ -31,6 +31,10 @@
 #include <netinet/tcp.h>
 #include <arpa/inet.h>
 
+#ifndef socklen_t
+typedef int socklen_t;
+#endif
+
 /* local variables */
 static int socketfd;		       /* active socket file descriptor */
 static int const one = 1; 	       /* for the stupid setsockopt(7) function */
--- tornado-1.2/doc/man/Makefile	2002-10-11 15:11:29.000000000 -0700
+++ tornado-1.2-patched/doc/man/Makefile	2002-10-12 04:34:02.000000000 -0700
@@ -15,10 +15,10 @@
 
 install-man: tornado.6
 	@echo "Installing manpage ..."
-	if [ ! -d "$(PREFIX)/man/man6" ]; then \
-	  mkdir -p $(PREFIX)/man/man6; \
+	if [ ! -d "$(DESTDIR)$(MANDIR)/man6" ]; then \
+	  mkdir -p $(DESTDIR)$(MANDIR)/man6; \
 	fi
-	install -m 0644 tornado.6 $(PREFIX)/man/man6
+	install -m 0644 tornado.6 $(DESTDIR)$(MANDIR)/man6
 	$(MAKE) -C de install-man
 	$(MAKE) -C fr install-man
 
@@ -36,6 +36,6 @@
 	$(MAKE) -C fr clean
 
 uninstall:
-	rm -f $(PREFIX)/man/man6/tornado.6
+	rm -f $(DESTDIR)$(MANDIR)/man6/tornado.6
 	$(MAKE) -C de uninstall
 	$(MAKE) -C fr uninstall
--- tornado-1.2/doc/man/fr/Makefile	2002-10-11 15:09:52.000000000 -0700
+++ tornado-1.2-patched/doc/man/fr/Makefile	2002-10-12 04:35:13.000000000 -0700
@@ -9,13 +9,13 @@
 
 install-man: tornado.6
 	@echo "Installing French manpage ..."
-	if [ ! -d "$(PREFIX)/man/fr/man6" ]; then \
-	  mkdir -p $(PREFIX)/man/fr/man6; \
+	if [ ! -d "$(DESTDIR)$(MANDIR)/fr/man6" ]; then \
+	  mkdir -p $(DESTDIR)$(MANDIR)/fr/man6; \
 	fi
-	install -m 0644 tornado.6 $(PREFIX)/man/fr/man6
+	install -m 0644 tornado.6 $(DESTDIR)$(MANDIR)/fr/man6
 
 clean:
 	rm -f tornado.6
 
 uninstall:
-	rm -f $(PREFIX)/man/fr/man6/tornado.6
+	rm -f $(MANDIR)/fr/man6/tornado.6
--- tornado-1.2/doc/man/it/Makefile	2002-01-30 10:36:29.000000000 -0800
+++ tornado-1.2-patched/doc/man/it/Makefile	2002-10-12 04:35:39.000000000 -0700
@@ -9,13 +9,13 @@
 
 install-man: tornado.6
 	@echo "Installing Italian manpage ..."
-	if [ ! -d "$(PREFIX)/man/it/man6" ]; then \
-	  mkdir -p $(PREFIX)/man/it/man6; \
+	if [ ! -d "$(DESTDIR)$(MANDIR)/it/man6" ]; then \
+	  mkdir -p $(DESTDIR)$(MANDIR)/it/man6; \
 	fi
-	install -m 0644 tornado.6 $(PREFIX)/man/it/man6
+	install -m 0644 tornado.6 $(DESTDIR)$(MANDIR)/it/man6
 
 clean:
 	rm -f tornado.6
 
 uninstall:
-	rm -f $(PREFIX)/man/it/man6/tornado.6
+	rm -f $(DESTDIR)$(MANDIR)/it/man6/tornado.6
--- tornado-1.2-patched/doc/man/de/Makefile.orig	Sun Apr 25 16:05:15 2004
+++ tornado-1.2-patched/doc/man/de/Makefile	Sun Apr 25 16:05:43 2004
@@ -9,13 +9,13 @@
 
 install-man: tornado.6
 	@echo "Installing german manpage ..."
-	if [ ! -d "$(PREFIX)/man/de/man6" ]; then \
-	  mkdir -p $(PREFIX)/man/de/man6; \
+	if [ ! -d "$(DESTDIR)$(MANDIR)/man/de/man6" ]; then \
+	  mkdir -p $(DESTDIR)$(MANDIR)/man/de/man6; \
 	fi
-	install -m 0644 tornado.6 $(PREFIX)/man/de/man6
+	install -m 0644 tornado.6 $(DESTDIR)$(MANDIR)/man/de/man6
 
 clean:
 	rm -f tornado.6
 
 uninstall:
-	rm -f $(PREFIX)/man/de/man6/tornado.6
+	rm -f $(DESTDIR)$(MANDIR)/man/de/man6/tornado.6
--- tornado-1.2-patched/doc/man/no/Makefile.orig	Sun Apr 25 16:06:27 2004
+++ tornado-1.2-patched/doc/man/no/Makefile	Sun Apr 25 16:07:19 2004
@@ -9,13 +9,13 @@
 
 install-man: tornado.6
 	@echo "Installing Norwegian manpage ..."
-	if [ ! -d "$(PREFIX)/man/no/man6" ]; then \
-	  mkdir -p $(PREFIX)/man/no/man6; \
+	if [ ! -d "$(DESTDIR)$(MANDIR)/man/no/man6" ]; then \
+	  mkdir -p $(DESTDIR)$(MANDIR)/man/no/man6; \
 	fi
-	install -m 0644 tornado.6 $(PREFIX)/man/no/man6
+	install -m 0644 tornado.6 $(DESTDIR)$(MANDIR)/man/no/man6
 
 clean:
 	rm -f tornado.6
 
 uninstall:
-	rm -f $(PREFIX)/man/no/man6/tornado.6
+	rm -f $(DESTDIR)$(MANDIR)/man/no/man6/tornado.6
--- tornado-1.2-patched/doc/man/ru/Makefile.orig	Sun Apr 25 16:06:20 2004
+++ tornado-1.2-patched/doc/man/ru/Makefile	Sun Apr 25 16:06:54 2004
@@ -9,13 +9,13 @@
 
 install-man: tornado.6
 	@echo "Installing Russian manpage ..."
-	if [ ! -d "$(PREFIX)/man/ru/man6" ]; then \
-	  mkdir -p $(PREFIX)/man/ru/man6; \
+	if [ ! -d "$(DESTDIR)$(MANDIR)/man/ru/man6" ]; then \
+	  mkdir -p $(DESTDIR)$(MANDIR)/man/ru/man6; \
 	fi
-	install -m 0644 tornado.6 $(PREFIX)/man/ru/man6
+	install -m 0644 tornado.6 $(DESTDIR)$(MANDIR)/man/ru/man6
 
 clean:
 	rm -f tornado.6
 
 uninstall:
-	rm -f $(PREFIX)/man/ru/man6/tornado.6
+	rm -f $(DESTDIR)$(MANDIR)/man/ru/man6/tornado.6
--- tornado-1.2-patched/doc/man/nl/Makefile.orig	Sun Apr 25 16:06:20 2004
+++ tornado-1.2-patched/doc/man/nl/Makefile	Sun Apr 25 16:06:54 2004
@@ -9,13 +9,13 @@
 
 install-man: tornado.6
 	@echo "Installing Dutch manpage ..."
-	if [ ! -d "$(PREFIX)/man/nl/man6" ]; then \
-	  mkdir -p $(PREFIX)/man/nl/man6; \
+	if [ ! -d "$(DESTDIR)$(MANDIR)/man/nl/man6" ]; then \
+	  mkdir -p $(DESTDIR)$(MANDIR)/man/nl/man6; \
 	fi
-	install -m 0644 tornado.6 $(PREFIX)/man/nl/man6
+	install -m 0644 tornado.6 $(DESTDIR)$(MANDIR)/man/nl/man6
 
 clean:
 	rm -f tornado.6
 
 uninstall:
-	rm -f $(PREFIX)/man/nl/man6/tornado.6
+	rm -f $(DESTDIR)$(MANDIR)/man/nl/man6/tornado.6

--- tornado-1.2/network.c.bak	2005-04-04 01:49:11.000000000 -0700
+++ tornado-1.2/network.c	2005-04-04 01:49:23.000000000 -0700
@@ -31,10 +31,6 @@
 #include <netinet/tcp.h>
 #include <arpa/inet.h>
 
-#ifndef socklen_t
-typedef int socklen_t;
-#endif
-
 /* local variables */
 static int socketfd;		       /* active socket file descriptor */
 static int const one = 1; 	       /* for the stupid setsockopt(7) function */
 

--- tornado-1.3/po/Makefile	2003-06-19 04:42:15.000000000 -0700
+++ tornado-1.3/po/Makefile	2005-06-09 19:31:35.000000000 -0700
@@ -1,5 +1,5 @@
 include ../Makefile.inc
-VERSION = `echo VERSION | cpp -P -include ../version.h | tr -d '" ' | grep -v '^$$'`
+VERSION = `echo VERSION | cpp3 -P -include ../version.h | tr -d '" ' | grep -v '^$$'`
 
 all: locales
 
@@ -14,38 +14,38 @@
 	msgfmt no.po -o no.mo
 
 install-locale-data: de.mo fr.mo pt.mo es.mo it.mo ru.mo nl.mo no.po
-	if [ ! -d "$(LOCALEPATH)/de/LC_MESSAGES/" ]; then \
-	  mkdir -p $(LOCALEPATH)/de/LC_MESSAGES/; \
+	if [ ! -d "$(DESTDIR)$(LOCALEPATH)/de/LC_MESSAGES/" ]; then \
+	  mkdir -p $(DESTDIR)$(LOCALEPATH)/de/LC_MESSAGES/; \
 	fi
-	install -m 0644 de.mo $(LOCALEPATH)/de/LC_MESSAGES/tornado.mo
-	if [ ! -d "$(LOCALEPATH)/fr/LC_MESSAGES/" ]; then \
-	  mkdir -p $(LOCALEPATH)/fr/LC_MESSAGES/; \
-	fi
-	install -m 0644 fr.mo $(LOCALEPATH)/fr/LC_MESSAGES/tornado.mo
-	if [ ! -d "$(LOCALEPATH)/pt/LC_MESSAGES/" ]; then \
-	  mkdir -p $(LOCALEPATH)/pt/LC_MESSAGES/; \
-	fi
-	install -m 0644 pt.mo $(LOCALEPATH)/pt/LC_MESSAGES/tornado.mo
-	if [ ! -d "$(LOCALEPATH)/es/LC_MESSAGES/" ]; then \
-	  mkdir -p $(LOCALEPATH)/es/LC_MESSAGES/; \
-	fi
-	install -m 0644 es.mo $(LOCALEPATH)/es/LC_MESSAGES/tornado.mo
-	if [ ! -d "$(LOCALEPATH)/it/LC_MESSAGES/" ]; then \
-	  mkdir -p $(LOCALEPATH)/it/LC_MESSAGES/; \
-	fi
-	install -m 0644 it.mo $(LOCALEPATH)/it/LC_MESSAGES/tornado.mo
-	if [ ! -d "$(LOCALEPATH)/ru/LC_MESSAGES/" ]; then \
-	  mkdir -p $(LOCALEPATH)/ru/LC_MESSAGES/; \
-	fi
-	install -m 0644 ru.mo $(LOCALEPATH)/ru/LC_MESSAGES/tornado.mo
-	if [ ! -d "$(LOCALEPATH)/nl/LC_MESSAGES/" ]; then \
-	  mkdir -p $(LOCALEPATH)/nl/LC_MESSAGES/; \
-	fi
-	install -m 0644 nl.mo $(LOCALEPATH)/nl/LC_MESSAGES/tornado.mo
-	if [ ! -d "$(LOCALEPATH)/no/LC_MESSAGES/" ]; then \
-	  mkdir -p $(LOCALEPATH)/no/LC_MESSAGES/; \
+	install -m 0644 de.mo $(DESTDIR)$(LOCALEPATH)/de/LC_MESSAGES/tornado.mo
+	if [ ! -d "$(DESTDIR)$(LOCALEPATH)/fr/LC_MESSAGES/" ]; then \
+	  mkdir -p $(DESTDIR)$(LOCALEPATH)/fr/LC_MESSAGES/; \
+	fi
+	install -m 0644 fr.mo $(DESTDIR)$(LOCALEPATH)/fr/LC_MESSAGES/tornado.mo
+	if [ ! -d "$(DESTDIR)$(LOCALEPATH)/pt/LC_MESSAGES/" ]; then \
+	  mkdir -p $(DESTDIR)$(LOCALEPATH)/pt/LC_MESSAGES/; \
+	fi
+	install -m 0644 pt.mo $(DESTDIR)$(LOCALEPATH)/pt/LC_MESSAGES/tornado.mo
+	if [ ! -d "$(DESTDIR)$(LOCALEPATH)/es/LC_MESSAGES/" ]; then \
+	  mkdir -p $(DESTDIR)$(LOCALEPATH)/es/LC_MESSAGES/; \
+	fi
+	install -m 0644 es.mo $(DESTDIR)$(LOCALEPATH)/es/LC_MESSAGES/tornado.mo
+	if [ ! -d "$(DESTDIR)$(LOCALEPATH)/it/LC_MESSAGES/" ]; then \
+	  mkdir -p $(DESTDIR)$(LOCALEPATH)/it/LC_MESSAGES/; \
+	fi
+	install -m 0644 it.mo $(DESTDIR)$(LOCALEPATH)/it/LC_MESSAGES/tornado.mo
+	if [ ! -d "$(DESTDIR)$(LOCALEPATH)/ru/LC_MESSAGES/" ]; then \
+	  mkdir -p $(DESTDIR)$(LOCALEPATH)/ru/LC_MESSAGES/; \
+	fi
+	install -m 0644 ru.mo $(DESTDIR)$(LOCALEPATH)/ru/LC_MESSAGES/tornado.mo
+	if [ ! -d "$(DESTDIR)$(LOCALEPATH)/nl/LC_MESSAGES/" ]; then \
+	  mkdir -p $(DESTDIR)$(LOCALEPATH)/nl/LC_MESSAGES/; \
+	fi
+	install -m 0644 nl.mo $(DESTDIR)$(LOCALEPATH)/nl/LC_MESSAGES/tornado.mo
+	if [ ! -d "$(DESTDIR)$(LOCALEPATH)/no/LC_MESSAGES/" ]; then \
+	  mkdir -p $(DESTDIR)$(LOCALEPATH)/no/LC_MESSAGES/; \
 	fi
-	install -m 0644 no.mo $(LOCALEPATH)/no/LC_MESSAGES/tornado.mo
+	install -m 0644 no.mo $(DESTDIR)$(LOCALEPATH)/no/LC_MESSAGES/tornado.mo
 
 clean:
 	rm -f *.mo
