diff --git a/devel/dasm/Makefile b/devel/dasm/Makefile new file mode 100644 index 00000000000..d1f9a10e79d --- /dev/null +++ b/devel/dasm/Makefile @@ -0,0 +1,27 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2021/01/15 15:01:36 gonzalo Exp $ + +COMMENT= versatile macro assembler for 8-bit microprocessors + +GH_ACCOUNT= dasm-assembler +GH_PROJECT= dasm +GH_TAGNAME= 2.20.14 + +CATEGORIES= devel + +MAINTAINER= Gonzalo L. R. + +# GPLv2 +PERMIT_PACKAGE= Yes + +WANTLIB += c + +WRKDIST= ${WRKDIR}/${PKGNAME} + +post-install: + ${INSTALL_DATA_DIR} $(PREFIX)/share/doc/dasm + ${INSTALL_DATA} ${WRKSRC}/docs/sources/*.tex $(PREFIX)/share/doc/dasm + ${INSTALL_DATA_DIR} $(PREFIX)/share/doc/dasm/images + ${INSTALL_DATA} ${WRKSRC}/docs/sources/images/illegal.png $(PREFIX)/share/doc/dasm/images + ${INSTALL_DATA} ${WRKSRC}/docs/dasm.pdf $(PREFIX)/share/doc/dasm + +.include diff --git a/devel/dasm/distinfo b/devel/dasm/distinfo new file mode 100644 index 00000000000..efbdaaf4449 --- /dev/null +++ b/devel/dasm/distinfo @@ -0,0 +1,2 @@ +SHA256 (dasm-2.20.14.tar.gz) = xmU4rYxBOk6ohSUkbtn+8r+cnS42WTrN9lHgZjWtdJc= +SIZE (dasm-2.20.14.tar.gz) = 989739 diff --git a/devel/dasm/patches/patch-Makefile b/devel/dasm/patches/patch-Makefile new file mode 100644 index 00000000000..bb85bdb1a33 --- /dev/null +++ b/devel/dasm/patches/patch-Makefile @@ -0,0 +1,41 @@ +$OpenBSD: patch-Makefile,v 1.1.1.1 2021/01/15 15:01:36 gonzalo Exp $ + +Index: Makefile +--- Makefile.orig ++++ Makefile +@@ -33,7 +33,9 @@ all: build + + # install, currently not implemented + install: build +- echo "Installation not implemented, you're on your own, sorry." ++ install -m 0755 src/dasm $(PREFIX)/bin/dasm ++ install -m 0755 src/ftohex $(PREFIX)/bin/ftohex ++ + + # just run all the tests + test: build +@@ -78,23 +80,10 @@ TSTS=test/*.asm test/*.bin.ref test/*.hex.ref test/Mak + # other files + OTHS=Makefile + +-ifeq ($(strip $(BINARY)),) +-# source release, no binaries +-CONTENTS=$(DOCS) $(MACS) $(SRCS) $(TSTS) $(OTHS) +-DIRNAME=dasm-$(RELEASE) +-ZIPNAME=dasm-$(RELEASE) +-else +-# binary release for specific platform +-CONTENTS=$(BINS) $(DOCS) $(MACS) $(SRCS) $(TSTS) $(OTHS) +-DIRNAME=dasm-$(RELEASE) +-ZIPNAME=dasm-$(RELEASE)-$(BINARY) +-endif +- + # create a distribution archive for publication + dist: build + mkdir $(DIRNAME) +- cp -p -r --parents $(CONTENTS) $(DIRNAME) +- tar cvf - $(DIRNAME) | gzip -9 >$(ZIPNAME).tar.gz ++ cp -r $(CONTENTS) $(DIRNAME) + # tar cvf - $(DIRNAME) | bzip2 -9 >$(ZIPNAME).tar.bz2 + rm -rf $(DIRNAME) + diff --git a/devel/dasm/patches/patch-src_Makefile b/devel/dasm/patches/patch-src_Makefile new file mode 100644 index 00000000000..edba7449e71 --- /dev/null +++ b/devel/dasm/patches/patch-src_Makefile @@ -0,0 +1,15 @@ +$OpenBSD: patch-src_Makefile,v 1.1.1.1 2021/01/15 15:01:36 gonzalo Exp $ + +Index: src/Makefile +--- src/Makefile.orig ++++ src/Makefile +@@ -61,7 +61,8 @@ all: $(ALL) + dasm: $(OBJS) + $(CC) $(OBJS) -o dasm $(LDFLAGS) + +-ftohex: ftohex.o ++ftohex: ++ $(CC) ftohex.c -o ftohex $(LDFLAGS) + + obj: $(OBJS) + diff --git a/devel/dasm/patches/patch-test_run_tests_sh b/devel/dasm/patches/patch-test_run_tests_sh new file mode 100644 index 00000000000..9589fd289ff --- /dev/null +++ b/devel/dasm/patches/patch-test_run_tests_sh @@ -0,0 +1,20 @@ +$OpenBSD: patch-test_run_tests_sh,v 1.1.1.1 2021/01/15 15:01:36 gonzalo Exp $ + +Index: test/run_tests.sh +--- test/run_tests.sh.orig ++++ test/run_tests.sh +@@ -1,4 +1,4 @@ +-#!/usr/bin/env bash ++#!/bin/sh + + # Simple test script adapted from Matt Dillon's 2.16 release. + # It's harder to do this in a Makefile, so let's use a script. +@@ -71,7 +71,7 @@ do + then + echo " file [$NAME.hex.ref] missing FAILED!" + else +- diff -bBduw $NAME.hex $NAME.hex.ref >$NAME.hex.diff ++ diff -bduw $NAME.hex $NAME.hex.ref >$NAME.hex.diff + echo " binaries differ FAILED!" + fi + fail="$[$fail+1]" diff --git a/devel/dasm/pkg/DESCR b/devel/dasm/pkg/DESCR new file mode 100644 index 00000000000..af0aa086e94 --- /dev/null +++ b/devel/dasm/pkg/DESCR @@ -0,0 +1,3 @@ +DASM, a versatile macro assembler with support for several 8-bit +microprocessors including MOS 6502 & 6507; Motorola 6803, 68705, and 68HC11; +Hitachi HD6303 (extended Motorola 6801) and Fairchild F8. diff --git a/devel/dasm/pkg/PLIST b/devel/dasm/pkg/PLIST new file mode 100644 index 00000000000..a260f31aabe --- /dev/null +++ b/devel/dasm/pkg/PLIST @@ -0,0 +1,24 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2021/01/15 15:01:36 gonzalo Exp $ +@bin bin/dasm +@bin bin/ftohex +share/doc/dasm/ +share/doc/dasm/6502.tex +share/doc/dasm/6803.tex +share/doc/dasm/68705.tex +share/doc/dasm/68HC11.tex +share/doc/dasm/ChannelF.tex +share/doc/dasm/F8.tex +share/doc/dasm/HD6303.tex +share/doc/dasm/changelog.tex +share/doc/dasm/dasm.pdf +share/doc/dasm/dasm.tex +share/doc/dasm/images/ +share/doc/dasm/images/illegal.png +share/doc/dasm/introduction.tex +share/doc/dasm/legal.tex +share/doc/dasm/machines.tex +share/doc/dasm/manual.tex +share/doc/dasm/mc68hc908.tex +share/doc/dasm/preface.tex +share/doc/dasm/processor6502.tex +share/doc/dasm/titlepage.tex