Fix build on Solaris. From Jonathan Perkin in PR 22896.

This commit is contained in:
wiz 2003-09-22 21:12:17 +00:00
parent c40e6e518b
commit 5c9e502d5b
3 changed files with 32 additions and 12 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.4 2003/03/29 12:42:08 jmmv Exp $
# $NetBSD: Makefile,v 1.5 2003/09/22 21:12:17 wiz Exp $
#
DISTNAME= newsfetch-1.3
@ -12,4 +12,10 @@ COMMENT= Downloads newsgroup messages in mail file format
USE_CONFIGURE= yes
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "SunOS"
LDFLAGS+= -lsocket -lnsl -lresolv
.endif
.include "../../mk/bsd.pkg.mk"

View file

@ -1,5 +1,5 @@
$NetBSD: distinfo,v 1.2 2001/04/19 13:37:54 agc Exp $
$NetBSD: distinfo,v 1.3 2003/09/22 21:12:18 wiz Exp $
SHA1 (newsfetch-1.3.tar.gz) = e497eecffa15d62b1cde6921734dd6e1cb9d933c
Size (newsfetch-1.3.tar.gz) = 12159 bytes
SHA1 (patch-aa) = 6ab267de378355c0e738e6b9da4c8bb9dfd031a0
SHA1 (patch-aa) = 1311f2d0b7a8cdb4e07ba8b6dba491d9878e20df

View file

@ -1,18 +1,32 @@
$NetBSD: patch-aa,v 1.1.1.1 2000/12/27 23:15:51 hubertf Exp $
$NetBSD: patch-aa,v 1.2 2003/09/22 21:12:19 wiz Exp $
--- Makefile.orig Wed Dec 27 23:23:40 2000
+++ Makefile
@@ -1,7 +1,7 @@
--- Makefile.orig Mon Nov 13 02:01:49 2000
+++ Makefile Mon Sep 22 19:38:52 2003
@@ -1,9 +1,9 @@
# Makefile for newsfetch program
CC = gcc
-CC = gcc
-BINDIR = /usr/local/bin
-MANDIR = /usr/local/man/man1
+#CC = gcc
+BINDIR = ${PREFIX}/bin
+MANDIR = ${PREFIX}/man/man1
CFLAGS= -O2 # inline opt
-CFLAGS= -O2 # inline opt
+#CFLAGS= -O2 # inline opt
@@ -25,10 +25,8 @@
# uncomment this for strict checking
#CFLAGS = -O2 -Wall -pedantic -Wstrict-prototypes -fno-strength-reduce
@@ -15,8 +15,7 @@
objs = newsfetch.o nntp.o net.o opt.o util.o getopt.o
newsfetch: $(objs)
- $(CC) -o newsfetch $(objs)
- strip newsfetch
+ $(CC) -o newsfetch $(objs) $(LDFLAGS)
.c.o:
$(CC) -c $(CFLAGS) $<
@@ -25,10 +24,8 @@
rm -f *.o newsfetch
install:
@ -20,8 +34,8 @@ $NetBSD: patch-aa,v 1.1.1.1 2000/12/27 23:15:51 hubertf Exp $
-# cp newsfetch.1 $(MANDIR)/newsfetch.1
- cp newsfetch /usr/local/bin
- cp newsfetch.1 /usr/local/man/man1
+ cp newsfetch $(BINDIR)/newsfetch
+ cp newsfetch.1 $(MANDIR)/newsfetch.1
+ ${BSD_INSTALL_PROGRAM} newsfetch $(BINDIR)/newsfetch
+ ${BSD_INSTALL_MAN} newsfetch.1 $(MANDIR)/newsfetch.1
uninstall:
rm -f $(BINDIR)/newsfetch