summaryrefslogtreecommitdiff
path: root/x11/xbindkeys
diff options
context:
space:
mode:
authorYing-Chieh Liao <ijliao@FreeBSD.org>2002-03-27 14:06:50 +0000
committerYing-Chieh Liao <ijliao@FreeBSD.org>2002-03-27 14:06:50 +0000
commit5098d66096e9e12c2ce3f6bfc563bcd147b92aef (patch)
treeb0448025778fb0a196fec1977c261db1afdb15c0 /x11/xbindkeys
parent- Add a new patch (diff)
* added knob WITH_GUI
* added scripts/post-install * bumped PORTREVISION, because xbindkeys_show does not work prior to these changes PR: 36366 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=56740
Diffstat (limited to 'x11/xbindkeys')
-rw-r--r--x11/xbindkeys/Makefile17
-rw-r--r--x11/xbindkeys/pkg-plist2
-rw-r--r--x11/xbindkeys/scripts/post-install9
3 files changed, 27 insertions, 1 deletions
diff --git a/x11/xbindkeys/Makefile b/x11/xbindkeys/Makefile
index 84e0ec2c71cc..a0e7011aa31a 100644
--- a/x11/xbindkeys/Makefile
+++ b/x11/xbindkeys/Makefile
@@ -8,17 +8,34 @@
PORTNAME= xbindkeys
PORTVERSION= 1.4.1
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= http://hocwp.free.fr/xbindkeys/
MAINTAINER= obraun@informatik.unibw-muenchen.de
+INSTALL_TARGET= install-binPROGRAMS install-man
+
+.if defined(WITH_GUI)
+RUN_DEPENDS= wish:${PORTSDIR}/x11-toolkits/tk83
+PLIST_SUB+= WITH_GUI=""
+.else
+PLIST_SUB+= WITH_GUI="@comment "
+.endif
+
USE_XLIB= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="${CXXFLAGS} -I${X11BASE}/include"
MAN1= xbindkeys.1 xbindkeys_show.1
+pre-fetch:
+.if !defined(WITH_GUI)
+ @${ECHO} ""
+ @${ECHO} " Define WITH_GUI to install xbindkeys_show (requires Tk)"
+ @${ECHO} ""
+.endif
+
.if !defined(NOPORTDOCS)
post-install:
@${MKDIR} ${EXAMPLESDIR}
diff --git a/x11/xbindkeys/pkg-plist b/x11/xbindkeys/pkg-plist
index fe96f8e1ef9d..0553710eeeae 100644
--- a/x11/xbindkeys/pkg-plist
+++ b/x11/xbindkeys/pkg-plist
@@ -1,4 +1,4 @@
bin/xbindkeys
-bin/xbindkeys_show
+%%WITH_GUI%%bin/xbindkeys_show
%%PORTDOCS%%share/examples/xbindkeys/xbindkeysrc
%%PORTDOCS%%@dirrm share/examples/xbindkeys
diff --git a/x11/xbindkeys/scripts/post-install b/x11/xbindkeys/scripts/post-install
new file mode 100644
index 000000000000..7b1650fba88a
--- /dev/null
+++ b/x11/xbindkeys/scripts/post-install
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ ${WITH_GUI} ]
+then
+ WISHPROGNAME=`ls $(echo $PATH | sed 's/:/ /g') 2> /dev/null | egrep '^wish(step)?(x|([0-9]+\.[0-9]+))([a-z][a-z])?$' | head -1`
+ sed -e "s/wish/${WISHPROGNAME}/" < ${WRKSRC}/xbindkeys_show > ${WRKSRC}/xbindkeys_show.fix
+ chmod a+x ${WRKSRC}/xbindkeys_show.fix
+ cp -p ${WRKSRC}/xbindkeys_show.fix ${PREFIX}/bin/xbindkeys_show
+fi