Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Mar 2006 16:04:53 +0100 (CET)
From:      Benjamin Lutz <benlutz@datacomm.ch>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Andy Pavlo <amp0928@rit.edu>
Subject:   ports/94779: [PATCH] misc/hotkeys: make xosd dependency optional
Message-ID:  <20060321150453.E7FCF2E051@maxlor.mine.nu>
Resent-Message-ID: <200603211510.k2LFABix008918@freefall.freebsd.org>

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

>Number:         94779
>Category:       ports
>Synopsis:       [PATCH] misc/hotkeys: make xosd dependency 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:   Tue Mar 21 15:10:10 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Benjamin Lutz
>Release:        FreeBSD 5.4-RELEASE-p10 i386
>Organization:
>Environment:
System: FreeBSD merlin 5.4-RELEASE-p10 FreeBSD 5.4-RELEASE-p10 #3: Wed Jan 25 18:23:49 CET 2006 maxlor@merlin:/usr/obj/usr/src/sys/MERLIN i386

>Description:
This patch makes the xosd dependency optional by introducing an OPTIONS
switch. It defaults to on as per POLA.

While here I also replaced the explicit paths by DATADIR in the plist,
as portlint was complaining about that.
>How-To-Repeat:
>Fix:

--- patch begins here ---
diff -ruN misc/hotkeys.orig/Makefile misc/hotkeys/Makefile
--- misc/hotkeys.orig/Makefile	Tue Mar 21 15:15:34 2006
+++ misc/hotkeys/Makefile	Tue Mar 21 15:56:29 2006
@@ -15,21 +15,28 @@
 MAINTAINER=	amp0928@rit.edu
 COMMENT=	Allows usage of special keys on internet/multimedia keyboards
 
-LIB_DEPENDS=	xosd.4:${PORTSDIR}/misc/xosd \
-		xml2.5:${PORTSDIR}/textproc/libxml2 \
-		db3.3:${PORTSDIR}/databases/db3
+OPTIONS=	XOSD	"Enable On-Screen-Display support"	on
 
-WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
-GNU_CONFIGURE=	1
-CONFIGURE_ARGS=	--with-db3-inc=${LOCALBASE}/include/db3 \
-		--with-db3-lib=${LOCALBASE}/lib \
-		--with-xosd
+GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
-
 MAN1=		hotkeys.1
 ORIG_CONFIG=	${PREFIX}/etc/hotkeys.conf
 SAMPLE_CONFIG=	${PREFIX}/etc/hotkeys.conf.sample
 
+.include <bsd.port.pre.mk>
+
+LIB_DEPENDS+=	xml2.5:${PORTSDIR}/textproc/libxml2 \
+		db3.3:${PORTSDIR}/databases/db3
+
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
+CONFIGURE_ARGS=	--with-db3-inc=${LOCALBASE}/include/db3 \
+		--with-db3-lib=${LOCALBASE}/lib
+
+.if defined(WITH_XOSD)
+LIB_DEPENDS+=	xosd.4:${PORTSDIR}/misc/xosd
+CONFIGURE_ARGS+=	--with-xosd
+.endif
+
 post-extract:
 	@${CP} ${PATCHDIR}/error.h ${WRKSRC}/src
 	@${CP} ${PATCHDIR}/eliteduo.def ${WRKSRC}/def
@@ -39,4 +46,4 @@
 	@${MV} ${ORIG_CONFIG} ${SAMPLE_CONFIG}
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN misc/hotkeys.orig/pkg-plist misc/hotkeys/pkg-plist
--- misc/hotkeys.orig/pkg-plist	Tue Mar 21 15:15:34 2006
+++ misc/hotkeys/pkg-plist	Tue Mar 21 15:51:38 2006
@@ -1,31 +1,31 @@
 bin/hotkeys
 etc/hotkeys.conf.sample
-share/hotkeys/splash.png
-share/hotkeys/acerwl.def
-share/hotkeys/btc9000.def
-share/hotkeys/eliteduo.def
-share/hotkeys/hp5181.def
-share/hotkeys/ibook.def
-share/hotkeys/itouch.def
-share/hotkeys/kb9930.def
-share/hotkeys/kb9963.def
-share/hotkeys/kbp8993.def
-share/hotkeys/logitech-cfo.def
-share/hotkeys/logitech-ultrax.def
-share/hotkeys/mck800.def
-share/hotkeys/msnatpro.def
-share/hotkeys/msnet.def
-share/hotkeys/msnetpro.def
-share/hotkeys/mx1998.def
-share/hotkeys/mx2500.def
-share/hotkeys/mx3000.def
-share/hotkeys/orktekusb.def
-share/hotkeys/pb5140w.def
-share/hotkeys/polypix.def
-share/hotkeys/sk2500.def
-share/hotkeys/sk2501a.def
-share/hotkeys/sk2505.def
-share/hotkeys/sk2800c.def
-share/hotkeys/sk7100.def
-share/hotkeys/sk9925.def
-@dirrm share/hotkeys
+${DATADIR}/splash.png
+${DATADIR}/acerwl.def
+${DATADIR}/btc9000.def
+${DATADIR}/eliteduo.def
+${DATADIR}/hp5181.def
+${DATADIR}/ibook.def
+${DATADIR}/itouch.def
+${DATADIR}/kb9930.def
+${DATADIR}/kb9963.def
+${DATADIR}/kbp8993.def
+${DATADIR}/logitech-cfo.def
+${DATADIR}/logitech-ultrax.def
+${DATADIR}/mck800.def
+${DATADIR}/msnatpro.def
+${DATADIR}/msnet.def
+${DATADIR}/msnetpro.def
+${DATADIR}/mx1998.def
+${DATADIR}/mx2500.def
+${DATADIR}/mx3000.def
+${DATADIR}/orktekusb.def
+${DATADIR}/pb5140w.def
+${DATADIR}/polypix.def
+${DATADIR}/sk2500.def
+${DATADIR}/sk2501a.def
+${DATADIR}/sk2505.def
+${DATADIR}/sk2800c.def
+${DATADIR}/sk7100.def
+${DATADIR}/sk9925.def
+@dirrm ${DATADIR}
--- patch ends here ---


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



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