Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Feb 2008 18:47:20 GMT
From:      Balazs Nagy <js@iksz.hu>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/120480: [patch] quilt: RPM dependency should be optional
Message-ID:  <200802091847.m19IlKQE057086@www.freebsd.org>
Resent-Message-ID: <200802091850.m19Io0Mp021272@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         120480
>Category:       ports
>Synopsis:       [patch] quilt: RPM dependency should be optional
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 09 18:50:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Balazs Nagy
>Release:        FreeBSD 6.2-RELEASE-p7
>Organization:
>Environment:
FreeBSD dev 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #1: Tue Sep 25 18:19:50 CEST 2007     root@kraft.poison.hu:/usr/obj/usr/src/sys/FP  i386
>Description:
devel/quilt package depends on rpm, because of a helper script (called inspect, which gets info from an rpm spec file).  IMHO this functionality is needed only if rpm is already installed.  The patch 
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

>From 7b47243ab8dbd03dd2538b7b06b3cf0c13e8c4fa Mon Sep 17 00:00:00 2001
From: Balazs Nagy <js@iksz.hu>
Date: Sat, 9 Feb 2008 18:48:02 +0000
Subject: quilt: RPM dependency should be optional

This patch makes quilt to be independent from RPM, with the option for RPM support.

Signed-off-by: Balazs Nagy <js@iksz.hu>
---
 Makefile  |   16 ++++++++++++++--
 pkg-plist |    4 ++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 607d617..dab5ef1 100644
--- a/Makefile
+++ b/Makefile
@@ -17,20 +17,32 @@ BUILD_DEPENDS=	bash:${PORTSDIR}/shells/bash \
 		gcp:${PORTSDIR}/sysutils/coreutils \
 		gsed:${PORTSDIR}/textproc/gsed \
 		gpatch:${PORTSDIR}/devel/patch \
-		diffstat:${PORTSDIR}/textproc/diffstat \
-		rpm:${PORTSDIR}/archivers/rpm
+		diffstat:${PORTSDIR}/textproc/diffstat
 RUN_DEPENDS:=	${BUILD_DEPENDS}
 
 USE_GMAKE=	yes
 USE_GETTEXT=	yes
 USE_PERL5=	yes
 
+OPTIONS=	RPMBUILD "rpmbuild support" off
+
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--with-sed=${LOCALBASE}/bin/gsed --without-getopt --with-patch=${LOCALBASE}/bin/gpatch
 
 MAN1=		guards.1 quilt.1
 PORTDOCS=	README* quilt.pdf
 
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_RPMBUILD)
+BUILD_DEPENDS+=	rpm:${PORTSDIR}/archivers/rpm
+RUN_DEPENDS+=	rpm:${PORTSDIR}/archivers/rpm
+PLIST_SUB+=	RPMBUILD=""
+.else
+CONFIGURE_ARGS+=--without-rpmbuild
+PLIST_SUB+=	RPMBUILD="@comment "
+.endif
+
 post-install:
 	@if [ ! -f ${PREFIX}/etc/quilt.quiltrc ]; then \
 		${CP} ${PREFIX}/etc/quilt.quiltrc.sample \
diff --git a/pkg-plist b/pkg-plist
index c436378..979310a 100644
--- a/pkg-plist
+++ b/pkg-plist
@@ -12,7 +12,7 @@ share/libexec/quilt/compat/cp
 share/libexec/quilt/compat/date
 share/libexec/quilt/compat/getopt
 share/libexec/quilt/compat/patch
-share/libexec/quilt/compat/rpmbuild
+%%RPMBUILD%%share/libexec/quilt/compat/rpmbuild
 share/libexec/quilt/compat/sed
 share/libexec/quilt/compat/sendmail
 share/libexec/quilt/delete
@@ -37,7 +37,7 @@ share/libexec/quilt/remove
 share/libexec/quilt/rename
 share/libexec/quilt/scripts/dependency-graph
 share/libexec/quilt/scripts/edmail
-share/libexec/quilt/scripts/inspect
+%%RPMBUILD%%share/libexec/quilt/scripts/inspect
 share/libexec/quilt/scripts/parse-patch
 share/libexec/quilt/scripts/patchfns
 share/libexec/quilt/scripts/remove-trailing-ws
-- 
1.5.3.8



>Release-Note:
>Audit-Trail:
>Unformatted:



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