Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jun 2001 14:25:05 -0700
From:      Dima Dorfman <dima@unixfreak.org>
To:        Peter Pentchev <roam@orbitel.bg>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/28222: New port of error: analyze compiler error messages 
Message-ID:  <20010618212505.81B383E2F@bazooka.unixfreak.org>
In-Reply-To: <200106170850.f5H8oSA78770@freefall.freebsd.org>; from roam@orbitel.bg on "Sun, 17 Jun 2001 01:50:28 -0700 (PDT)"

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Pentchev <roam@orbitel.bg> writes:
>  On Sat, Jun 16, 2001 at 11:48:55PM -0700, Dima Dorfman wrote:
>  > 
>  > >Number:         28222
>  > >Category:       ports
>  > >Synopsis:       New port of error: analyze compiler error messages
>  > >Originator:     Dima Dorfman
>  >
>  [...]
>  
>  And one more comment :)
>  
>  > X# This isn't very scalable, but I'm lazy..
>  > X.if defined(NOMANCOMPRESS)
>  > XMANNAME=	error.1
>  > X.else
>  > XMANNAME=	error.1.gz
>  > X.endif
>  
>  How about:
>  
>  .if !defined(NOMANCOMPRESS)
>  .for i in 1
>  .ifdef MAN${i}
>  MAN$i:= 	${MAN$i:C/$/.gz/}
>  .endif
>  .endfor
>  .endif

Actually, this doesn't work.  The problem is that on deinstall,
bsd.port.mk will do that transformation for you (so it can delete the
right man pages); with the above code, it will end up trying to delete
error.1.gz.gz, which will fail miserably.

I've attached a diff against /dev/null of the Makefile I came up with
based on the above which doesn't have that problem.  Please review.

Thanks,

					Dima Dorfman
					dima@unixfreak.org


--- /dev/null	Mon Jun 18 14:10:02 2001
+++ Makefile	Mon Jun 18 14:11:14 2001
@@ -0,0 +1,73 @@
+# New ports collection makefile for:	error
+# Date created:			16 June 2001
+# Whom:				dd
+#
+# $FreeBSD$
+#
+
+PORTNAME=	error
+PORTVERSION=	20010616
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_LOCAL} \
+		http://www.unixfreak.org/~dima/distfiles/
+MASTER_SITE_SUBDIR=	dd
+
+MAINTAINER=	dd@FreeBSD.org
+
+MANSECTS=	1
+MAN1=		error.1
+MANCOMPRESSED=	maybe
+
+# MAN page COMPression SUFFIX
+.if !defined(NOMANCOMPRESS)
+MANCOMPSUFFIX=	.gz
+.else
+MANCOMPSUFFIX=
+.endif
+
+do-install:
+	@${INSTALL_PROGRAM} ${WRKSRC}/error ${PREFIX}/bin/error
+.for __s in ${MANSECTS}
+.for __m in ${MAN${__s}:S/$/${MANCOMPSUFFIX}/}
+	@${INSTALL_MAN} ${WRKSRC}/${__m} ${PREFIX}/man/man${__s}/${__m}
+.endfor
+.endfor
+
+#
+# Ports build/install stuff stops here.  Tarball creation stuff begins here.
+#
+.include <bsd.port.pre.mk>
+CVS_CMD?=	cvs -z3
+CVS_DATE=	Sun Jun  16 15:58:14 PDT 2001
+CVS_SITES?=	anoncvs@anoncvs.openbsd.org:/cvs
+CVS_MODULE=	src/usr.bin/error
+
+#
+# CVS checkout stuff mostly stolen from security/openssh-askpass port by
+# kris@freebsd.org
+#
+tarball:
+	@${MKDIR} ${DISTDIR}/${PKGNAME} && \
+	cd ${DISTDIR}/${PKGNAME}; \
+	for CVS_SITE in ${CVS_SITES}; do \
+		${ECHO_MSG} ">> Attempting to check out from $${CVS_SITE}."; \
+		if ${CVS_CMD} -d $${CVS_SITE} co -D "${CVS_DATE}" \
+		    ${CVS_MODULE}; then \
+			cd ${DISTDIR}; \
+			${ECHO_MSG} ">> Creating dist tarball in ${DISTDIR}"; \
+			${ECHO_MSG} ">> \"${PKGNAME}.tar.gz\"."; \
+			${MV} ${PKGNAME}/${CVS_MODULE} \
+				${PKGNAME}/${CVS_MODULE:H}/${PKGNAME}; \
+			${TAR} -cz \
+				-X ${FILESDIR}/tarignore \
+				-f ${PKGNAME}.tar.gz \
+				-C ${PKGNAME}/${CVS_MODULE:H} \
+				${PKGNAME}; \
+			exit; \
+		fi \
+	done; \
+	${RMDIR} ${DISTDIR}/${PKGNAME}; \
+	${ECHO_MSG} ">> CVS checkout failed."; \
+	exit 1;
+
+.include <bsd.port.post.mk>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010618212505.81B383E2F>