aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel/cscope/Makefile25
-rw-r--r--devel/cscope/pkg-plist6
2 files changed, 28 insertions, 3 deletions
diff --git a/devel/cscope/Makefile b/devel/cscope/Makefile
index 850d6afb7164..131453378526 100644
--- a/devel/cscope/Makefile
+++ b/devel/cscope/Makefile
@@ -14,11 +14,30 @@ MASTER_SITES= SF
MAINTAINER= gahr@FreeBSD.org
COMMENT= An interactive C program browser
+OPTIONS= XCSCOPE "Install (X)Emacs package" off
+
USE_BZIP2= yes
GNU_CONFIGURE= yes
-PLIST_FILES= bin/cscope \
- bin/ocs
+EMACSLISPDIR= ${PREFIX}/share/emacs/site-lisp
+XEMACSLISPDIR= ${PREFIX}/lib/xemacs/site-lisp
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_XCSCOPE)
+PLIST_SUB+= XCSCOPE=""
+.else
+PLIST_SUB+= XCSCOPE="@comment "
+.endif
+
MAN1= cscope.1
-.include <bsd.port.mk>
+.if defined(WITH_XCSCOPE)
+post-install:
+ ${MKDIR} ${EMACSLISPDIR}
+ ${INSTALL_DATA} ${WRKSRC}/contrib/xcscope/xcscope.el ${EMACSLISPDIR}/
+ ${MKDIR} ${XEMACSLISPDIR}
+ ${LN} -sf ${EMACSLISPDIR}/xcscope.el ${XEMACSLISPDIR}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/cscope/pkg-plist b/devel/cscope/pkg-plist
new file mode 100644
index 000000000000..a76e07539201
--- /dev/null
+++ b/devel/cscope/pkg-plist
@@ -0,0 +1,6 @@
+bin/cscope
+bin/ocs
+%%XCSCOPE%%share/emacs/site-lisp/xcscope.el
+%%XCSCOPE%%lib/xemacs/site-lisp/xcscope.el
+%%XCSCOPE%%@dirrmtry lib/xemacs/site-lisp
+%%XCSCOPE%%@dirrmtry lib/xemacs