pkgsrc/games/tads/patches/patch-aa
2015-11-08 00:16:29 +00:00

57 lines
1.7 KiB
Text

$NetBSD: patch-aa,v 1.8 2015/11/08 00:16:29 dholland Exp $
- configure for pkgsrc
- add destdir support
--- tads2/Makefile.orig 2004-11-05 13:34:49.000000000 +0000
+++ tads2/Makefile
@@ -56,7 +56,7 @@
#
# DATADIR is where the TADS 2 development libraries (adv.t, std.t and
# gameinfo.t) will get installed.
-PREFIX=/usr/local
+#PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
DATADIR=$(PREFIX)/share/tads2
@@ -333,6 +333,21 @@ MATT=Matt Herberg <meherberg@earthlink.n
#MAKEXEC=touch
#
+# pkgsrc (should be suitable for all modern or semimodern systems)
+#
+CC=cc
+OPTIMIZE=
+UNIXFLAGS=-DOSANSI -DUNIX -DHAVE_STRCASECMP
+SYSFLAGS=-DOS_SYSTEM_NAME=\""${OPSYS}"\" -DSYSNAME=\""${OPSYS}"\" -DSYSPL=\"${PKGREVISION}\" -DPORTER=\""pkgsrc-users"\" -DSYSMAINTAINER=\""pkgsrc port maintained by ${MAINTAINER}\\n"\"
+CFLAGS+=$(UNIXFLAGS) $(SYSFLAGS) -DNETBSD
+AFLAGS=
+OVLFLG=
+MACHDEP=
+LIBS=-ltermcap
+MAKEXEC=touch
+
+
+#
# Don't change stuff below this line unless you really know what you're doing.
#
@@ -382,10 +397,14 @@ TDBOBJS= $(DBGOBJS) osgen.o osunixt.o tp
all: tadsr tadsc tdb
install: all
- install -d $(BINDIR)
- install -d $(DATADIR)
- install -s -m755 tadsc tadsr tdb $(BINDIR)
- install -m644 adv.t std.t gameinfo.t $(DATADIR)
+ ${BSD_INSTALL_DATA_DIR} ${DESTDIR}$(BINDIR)
+ ${BSD_INSTALL_DATA_DIR} ${DESTDIR}$(DATADIR)
+ ${BSD_INSTALL_PROGRAM} tadsc ${DESTDIR}$(BINDIR)
+ ${BSD_INSTALL_PROGRAM} tadsr ${DESTDIR}$(BINDIR)
+ ${BSD_INSTALL_PROGRAM} tdb ${DESTDIR}$(BINDIR)
+ ${BSD_INSTALL_DATA} adv.t ${DESTDIR}$(DATADIR)
+ ${BSD_INSTALL_DATA} std.t ${DESTDIR}$(DATADIR)
+ ${BSD_INSTALL_DATA} gameinfo.t ${DESTDIR}$(DATADIR)
tadsr: $(TROBJS)
$(CC) $(CFLAGS) $(TROBJS) -o tadsr $(LIBS)