get rid of libgnugetopt dependency for -CURRENT,

use USE_GETOPT_LONG instead.
respect CC, CFLAGS, PREFIX.
This commit is contained in:
FUJISHIMA Satsuki 2003-07-14 02:35:50 +00:00
parent bd97450f14
commit 451c73b09f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=84822
2 changed files with 25 additions and 11 deletions

View File

@ -8,6 +8,7 @@
PORTNAME= nomarch
PORTVERSION= 1.3
PORTREVISION= 1
CATEGORIES= archivers
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= utils/compress
@ -15,17 +16,13 @@ MASTER_SITE_SUBDIR= utils/compress
MAINTAINER= ports@FreeBSD.org
COMMENT= Extracts files from the old `.arc' archive format
LIB_DEPENDS= gnugetopt:${PORTSDIR}/devel/libgnugetopt
USE_GETOPT_LONG=yes
USE_REINPLACE= yes
MAKE_ENV= CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}"
MAN1= nomarch.1
post-patch:
@${REINPLACE_CMD} -e "s,^CC,#CC,g ; s,^CFLAGS,#CFLAGS,g ; \
s,^PREFIX,#PREFIX,g ; \
s,%%LOCALBASE%%,${LOCALBASE},g" ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/nomarch ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/nomarch.1 ${MAN1PREFIX}/man/man1

View File

@ -1,15 +1,32 @@
--- Makefile.orig Mon Nov 5 17:12:58 2001
+++ Makefile Mon Nov 5 17:12:35 2001
--- Makefile.orig Thu Aug 8 21:24:33 2002
+++ Makefile Sun Jul 6 05:16:01 2003
@@ -1,13 +1,13 @@
# Makefile - makefile for nomarch
-CC=gcc
-CFLAGS=-O2 -Wall
+CC?= gcc
+CFLAGS?=-O2 -Wall
# Set BINDIR to directory for binary,
# MANDIR to directory for man page.
# Usually it will be simpler to just set PREFIX.
#
-PREFIX=/usr/local
+PREFIX?=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/man/man1
@@ -18,8 +18,11 @@
all: nomarch
+main.o: main.c
+ ${CC} ${CFLAGS} -I%%LOCALBASE%%/include -o main.o -c main.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -o main.o -c main.c
+
nomarch: $(OBJ)
- $(CC) $(CFLAGS) -o nomarch $(OBJ)
+ $(CC) $(CFLAGS) -o nomarch $(OBJ) -L%%LOCALBASE%%/lib -lgnugetopt
+ $(CC) $(CFLAGS) -o nomarch $(OBJ) $(LDFLAGS)
installdirs:
/bin/sh ./mkinstalldirs $(BINDIR) $(MANDIR)