Files
pkgsrc-ng/net/tcptrace/patches/patch-aa
2013-09-26 17:14:40 +02:00

81 lines
2.6 KiB
Plaintext

$NetBSD: patch-aa,v 1.9 2011/12/07 15:18:51 joerg Exp $
--- Makefile.in.orig 2004-03-04 20:33:56.000000000 +0000
+++ Makefile.in
@@ -1,4 +1,4 @@
-#
+#
# Makefile for tcptrace
#
srcdir = @srcdir@
@@ -34,8 +34,8 @@ DEFINES += -DBUNZIP2="\"bunzip2\""
#
##################################################################
PCAP_LDLIBS = @V_PCAP_LDLIBS@
-PCAP_INCS = -I/usr/local/include -I. -I../pcap -I/usr/include/pcap
-PCAP_LDFLAGS = -L/usr/local/lib -Llib -Lpcap -L../pcap -L./cygwin-libs
+PCAP_INCS = -I.
+PCAP_LDFLAGS = -Llib -L./cygwin-libs
@@ -129,8 +129,8 @@ DEFINES += -DGROK_ERF
#
##################################################################
# Pathname of directory to install the binary
-BINDIR = /usr/local/bin
-MANDIR = /usr/local/man/
+BINDIR = ${PREFIX}/bin
+MANDIR = ${PREFIX}/man
##################################################################
@@ -151,7 +151,7 @@ INCLS = -I. @V_INCLS@ ${PCAP_INCS}
# Probably want full optimization
# FreeBSD needs -Ae
# HP needs -Ae
-CFLAGS = $(CCOPT) $(DEFINES) @DEFS@ @V_DEFINES@ $(INCLS)
+CFLAGS += $(CCOPT) $(DEFINES) @DEFS@ @V_DEFINES@ $(INCLS)
# Standard LIBS
LDLIBS = @LIBS@ ${PCAP_LDLIBS}
@@ -196,7 +196,7 @@ tcptrace: ${OFILES}
# your machine, just hack in a quick string below in place of the command.
version.o: ${CFILES} Makefile
${CC} ${CFLAGS} -o version.o -c $(srcdir)/version.c \
- -DBUILT_USER="\"`whoami`\"" -DBUILT_HOST="\"`hostname`\"" -DBUILT_DATE="\"`date`\""
+ -DBUILT_USER="\"${USER}\"" -DBUILT_HOST="\"${HOST}\"" -DBUILT_DATE="\"`date`\""
#
# special rules for scanner/parser
@@ -210,26 +210,11 @@ YACC_VAL=@YACC@
LEX_VAL=@LEX@
filt_parser.c: filt_parser.y filter.h
- if test "${YACC_VAL}" = "bison -y" ; then \
- @YACC@ -vd -p filtyy -o filt_parser.c $(srcdir)/filt_parser.y ;\
- cp filt_parser.c flex_bison ;\
- cp filt_parser.h flex_bison ;\
- else \
- echo "Could not find BISON on this system";\
- echo "Copying the BISON output files generated at our place" ;\
- cp flex_bison/filt_parser.c . ;\
- cp flex_bison/filt_parser.h . ;\
- fi
+ @YACC@ -vd -p filtyy -o filt_parser.c $(srcdir)/filt_parser.y
filt_scanner.c: filt_scanner.l filter.h filt_parser.h
- if test ${LEX_VAL} = "flex" ; then \
- @LEX@ -t -Pfiltyy $(srcdir)/filt_scanner.l > filt_scanner.c ;\
- cp filt_scanner.c flex_bison ;\
- else \
- echo "Could not find FLEX on this system" ;\
- echo "Copying the FLEX output files generated at our place" ;\
- cp flex_bison/filt_scanner.c . ;\
- fi
+ @LEX@ -t -Pfiltyy $(srcdir)/filt_scanner.l > filt_scanner.c
+ cp filt_scanner.c flex_bison
# filt_parser.h created as a side effect of running yacc...
filt_parser.h: filt_parser.c