- cleanup Makefile

- convert patches to unified diffs
- make this port respect CFLAGS
This commit is contained in:
brad 1999-12-15 22:32:10 +00:00
parent 36ce72f399
commit 88b6e1ee18
6 changed files with 93 additions and 118 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.4 1999/09/06 17:46:39 brad Exp $ # $OpenBSD: Makefile,v 1.5 1999/12/15 22:32:10 brad Exp $
DISTNAME= ha0999 DISTNAME= ha0999
PKGNAME= ha-0.999b PKGNAME= ha-0.999b
@ -10,12 +10,11 @@ MAINTAINER= angelos@openbsd.org
USE_GMAKE= yes USE_GMAKE= yes
NO_WRKSUBDIR= yes
MAKEFILE= makefile.nix
MAKE_FLAGS= CC=${CC} -f
ALL_TARGET= ha ALL_TARGET= ha
MAKEFILE= makefile.nix
NO_WRKSUBDIR= yes
do-install: do-install:
@cd ${WRKSRC}; ${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} ha ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/ha ${PREFIX}/bin
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -1,36 +1,20 @@
*** nix/machine.c.orig Thu Jan 12 01:53:00 1995 --- nix/machine.c.orig Thu Jan 12 01:53:00 1995
--- nix/machine.c Tue Nov 25 16:46:54 1997 +++ nix/machine.c Wed Dec 15 17:17:57 1999
*************** @@ -336,7 +336,7 @@
*** 336,342 ****
static char ts[22]; static char ts[22];
struct tm *tim; struct tm *tim;
! tim=localtime((long *)&t); - tim=localtime((long *)&t);
+ tim=localtime((time_t *)&t);
sprintf(ts,"%04d-%02d-%02d %02d:%02d",tim->tm_year+1900,tim->tm_mon+1, sprintf(ts,"%04d-%02d-%02d %02d:%02d",tim->tm_year+1900,tim->tm_mon+1,
tim->tm_mday,tim->tm_hour,tim->tm_min); tim->tm_mday,tim->tm_hour,tim->tm_min);
return ts; return ts;
--- 336,342 ---- @@ -417,7 +417,7 @@
static char ts[22];
struct tm *tim;
! tim=localtime((time_t *)&t);
sprintf(ts,"%04d-%02d-%02d %02d:%02d",tim->tm_year+1900,tim->tm_mon+1,
tim->tm_mday,tim->tm_hour,tim->tm_min);
return ts;
***************
*** 417,423 ****
if (plainname!=NULL) free(plainname),plainname=NULL; if (plainname!=NULL) free(plainname),plainname=NULL;
if ((plainname=malloc(strlen(mdfullpath)+1))==NULL) if ((plainname=malloc(strlen(mdfullpath)+1))==NULL)
error(1,ERR_MEM,"md_stripname()"); error(1,ERR_MEM,"md_stripname()");
! for (i=strlen(mdfullpath)-1;i>0;i--) { - for (i=strlen(mdfullpath)-1;i>0;i--) {
if (mdfullpath[i]=='/') { + for (i=strlen(mdfullpath)-1;i>=0;i--) {
i++;
break;
--- 417,423 ----
if (plainname!=NULL) free(plainname),plainname=NULL;
if ((plainname=malloc(strlen(mdfullpath)+1))==NULL)
error(1,ERR_MEM,"md_stripname()");
! for (i=strlen(mdfullpath)-1;i>=0;i--) {
if (mdfullpath[i]=='/') { if (mdfullpath[i]=='/') {
i++; i++;
break; break;

View File

@ -1,46 +1,28 @@
*** c/hsc.c.orig Tue Nov 25 16:41:59 1997 --- c/hsc.c.orig Thu Jan 12 01:51:16 1995
--- c/hsc.c Tue Nov 25 16:43:57 1997 +++ c/hsc.c Wed Dec 15 17:17:58 1999
*************** @@ -19,7 +19,6 @@
*** 19,25 ****
HA HSC method HA HSC method
***********************************************************************/ ***********************************************************************/
- #include <malloc.h> -#include <malloc.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "ha.h" #include "ha.h"
--- 19,24 ---- @@ -486,7 +485,7 @@
***************
*** 486,492 ****
register U16B c; register U16B c;
register U16B tv; register U16B tv;
register U16B i; register U16B i;
! register S16B sum,tot,esc,cf; - register S16B sum,tot,esc,cf;
+ register S16B sum,tot,esc,cf = 0;
register unsigned char sv; register unsigned char sv;
esc=adj_escape_prob(fe[cp],cp); esc=adj_escape_prob(fe[cp],cp);
--- 485,491 ---- @@ -546,7 +545,7 @@
register U16B c; register U16B c;
register U16B tv; register U16B tv;
register U16B i; register U16B i;
! register S16B sum,tot,esc,cf = 0; - register S16B sum,tot,esc,cf;
register unsigned char sv; + register S16B sum,tot,esc,cf = 0;
esc=adj_escape_prob(fe[cp],cp);
***************
*** 546,552 ****
register U16B c;
register U16B tv;
register U16B i;
! register S16B sum,tot,esc,cf;
esc=tot=0;
for (i=cp;i!=NIL;i=nb[i]) {
--- 545,551 ----
register U16B c;
register U16B tv;
register U16B i;
! register S16B sum,tot,esc,cf = 0;
esc=tot=0; esc=tot=0;
for (i=cp;i!=NIL;i=nb[i]) { for (i=cp;i!=NIL;i=nb[i]) {

View File

@ -1,12 +1,10 @@
*** c/asc.c.orig Tue Nov 25 16:44:31 1997 --- c/asc.c.orig Thu Jan 12 01:51:34 1995
--- c/asc.c Tue Nov 25 16:44:50 1997 +++ c/asc.c Wed Dec 15 17:17:58 1999
*************** @@ -19,7 +19,6 @@
*** 19,25 ****
HA ASC method HA ASC method
***********************************************************************/ ***********************************************************************/
- #include <malloc.h> -#include <malloc.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "ha.h" #include "ha.h"
--- 19,24 ----

View File

@ -1,12 +1,10 @@
*** c/cpy.c.orig Tue Nov 25 16:47:16 1997 --- c/cpy.c.orig Thu Jan 12 01:51:30 1995
--- c/cpy.c Tue Nov 25 16:47:26 1997 +++ c/cpy.c Wed Dec 15 17:17:58 1999
*************** @@ -20,7 +20,6 @@
*** 20,26 ****
***********************************************************************/ ***********************************************************************/
#include <stdio.h> #include <stdio.h>
- #include <malloc.h> -#include <malloc.h>
#include "ha.h" #include "ha.h"
#include "cpy.h" #include "cpy.h"
#include "haio.h" #include "haio.h"
--- 20,25 ----

View File

@ -0,0 +1,14 @@
--- makefile.nix.orig Wed Dec 15 17:19:59 1999
+++ makefile.nix Wed Dec 15 17:20:14 1999
@@ -21,9 +21,9 @@
MCH = nix
-CC = gcc
+#CC = gcc
CPP = $(CC) -E
-CFLAGS = -Wall -O2 -c -I../$(MCH) -I../include
+CFLAGS += -Wall -c -I../$(MCH) -I../include
LDFLAGS = -O2
MDEFINES = "CC=$(CC)" "CPP=$(CPP)" "CFLAGS=$(CFLAGS)" "DEFS=$(DEFS)"