37a5d3fb3a
use other, better ones from pkgsrc through ncursesw/buildlink3.mk. + Add a configure script that lightly probes the system and write out some system-specific definitions for the Makefile. This should fix PR pkg/29425. + Add necessary includes (<string.h> and <unistd.h>) to global.h to do silly C things like prototype functions before you use them. Remove the unnecessary patches to lots of *.c files that added these same headers. + Include <string.h> in ss.c because it doesn't include global.h. + Move HTML documentation into ${PREFIX}/share/doc. Bump the PKGREVISION to 2.
103 lines
2.9 KiB
Text
103 lines
2.9 KiB
Text
$NetBSD: patch-aa,v 1.5 2008/02/29 20:53:02 jlam Exp $
|
|
|
|
--- Makefile.orig 1996-11-11 09:43:22.000000000 -0500
|
|
+++ Makefile
|
|
@@ -25,21 +25,26 @@ REVISION=0
|
|
INTERNAL_REVISION=7
|
|
ARCFILE=netmaj-$(VERSION).$(REVISION).$(INTERNAL_REVISION).tar.gz
|
|
|
|
-SHELL=/bin/sh
|
|
+SHELL=${SH}
|
|
# Install Directory
|
|
-LIBDIR=/usr/local/lib/netmaj
|
|
-BINDIR=/usr/local/bin
|
|
-PERL=/usr/bin/perl
|
|
+LIBDIR=${PREFIX}/lib/netmaj
|
|
+BINDIR=${PREFIX}/bin
|
|
+PERL=${PERL5}
|
|
|
|
STD_CFLAGS=-I. -Ilib -DNETMAJ_LIB=\"$(LIBDIR)\"
|
|
|
|
-# for 386BSD,FreeBSD,NetBSD...
|
|
-CC=gcc
|
|
-OS_CFLAGS= -O -g -DUSE_SGTTY -DUSE_FWOPEN -DUSE_TERMCAP -DHAVE_GETTIMEOFDAY
|
|
+# for pkgsrc
|
|
+CC=cc
|
|
RANLIB=ranlib
|
|
-LIBS=
|
|
-CURSES= -lcurses -ltermcap
|
|
-LDFLAGS = -Llib
|
|
+include config.mk
|
|
+
|
|
+# for 386BSD,FreeBSD,NetBSD...
|
|
+#CC=gcc
|
|
+#OS_CFLAGS= -O -g -DUSE_SGTTY -DUSE_FWOPEN -DUSE_TERMCAP -DHAVE_GETTIMEOFDAY
|
|
+#RANLIB=ranlib
|
|
+#LIBS=
|
|
+#CURSES= -lcurses -ltermcap
|
|
+#LDFLAGS = -Llib
|
|
|
|
# for linux
|
|
#CC=cc
|
|
@@ -118,7 +123,7 @@ OBJS_STAND =stand.o
|
|
OBJS_PLVIEW = plview.o cui.o
|
|
OBJS_NETMAJ1 =netmaj1.o cui.o
|
|
|
|
-all: libs server auto client server_kill netmaj1 plview z x
|
|
+all: server auto client server_kill netmaj1 plview z
|
|
z: proxyserver inputserver proxyclient
|
|
|
|
|
|
@@ -179,35 +184,35 @@ player_info: player_info.in Makefile
|
|
chmod 755 player_info
|
|
|
|
install: netmaj player_info
|
|
- -if test ! -d ${BINDIR}; then \
|
|
- mkdir ${BINDIR}; fi
|
|
- -if test ! -d ${LIBDIR}; then \
|
|
- mkdir ${LIBDIR}; fi
|
|
+ -if test ! -d ${DESTDIR}${BINDIR}; then \
|
|
+ mkdir ${DESTDIR}${BINDIR}; fi
|
|
+ -if test ! -d ${DESTDIR}${LIBDIR}; then \
|
|
+ mkdir ${DESTDIR}${LIBDIR}; fi
|
|
-./server_kill
|
|
- cp server client auto server_kill player_info $(LIBDIR)
|
|
- cp proxyserver inputserver proxyclient $(LIBDIR)
|
|
- cp netmaj.hlp $(LIBDIR)
|
|
- cp netmaj netmaj1 plview $(BINDIR)
|
|
+ cp server client auto server_kill player_info $(DESTDIR)$(LIBDIR)
|
|
+ cp proxyserver inputserver proxyclient $(DESTDIR)$(LIBDIR)
|
|
+ cp netmaj.hlp $(DESTDIR)$(LIBDIR)
|
|
+ cp netmaj netmaj1 plview $(DESTDIR)$(BINDIR)
|
|
-if test -d xui; then \
|
|
(cd xui; make install CC="$(CC)" OS_CFLAGS="$(OS_CFLAGS)" \
|
|
RANLIB="$(RANLIB)" LIBS="$(LIBS)" LIBDIR="$(LIBDIR)" \
|
|
- BINDIR="$(BINDIR)" \
|
|
+ BINDIR="$(BINDIR)" DESTDIR="$(DESTDIR)" \
|
|
); fi
|
|
|
|
install-remote: netmaj server server_kill auto proxyclient
|
|
- -if test ! -d ${BINDIR}; then \
|
|
- mkdir ${BINDIR}; fi
|
|
- -if test ! -d ${LIBDIR}; then \
|
|
- mkdir ${LIBDIR}; fi
|
|
- cp server auto server_kill proxyclient $(LIBDIR)
|
|
- cp netmaj $(BINDIR)
|
|
+ -if test ! -d ${DESTDIR}${BINDIR}; then \
|
|
+ mkdir ${DESTDIR}${BINDIR}; fi
|
|
+ -if test ! -d ${DESTDIR}${LIBDIR}; then \
|
|
+ mkdir ${DESTDIR}${LIBDIR}; fi
|
|
+ cp server auto server_kill proxyclient $(DESTDIR)$(LIBDIR)
|
|
+ cp netmaj $(DESTDIR)$(BINDIR)
|
|
|
|
install-pf:
|
|
- cp *.pf $(LIBDIR)
|
|
+ cp *.pf $(DESTDIR)$(LIBDIR)
|
|
-if test -d xui; then \
|
|
(cd xui; make install-pf CC="$(CC)" OS_CFLAGS="$(OS_CFLAGS)" \
|
|
RANLIB="$(RANLIB)" LIBS="$(LIBS)" LIBDIR="$(LIBDIR)" \
|
|
- BINDIR="$(BINDIR)" \
|
|
+ BINDIR="$(BINDIR)" DESTDIR="$(DESTDIR)" \
|
|
); fi
|
|
|
|
clean:
|