summaryrefslogtreecommitdiff
path: root/lang/gforth
diff options
context:
space:
mode:
authoritohy <itohy@pkgsrc.org>2000-04-11 06:54:45 +0000
committeritohy <itohy@pkgsrc.org>2000-04-11 06:54:45 +0000
commit9ce0337507480302014ddd1546c8f01b6acc3ac8 (patch)
treea0e97b0237daabd949443270906a87b55ab9a77f /lang/gforth
parent3211c687d5bd90e78868acd8eeab50f3f52705ab (diff)
downloadpkgsrc-9ce0337507480302014ddd1546c8f01b6acc3ac8.tar.gz
Port to m68k. Possibly work on other architectures, but not tested.
Diffstat (limited to 'lang/gforth')
-rw-r--r--lang/gforth/Makefile14
-rw-r--r--lang/gforth/files/patch-sum3
-rw-r--r--lang/gforth/patches/patch-ab22
-rw-r--r--lang/gforth/pkg/PLIST4
4 files changed, 38 insertions, 5 deletions
diff --git a/lang/gforth/Makefile b/lang/gforth/Makefile
index 051c0b7578e..5fe23087cf1 100644
--- a/lang/gforth/Makefile
+++ b/lang/gforth/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 1999/05/24 20:39:43 tv Exp $
+# $NetBSD: Makefile,v 1.4 2000/04/11 06:54:45 itohy Exp $
DISTNAME= gforth-0.4.0
CATEGORIES= lang
@@ -7,9 +7,19 @@ MASTER_SITES= ${MASTER_SITE_GNU:=gforth/}
MAINTAINER= simonb@netbsd.org
HOMEPAGE= http://www.complang.tuwien.ac.at/forth/gforth/
-ONLY_FOR_PLATFORM= *-*-i386
+ONLY_FOR_PLATFORM= *-*-i386 *-*-m68k
GNU_CONFIGURE= YES
INFO_FILES= gforth.info
+PLIST_SRC= ${WRKDIR}/PLIST
+
+# kernel image filename is arch dependent
+KERNEL_FI= `cd ${WRKSRC} && (${ECHO} 'prkern:'; ${ECHO} ' @${ECHO} $$(kernel_fi)'; ${ECHO}; ${CAT} Makefile) | ${MAKE} -f - prkern`
+
+post-build:
+ @${ECHO}; ${ECHO} building PLIST...
+ @k=${KERNEL_FI} && ${ECHO} "using kernel image: $$k" && \
+ ${SED} -e "s/@KERNEL_FI@/$$k/g" <${PKGDIR}/PLIST >${PLIST_SRC}
+
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/gforth/files/patch-sum b/lang/gforth/files/patch-sum
index e89ce63fea3..3821c70ef1f 100644
--- a/lang/gforth/files/patch-sum
+++ b/lang/gforth/files/patch-sum
@@ -1,3 +1,4 @@
-$NetBSD: patch-sum,v 1.1 1999/07/09 13:54:08 agc Exp $
+$NetBSD: patch-sum,v 1.2 2000/04/11 06:54:46 itohy Exp $
MD5 (patch-aa) = e7456c7878452b2281044d00819f1ce2
+MD5 (patch-ab) = 3e1da92b3b58a90f84221639127660cb
diff --git a/lang/gforth/patches/patch-ab b/lang/gforth/patches/patch-ab
new file mode 100644
index 00000000000..d194c976bc1
--- /dev/null
+++ b/lang/gforth/patches/patch-ab
@@ -0,0 +1,22 @@
+$NetBSD: patch-ab,v 1.1 2000/04/11 06:54:46 itohy Exp $
+
+--- arch/m68k/machine.h.orig Sat Dec 19 19:22:27 1998
++++ arch/m68k/machine.h Sun Apr 9 23:53:32 2000
+@@ -42,7 +42,16 @@
+ */
+ #if defined(apollo)
+ # define FLUSH_ICACHE(addr,size) cache_$clear()
+-#elif defined(NeXT)
++#elif defined(__NetBSD__)
++# define FLUSH_ICACHE(addr,size) do { \
++ register void *addr_ asm("a1") = (addr); \
++ register int size_ asm("d1") = (size); \
++ register int cmd_ asm("d0") = 0x80000004; \
++ asm volatile(" trap #12" \
++ : "=a" (addr_), "=d" (size_), "=d" (cmd_) \
++ : "0" (addr_), "1" (size_), "2" (cmd_) : "a0"); \
++ } while (0)
++#elif defined(NeXT) || defined(sun)
+ # define FLUSH_ICACHE(addr,size) asm("trap #2");
+ #elif defined(hpux)
+ # include <sys/cache.h>
diff --git a/lang/gforth/pkg/PLIST b/lang/gforth/pkg/PLIST
index 7b964f55765..9a165cae5ac 100644
--- a/lang/gforth/pkg/PLIST
+++ b/lang/gforth/pkg/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 1999/08/13 14:06:57 agc Exp $
+@comment $NetBSD: PLIST,v 1.3 2000/04/11 06:54:46 itohy Exp $
bin/${PKGNAME}
bin/gforth
bin/gforthmi-0.4.0
@@ -150,7 +150,7 @@ share/gforth/0.4.0/objects.fs
share/gforth/0.4.0/objexamp.fs
share/gforth/0.4.0/mini-oof.fs
share/gforth/0.4.0/moof-exm.fs
-share/gforth/0.4.0/kernl32l.fi
+share/gforth/0.4.0/@KERNEL_FI@
share/gforth/0.4.0/TAGS
share/gforth/site-forth/siteinit.fs
@dirrm lib/gforth