Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 1999 14:37:42 -0500
From:      Ade Lovett <ade@lovett.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/13416: unbreak emulators/cpmemu
Message-ID:  <E11KRok-0003Zj-00@zen.lovett.com>

next in thread | raw e-mail | index | archive | help

>Number:         13416
>Category:       ports
>Synopsis:       unbreak emulators/cpmemu
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 27 12:40:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Ade Lovett
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Lovett Network Consultancy
>Environment:

	Up to date ports tree.

>Description:

	Another package building error cleanup.

>How-To-Repeat:

	cd emulators/cpmemu; make

>Fix:
	
	The port was broken in numerous ways (data files in lib/ instead
	of share/), broken PLIST, explict use of /usr/local etc.. etc..

	Apply following diff (which also takes the port to 0.2.1)


cvs diff: Diffing .
Index: Makefile
===================================================================
RCS file: /home/FreeBSD/cvs/ports/emulators/cpmemu/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- Makefile	1998/10/13 03:37:48	1.11
+++ Makefile	1999/08/27 19:29:36
@@ -1,18 +1,25 @@
 # New ports collection makefile for:	cpm-emulator
-# Version required:	0.2
+# Version required:	0.2.1
 # Date created:		28 June 1995
 # Whom:			janek@gaja.ipan.lublin.pl
 #
 # $Id: Makefile,v 1.11 1998/10/13 03:37:48 jseger Exp $
 #
 
-DISTNAME=	cpm-0.2
-PKGNAME=	cpmemu-0.2
+DISTNAME=	cpm-0.2.1
+PKGNAME=	cpmemu-0.2.1
 CATEGORIES=	emulators
-MASTER_SITES=	ftp://ftp.cdrom.com/pub/linux/slackware-3.2/source/extra-stuff/CPM-80-emulator/
+MASTER_SITES=	ftp://ftp.cdrom.com/pub/linux/slackware/source/extra-stuff/CPM-80-emulator/
 
-BROKEN_ELF=	yes
-
 MAINTAINER=	ports@FreeBSD.org
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/cpm ${PREFIX}/bin/cpmemu
+	${INSTALL_PROGRAM} ${WRKSRC}/format ${PREFIX}/bin/cpmformat
+	${MKDIR} ${PREFIX}/share/cpm
+	${INSTALL_DATA} ${WRKSRC}/z80-binaries/cpm.sys ${PREFIX}/share/cpm
+	${INSTALL_DATA} ${WRKSRC}/z80-binaries/cd.com ${PREFIX}/share/cpm
+	${INSTALL_DATA} ${WRKSRC}/z80-binaries/link.com ${PREFIX}/share/cpm
+	${INSTALL_DATA} ${WRKSRC}/z80-binaries/xccp.com ${PREFIX}/share/cpm
 
 .include <bsd.port.mk>
cvs diff: Diffing files
Index: files/md5
===================================================================
RCS file: /home/FreeBSD/cvs/ports/emulators/cpmemu/files/md5,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 md5
--- md5	1995/07/01 07:55:28	1.1.1.1
+++ md5	1999/08/27 18:53:00
@@ -1 +1 @@
-MD5 (cpm-0.2.tar.gz) = b99db60568b9259989b4a90e7d851474
+MD5 (cpm-0.2.1.tar.gz) = b6aa29c7164e10c2a0ad2f4ac72c3a83
cvs diff: Diffing patches
Index: patches/patch-aa
===================================================================
RCS file: /home/FreeBSD/cvs/ports/emulators/cpmemu/patches/patch-aa,v
retrieving revision 1.2
diff -u -r1.2 patch-aa
--- patch-aa	1995/07/01 08:04:22	1.2
+++ patch-aa	1999/08/27 19:29:55
@@ -1,111 +1,61 @@
-diff -rc ../../cpm-0.2.orig/Makefile ./Makefile
-*** ../../cpm-0.2.orig/Makefile	Wed Jun 28 18:44:25 1995
---- ./Makefile	Wed Jun 28 23:15:31 1995
-***************
-*** 2,8 ****
-        -Wcast-align -Waggregate-return \
-        -Wstrict-prototypes -Wmissing-prototypes \
-        -Wnested-externs -Wwrite-strings -g
-! LDFLAGS = -s -N
-  OBJS = single.o z80emu.o em.o io.o bios.o \
-     commands.o running.o main.o disneu.o disz80.o low.o
-  # old: z80out.o 
---- 2,11 ----
-        -Wcast-align -Waggregate-return \
-        -Wstrict-prototypes -Wmissing-prototypes \
-        -Wnested-externs -Wwrite-strings -g
-! LDFLAGS = -s
-! BINDIR= /usr/local/bin
-! CPMDIR= /usr/local/lib/cpm
-! 
-  OBJS = single.o z80emu.o em.o io.o bios.o \
-     commands.o running.o main.o disneu.o disz80.o low.o
-  # old: z80out.o 
-***************
-*** 22,26 ****
-  cpm: $(OBJS)
-  	gcc $(LDFLAGS) -o cpm $(OBJS)
-  
-  clean:
-! 	rm -f *~ loads.s makeloads *.o $(TARGETS)
---- 25,41 ----
-  cpm: $(OBJS)
-  	gcc $(LDFLAGS) -o cpm $(OBJS)
-  
-+ format: format.o
-+ 	gcc $(LDFLAGS) -o format format.o
-+ 
-+ install: $(TARGETS)
-+ 	install -c -m 755 -o bin -g bin cpm $(BINDIR)/cpmemu
-+ 	-test -d $(CPMDIR) || ( mkdir $(CPMDIR) ; chmod 755 $(CPMDIR) ;\
-+ 		chown bin.bin $(CPMDIR))
-+ 	install -c -m 644 -o bin -g bin z80-binaries/cpm.sys $(CPMDIR)
-+ 	install -c -m 644 -o bin -g bin z80-binaries/cd.com $(CPMDIR)
-+ 	install -c -m 644 -o bin -g bin z80-binaries/link.com $(CPMDIR)
-+ 	install -c -m 644 -o bin -g bin z80-binaries/xccp.com $(CPMDIR)
-+ 
-  clean:
-! 	rm -f *~ loads.s makeloads *.o $(TARGETS)
-diff -rc ../../cpm-0.2.orig/bios.c ./bios.c
-*** ../../cpm-0.2.orig/bios.c	Wed Jun 28 18:44:25 1995
---- ./bios.c	Wed Jun 28 22:55:19 1995
-***************
-*** 229,235 ****
-  	case BIOS:      /* System Reset (coldboot) */
-  	case DIRBUF-20:
-  	    if (!silent_exit)
-! 		printf("\nCp/M BIOS COLDBOOT takes you back to Linux\n");
-  	    exit(0);
-  	case BIOS+3:    /* System Reset (warmboot) */
-  	case DIRBUF-19:
---- 229,235 ----
-  	case BIOS:      /* System Reset (coldboot) */
-  	case DIRBUF-20:
-  	    if (!silent_exit)
-! 		printf("\nCp/M BIOS COLDBOOT takes you back to FreeBSD\n");
-  	    exit(0);
-  	case BIOS+3:    /* System Reset (warmboot) */
-  	case DIRBUF-19:
-diff -rc ../../cpm-0.2.orig/cpmemu.h ./cpmemu.h
-*** ../../cpm-0.2.orig/cpmemu.h	Wed Jun 28 18:44:26 1995
---- ./cpmemu.h	Wed Jun 28 22:55:20 1995
-***************
-*** 11,17 ****
-  /*									     */
-  /*									     */
-  /*****************************************************************************/
-- #define _POSIX_SOURCE
-  #include <stdio.h>
-  #include <stdlib.h>
-  #include <string.h>
---- 11,16 ----
-diff -rc ../../cpm-0.2.orig/io.c ./io.c
-*** ../../cpm-0.2.orig/io.c	Wed Jun 28 18:44:25 1995
---- ./io.c	Wed Jun 28 22:55:20 1995
-***************
-*** 13,20 ****
-  /*****************************************************************************/
-  #include "cpmemu.h"
-  
-- #define HAVE_RAW_IO
-- 
-  /* magic for character I/O */
-  #include <unistd.h>
-  #include <fcntl.h>
---- 13,18 ----
-diff -rc ../../cpm-0.2.orig/low.c ./low.c
-*** ../../cpm-0.2.orig/low.c	Wed Jun 28 18:44:26 1995
---- ./low.c	Wed Jun 28 22:55:20 1995
-***************
-*** 67,76 ****
-  
-      /* get access to sound port */
-      cptr = NULL;
--     if (ioperm(0x61, 1, 1)) {
-  	hardware_access = 0;	/* no access to speaker port */
-  	return;
--     }
-  
-      /* install signal handler */
-      sa.sa_handler = tickerint;
---- 67,74 ----
+--- Makefile.orig	Wed Mar  4 04:12:02 1998
++++ Makefile	Fri Aug 27 14:27:33 1999
+@@ -1,9 +1,8 @@
+-CPMLIBDIR = /usr/local/lib/cpm
+ CFLAGS = -O2 -pipe -ansi -Wall -Wshadow  -Wpointer-arith -Wcast-qual \
+       -Wcast-align -Waggregate-return \
+       -Wstrict-prototypes -Wmissing-prototypes \
+-      -Wnested-externs -Wwrite-strings -g -DCPMLIBDIR=\"$(CPMLIBDIR)\"
+-LDFLAGS = -s -N
++      -Wnested-externs -Wwrite-strings -g -DCPMLIBDIR=\"$(PREFIX)/share/cpm\"
++LDFLAGS = -s 
+ OBJS = single.o z80emu.o em.o io.o bios.o \
+    commands.o running.o main.o disneu.o disz80.o low.o
+ # old: z80out.o 
+@@ -21,7 +20,10 @@
+ single.o: single.S code.s loads.s code2.s codeix.s codeiy.s
+ 
+ cpm: $(OBJS)
+-	gcc $(LDFLAGS) -o cpm $(OBJS)
++	$(CC) $(LDFLAGS) -o cpm $(OBJS)
++
++format: format.o
++	$(CC) $(LDFLAGS) -o format format.o
+ 
+ clean:
+ 	rm -f *~ loads.s makeloads *.o $(TARGETS)
+--- bios.c.orig	Wed Mar  4 04:12:45 1998
++++ bios.c	Fri Aug 27 14:02:20 1999
+@@ -227,7 +227,7 @@
+ 	case BIOS:      /* System Reset (coldboot) */
+ 	case DIRBUF-20:
+ 	    if (!silent_exit)
+-		printf("\nCp/M BIOS COLDBOOT takes you back to Linux\n");
++		printf("\nCp/M BIOS COLDBOOT takes you back to FreeBSD\n");
+ 	    exit(0);
+ 	case BIOS+3:    /* System Reset (warmboot) */
+ 	case DIRBUF-19:
+--- io.c.orig	Tue Jun 21 13:25:46 1994
++++ io.c	Fri Aug 27 14:03:37 1999
+@@ -13,7 +13,7 @@
+ /*****************************************************************************/
+ #include "cpmemu.h"
+ 
+-#define HAVE_RAW_IO
++#undef HAVE_RAW_IO
+ 
+ /* magic for character I/O */
+ #include <unistd.h>
+--- low.c.orig	Tue Jun 21 13:17:08 1994
++++ low.c	Fri Aug 27 14:04:28 1999
+@@ -67,10 +67,8 @@
+ 
+     /* get access to sound port */
+     cptr = NULL;
+-    if (ioperm(0x61, 1, 1)) {
+ 	hardware_access = 0;	/* no access to speaker port */
+ 	return;
+-    }
+ 
+     /* install signal handler */
+     sa.sa_handler = tickerint;
cvs diff: Diffing pkg
Index: pkg/PLIST
===================================================================
RCS file: /home/FreeBSD/cvs/ports/emulators/cpmemu/pkg/PLIST,v
retrieving revision 1.3
diff -u -r1.3 PLIST
--- PLIST	1996/11/18 13:58:23	1.3
+++ PLIST	1999/08/27 19:31:09
@@ -1,5 +1,7 @@
 bin/cpmemu
-lib/cpm/cpm.sys
-lib/cpm/cd.com
-lib/cpm/link.com
-lib/cpm/xccp.com
+bin/cpmformat
+share/cpm/cpm.sys
+share/cpm/cd.com
+share/cpm/link.com
+share/cpm/xccp.com
+@dirrm share/cpm


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E11KRok-0003Zj-00>