pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/cross



Module Name:    pkgsrc
Committed By:   thorpej
Date:           Fri Jan 20 21:43:56 UTC 2023

Modified Files:
        pkgsrc/cross: Makefile
Added Files:
        pkgsrc/cross/z80asm: DESCR Makefile PLIST distinfo
        pkgsrc/cross/z80asm/patches: patch-Makefile patch-expressions.c
            patch-z80asm.c

Log Message:
Add a package for z80asm, a Z80 assembler.

This is distinct from the other z80-asm package.  Why do we have it, then?
Because this Z80 assebler has some features that the z80-asm assembler
does not.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 pkgsrc/cross/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/cross/z80asm/DESCR pkgsrc/cross/z80asm/Makefile \
    pkgsrc/cross/z80asm/PLIST pkgsrc/cross/z80asm/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/cross/z80asm/patches/patch-Makefile \
    pkgsrc/cross/z80asm/patches/patch-expressions.c \
    pkgsrc/cross/z80asm/patches/patch-z80asm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/cross/Makefile
diff -u pkgsrc/cross/Makefile:1.109 pkgsrc/cross/Makefile:1.110
--- pkgsrc/cross/Makefile:1.109 Sat Dec 24 23:57:32 2022
+++ pkgsrc/cross/Makefile       Fri Jan 20 21:43:56 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.109 2022/12/24 23:57:32 wiz Exp $
+# $NetBSD: Makefile,v 1.110 2023/01/20 21:43:56 thorpej Exp $
 #
 
 COMMENT=       Cross-platform development utilities
@@ -84,5 +84,6 @@ SUBDIR+=      xtensa-esp32s3-elf-binutils
 SUBDIR+=       xtensa-esp32s3-elf-gcc
 SUBDIR+=       xtensa-lx106-elf-binutils
 SUBDIR+=       xtensa-lx106-elf-gcc
+SUBDIR+=       z80asm
 
 .include "../mk/misc/category.mk"

Added files:

Index: pkgsrc/cross/z80asm/DESCR
diff -u /dev/null pkgsrc/cross/z80asm/DESCR:1.1
--- /dev/null   Fri Jan 20 21:43:56 2023
+++ pkgsrc/cross/z80asm/DESCR   Fri Jan 20 21:43:56 2023
@@ -0,0 +1,14 @@
+z80asm is an assembler for the Z80 microprcessor.  The assembler aims to be
+portable and complete.
+
+Features:
+* All official mnemonics are recognized.
+* Most unofficial mnemonics are recognized.
+* Very complex expressions are allowed (bash style).
+* Other source files can be included.
+* Code can contain conditional parts.
+* Beside the binary output file, a label file can be output with a list
+  of all labels in the program. This label file is includable by other
+  source files, so linker-like functionality can be obtained with it.
+* There is support for listing files, with the input code and the assembled
+  result next to each other.
Index: pkgsrc/cross/z80asm/Makefile
diff -u /dev/null pkgsrc/cross/z80asm/Makefile:1.1
--- /dev/null   Fri Jan 20 21:43:56 2023
+++ pkgsrc/cross/z80asm/Makefile        Fri Jan 20 21:43:56 2023
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.1 2023/01/20 21:43:56 thorpej Exp $
+
+DISTNAME=      z80asm-1.8
+CATEGORIES=    cross
+MASTER_SITES=  https://download.savannah.nongnu.org/releases/z80asm/
+
+MAINTAINER=    thorpej%NetBSD.org@localhost
+HOMEPAGE=      https://savannah.nongnu.org/projects/z80asm/
+COMMENT=       Assembler for the Z80 microprcessor
+LICENSE=       gnu-gpl-v3
+
+USE_TOOLS+=    gmake
+
+INSTALLATION_DIRS=     bin ${PKGMANDIR}/man1
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/z80asm \
+           ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_MAN} ${WRKSRC}/z80asm.1 \
+           ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/cross/z80asm/PLIST
diff -u /dev/null pkgsrc/cross/z80asm/PLIST:1.1
--- /dev/null   Fri Jan 20 21:43:56 2023
+++ pkgsrc/cross/z80asm/PLIST   Fri Jan 20 21:43:56 2023
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2023/01/20 21:43:56 thorpej Exp $
+bin/z80asm
+man/man1/z80asm.1
Index: pkgsrc/cross/z80asm/distinfo
diff -u /dev/null pkgsrc/cross/z80asm/distinfo:1.1
--- /dev/null   Fri Jan 20 21:43:56 2023
+++ pkgsrc/cross/z80asm/distinfo        Fri Jan 20 21:43:56 2023
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2023/01/20 21:43:56 thorpej Exp $
+
+BLAKE2s (z80asm-1.8.tar.gz) = c20093c5cce1121728b3deb795136402429fda251a101a533f0d4434019ccdfd
+SHA512 (z80asm-1.8.tar.gz) = 0b2da513200dbdd2d4867347b24488c786e014e4ab84e92e8f0585971bb39a57e65409dc6a95edbe9c017ebb3b25b4b4be9a7bd436b6cf610b59d46a711cb66f
+Size (z80asm-1.8.tar.gz) = 57269 bytes
+SHA1 (patch-Makefile) = 3b3c85d4005ea5e8dc5ee910f854e46b1b8f7b0a
+SHA1 (patch-expressions.c) = c44284596a5278b347707dda5fe8fa85a98030cc
+SHA1 (patch-z80asm.c) = d5abe41d337a738ec41bae19c2d68262dca04339

Index: pkgsrc/cross/z80asm/patches/patch-Makefile
diff -u /dev/null pkgsrc/cross/z80asm/patches/patch-Makefile:1.1
--- /dev/null   Fri Jan 20 21:43:56 2023
+++ pkgsrc/cross/z80asm/patches/patch-Makefile  Fri Jan 20 21:43:56 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-Makefile,v 1.1 2023/01/20 21:43:56 thorpej Exp $
+
+Use /bin/sh, rather than /bin/bash, for the shell.
+
+--- Makefile.orig      2023-01-20 20:40:24.495652148 +0000
++++ Makefile   2023-01-20 20:40:34.704993741 +0000
+@@ -18,7 +18,7 @@
+ 
+ CC = gcc
+ CFLAGS = -O0 -Wall -Wwrite-strings -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -pedantic -ansi -Wshadow 
-ggdb3 -W -Ignulib
+-SHELL = /bin/bash
++SHELL = /bin/sh
+ VERSION ?= $(shell echo -n `cat VERSION | cut -d. -f1`. ; echo $$[`cat VERSION | cut -d. -f2` + 1])
+ 
+ all:z80asm
Index: pkgsrc/cross/z80asm/patches/patch-expressions.c
diff -u /dev/null pkgsrc/cross/z80asm/patches/patch-expressions.c:1.1
--- /dev/null   Fri Jan 20 21:43:56 2023
+++ pkgsrc/cross/z80asm/patches/patch-expressions.c     Fri Jan 20 21:43:56 2023
@@ -0,0 +1,44 @@
+$NetBSD: patch-expressions.c,v 1.1 2023/01/20 21:43:56 thorpej Exp $
+
+Cast arguments to ctype(3) functions to (unsigned char).
+
+--- expressions.c.orig 2009-04-11 08:33:07.000000000 +0000
++++ expressions.c      2023-01-20 20:44:01.470323352 +0000
+@@ -48,7 +48,7 @@ rd_number (const char **p, const char **
+            "(string=%s).\n", stack[sp].line, addr, base, *p);
+   num[base] = '\0';
+   *p = delspc (*p);
+-  while (**p && (c = strchr (num, tolower (**p))))
++  while (**p && (c = strchr (num, tolower ((unsigned char)**p))))
+     {
+       i = c - num;
+       if (verbose >= 7)
+@@ -83,7 +83,7 @@ rd_otherbasenumber (const char **p, int 
+       printerr (1, "unexpected end of line after `@'\n");
+       return 0;
+     }
+-  if (**p == '0' || !isalnum (**p))
++  if (**p == '0' || !isalnum ((unsigned char)**p))
+     {
+       if (valid)
+       *valid = 0;
+@@ -93,8 +93,8 @@ rd_otherbasenumber (const char **p, int 
+     }
+   c = **p;
+   (*p)++;
+-  if (isalpha (**p))
+-    return rd_number (p, NULL, tolower (c) - 'a' + 1);
++  if (isalpha ((unsigned char)**p))
++    return rd_number (p, NULL, tolower ((unsigned char)c) - 'a' + 1);
+   return rd_number (p, NULL, c - '0' + 1);
+ }
+ 
+@@ -189,7 +189,7 @@ check_label (struct label *labels, const
+   const char *c;
+   unsigned s2;
+   *p = delspc (*p);
+-  for (c = *p; isalnum (*c) || *c == '_' || *c == '.'; ++c)
++  for (c = *p; isalnum ((unsigned char)*c) || *c == '_' || *c == '.'; ++c)
+     {
+     }
+   s2 = c - *p;
Index: pkgsrc/cross/z80asm/patches/patch-z80asm.c
diff -u /dev/null pkgsrc/cross/z80asm/patches/patch-z80asm.c:1.1
--- /dev/null   Fri Jan 20 21:43:56 2023
+++ pkgsrc/cross/z80asm/patches/patch-z80asm.c  Fri Jan 20 21:43:56 2023
@@ -0,0 +1,42 @@
+$NetBSD: patch-z80asm.c,v 1.1 2023/01/20 21:43:56 thorpej Exp $
+
+Cast arguments to ctype(3) functions to (unsigned char).  Remove a
+set-but-not-used variable.
+
+--- z80asm.c.orig      2023-01-20 20:33:15.390493731 +0000
++++ z80asm.c   2023-01-20 20:37:05.963725354 +0000
+@@ -123,7 +123,7 @@ printerr (int error, const char *fmt, ..
+ const char *
+ delspc (const char *ptr)
+ {
+-  while (*ptr && isspace (*ptr))
++  while (*ptr && isspace ((unsigned char)*ptr))
+     ptr++;
+   if (*ptr == ';')
+     ptr = "";
+@@ -440,7 +440,7 @@ parse_commandline (int argc, char **argv
+ static int
+ indx (const char **ptr, const char **list, int error, const char **expr)
+ {
+-  int i, l;
++  int i;
+   *ptr = delspc (*ptr);
+   if (!**ptr)
+     {
+@@ -461,7 +461,6 @@ indx (const char **ptr, const char **lis
+       int had_expr = 0;
+       if (!list[i][0])
+       continue;
+-      l = strlen (list[i]);
+       while (*check)
+       {
+         if (*check == ' ')
+@@ -492,7 +491,7 @@ indx (const char **ptr, const char **lis
+ 
+         ++check;
+       }
+-      if (*check || (isalnum (check[-1]) && isalnum (input[0])))
++      if (*check || (isalnum ((unsigned char)check[-1]) && isalnum ((unsigned char)input[0])))
+       continue;
+       if (had_expr)
+       {



Home | Main Index | Thread Index | Old Index