From 0d3d63dd415f5da52ae9acdf816f5b49c6f36d1a Mon Sep 17 00:00:00 2001 From: Tilman Keskinoz Date: Sun, 16 Feb 2003 01:15:21 +0000 Subject: Fix build on STABLE (missing libgnugetopt). Use PORTDOCS. Fix a CoreDump PR: 47551 Submitted by: "Simon 'corecode' Schubert" & Volker Stolz --- misc/colortail/Makefile | 22 ++++++++++++---------- misc/colortail/files/patch-OptionsParser.cc | 20 ++++++++++++++++++++ misc/colortail/files/patch-configure | 11 +++++++++++ misc/colortail/pkg-plist | 12 ++++++------ 4 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 misc/colortail/files/patch-OptionsParser.cc create mode 100644 misc/colortail/files/patch-configure (limited to 'misc') diff --git a/misc/colortail/Makefile b/misc/colortail/Makefile index 9b44fcb61144..38117fb2f342 100644 --- a/misc/colortail/Makefile +++ b/misc/colortail/Makefile @@ -7,23 +7,25 @@ PORTNAME= colortail PORTVERSION= 0.3.0 +PORTREVISION= 1 CATEGORIES= misc MASTER_SITES= http://www.student.hk-r.se/~pt98jan/ MAINTAINER= ports@FreeBSD.org -LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt - GNU_CONFIGURE= yes -CONFIGURE_ENV= CPPFLAGS="-DHAVE_DECL_GETOPT=1 -I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" +CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" + +.if !exists(/usr/include/getopt.h) +LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib -lgnugetopt +.endif +.if !defined(NOPORTDOCS) post-install: - @ ${MKDIR} ${PREFIX}/share/colortail - @ ${INSTALL_DATA} ${WRKSRC}/example-conf/conf* ${PREFIX}/share/colortail/ - @ ${ECHO} "*********************************************" - @ ${ECHO} "Examples of the color configuration files are" - @ ${ECHO} "in ${PREFIX}/share/colortail/" - @ ${ECHO} "*********************************************" + @${MKDIR} ${EXAMPLESDIR} + @${INSTALL_DATA} ${WRKSRC}/example-conf/conf* ${EXAMPLESDIR} +.endif .include diff --git a/misc/colortail/files/patch-OptionsParser.cc b/misc/colortail/files/patch-OptionsParser.cc new file mode 100644 index 000000000000..ed4278ef50e3 --- /dev/null +++ b/misc/colortail/files/patch-OptionsParser.cc @@ -0,0 +1,20 @@ +--- OptionsParser.cc.orig Thu Aug 5 01:23:39 1999 ++++ OptionsParser.cc Tue Jan 28 13:11:52 2003 +@@ -136,6 +136,8 @@ + { + if (optarg[pos] == ',') + { ++ filename.put('\0'); ++ + // found seperator + // set filename in options class + o->cfg_filenames[o->nr_cfg_files] = filename.str(); +@@ -152,6 +154,8 @@ + + if (optarg[pos] == '\0') + { ++ filename.put('\0'); ++ + // found end of string + // set filename in options class + o->cfg_filenames[o->nr_cfg_files] = filename.str(); diff --git a/misc/colortail/files/patch-configure b/misc/colortail/files/patch-configure new file mode 100644 index 000000000000..0805ca424432 --- /dev/null +++ b/misc/colortail/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig Sun Aug 15 16:36:25 1999 ++++ configure Tue Jan 28 15:06:04 2003 +@@ -1206,7 +1206,7 @@ + + fi + +-for ac_hdr in malloc.h unistd.h regex.h gnuregex.h ++for ac_hdr in malloc.h unistd.h regex.h + do + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 diff --git a/misc/colortail/pkg-plist b/misc/colortail/pkg-plist index 6b9ad124ef0f..6a41fb1bc909 100644 --- a/misc/colortail/pkg-plist +++ b/misc/colortail/pkg-plist @@ -1,7 +1,7 @@ bin/colortail -share/colortail/conf.daemon -share/colortail/conf.kernel -share/colortail/conf.messages -share/colortail/conf.secure -share/colortail/conf.xferlog -@dirrm share/colortail +%%PORTDOCS%%share/examples/colortail/conf.daemon +%%PORTDOCS%%share/examples/colortail/conf.kernel +%%PORTDOCS%%share/examples/colortail/conf.messages +%%PORTDOCS%%share/examples/colortail/conf.secure +%%PORTDOCS%%share/examples/colortail/conf.xferlog +%%PORTDOCS%%@dirrm share/examples/colortail -- cgit v1.2.3