summaryrefslogtreecommitdiff
path: root/editors/elvis
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2008-04-22 16:23:57 +0000
committerjlam <jlam@pkgsrc.org>2008-04-22 16:23:57 +0000
commit2bfc8c30004eb76e60138dfb6d7e7655855a54e8 (patch)
tree69219d41c20a99bd621ba995cedc85cd021cbb2f /editors/elvis
parentdd3ad3901fbe2b9675a1aca6f40f1ea8ab3236c1 (diff)
downloadpkgsrc-2bfc8c30004eb76e60138dfb6d7e7655855a54e8.tar.gz
Restructure the following packages:
editors/elvis editors/elvis-x11 The latter is now just editors/elvis built with a specific set of options. Changes include: + Add options.mk that supports a new "x11" option. + Remove Makefile.common and move all logic into elvis/Makefile and elvis/options.mk. + Rename PLIST.common to PLIST as there are no PLIST differences between elvis and elvis-x11. + Modify patch-ab to add a --sysconfdir option to the configure script and fix the parsing of --with-x* options so that --with-xft isn't ignored. + Modify patch-ac to handle SYSCONFDIR in Makefile.in passed in from the configure script. + Remove the unnecessary substitution for PKG_SYSCONFDIR now that the configure script and Makefile.in directly support --sysconfdir. + Include termcap.buildlink3.mk to properly deal with termcap/curses issues (elvis needs termcap). + Add full DESTDIR support. + Set HOMEPAGE to the correct URL. + Bump the PKGREVISION for elvis and elvis-x11 to 6. Both packages now track and use the same PKGREVISION number.
Diffstat (limited to 'editors/elvis')
-rw-r--r--editors/elvis/DESCR13
-rw-r--r--editors/elvis/Makefile44
-rw-r--r--editors/elvis/Makefile.common26
-rw-r--r--editors/elvis/PLIST (renamed from editors/elvis/PLIST.common)5
-rw-r--r--editors/elvis/distinfo6
-rw-r--r--editors/elvis/options.mk19
-rw-r--r--editors/elvis/patches/patch-ab93
-rw-r--r--editors/elvis/patches/patch-ac42
8 files changed, 178 insertions, 70 deletions
diff --git a/editors/elvis/DESCR b/editors/elvis/DESCR
index 3d507ca003d..d2a6f477399 100644
--- a/editors/elvis/DESCR
+++ b/editors/elvis/DESCR
@@ -1,8 +1,7 @@
-Elvis - written by Steve Kirkendall is a very powerful vi/ex clone providing
-a remarkable number of bells and whistles like:
+Elvis is a very powerful vi/ex clone providing a number of bells and
+whistles:
- * Syntax Highlighting.
- * Multiple files in multiple windows.
- * Browse modes for LaTeX (rather experimental), HTML and MAN pages.
- * Networking support (http and ftp).
- * GUI frontends for some of its platforms.
+ * Syntax Highlighting
+ * Multiple files in multiple windows
+ * Browse modes for LaTeX, HTML and man pages
+ * Networking support (HTTP and FTP)
diff --git a/editors/elvis/Makefile b/editors/elvis/Makefile
index 29bb750d265..4b656310c4a 100644
--- a/editors/elvis/Makefile
+++ b/editors/elvis/Makefile
@@ -1,14 +1,42 @@
-# $NetBSD: Makefile,v 1.4 2007/02/22 19:26:25 wiz Exp $
-#
+# $NetBSD: Makefile,v 1.5 2008/04/22 16:23:57 jlam Exp $
-.include "./Makefile.common"
+# This section contains variables that might be overridden.
+PKGNAME?= ${PKGNAME_BASE}
+COMMENT?= vi clone with regex-search, hex-edit, HTML/LaTeX preview
-PKGNAME= elvis-2.2.0
-PKGREVISION= 2
-COMMENT= Vi clone with regex search, hex editing, HTML and TeX previewing
+# Normal package Makefile contents follow.
+DISTNAME= elvis-2.2_0
+PKGNAME_BASE= ${DISTNAME:S/_/./}
+PKGREVISION= 6
+CATEGORIES= editors
+MASTER_SITES= ftp://ftp.cs.pdx.edu/pub/elvis/
-CONFLICTS+= elvis-x11[0-9]*
+CONFLICTS+= elvis-[0-9]*
+CONFLICTS+= elvis-x11-[0-9]*
-CONFIGURE_ARGS+= --with-x=no
+MAINTAINER= airhead@users.sourceforge.net
+HOMEPAGE= http://elvis.the-little-red-haired-girl.org/
+PKG_DESTDIR_SUPPORT= user-destdir
+
+.include "options.mk"
+
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS+= --verbose
+CONFIGURE_ARGS+= --prefix=${PREFIX:Q}
+CONFIGURE_ARGS+= --docdir=${PREFIX:Q}/share/doc/elvis
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
+
+PKG_SYSCONFSUBDIR?= elvis
+CONF_FILES= ${PREFIX}/share/elvis/elvis.rc \
+ ${PKG_SYSCONFDIR}/elvis.rc
+
+INSTALL_MAKE_FLAGS+= PREFIX=${DESTDIR}${PREFIX}
+INSTALL_MAKE_FLAGS+= BINDIR=${DESTDIR}${PREFIX}/bin
+INSTALL_MAKE_FLAGS+= DATADIR=${DESTDIR}${PREFIX}/share/elvis
+INSTALL_MAKE_FLAGS+= DOCDIR=${DESTDIR}${PREFIX}/share/doc/elvis
+
+INSTALLATION_DIRS= ${PKGMANDIR}/man1
+
+.include "../../mk/termcap.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/editors/elvis/Makefile.common b/editors/elvis/Makefile.common
deleted file mode 100644
index 70bfaac5d01..00000000000
--- a/editors/elvis/Makefile.common
+++ /dev/null
@@ -1,26 +0,0 @@
-# $NetBSD: Makefile.common,v 1.7 2005/12/29 06:21:38 jlam Exp $
-#
-
-DISTNAME= elvis-2.2_0
-CATEGORIES= editors
-MASTER_SITES= ftp://ftp.cs.pdx.edu/pub/elvis/
-
-MAINTAINER= airhead@users.sourceforge.net
-HOMEPAGE= http://elvis.vi-editor.org/
-
-PLIST_SRC= ${.CURDIR}/../elvis/PLIST.common
-PATCHDIR= ${.CURDIR}/../elvis/patches
-DISTINFO_FILE= ${.CURDIR}/../elvis/distinfo
-
-HAS_CONFIGURE= YES
-CONFIGURE_ARGS+= --prefix=${PREFIX:Q}
-CONFIGURE_ARGS+= --docdir=${PREFIX}/share/doc/elvis
-
-PKG_SYSCONFSUBDIR?= elvis
-CONF_FILES= ${PREFIX}/share/elvis/elvis.rc ${PKG_SYSCONFDIR}/elvis.rc
-
-SUBST_CLASSES+= sysconf
-SUBST_STAGE.sysconf= post-patch
-SUBST_FILES.sysconf= configure
-SUBST_FILES.sysconf+= Makefile.in
-SUBST_SED.sysconf= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g'
diff --git a/editors/elvis/PLIST.common b/editors/elvis/PLIST
index 91cfacbcee2..af8d652262f 100644
--- a/editors/elvis/PLIST.common
+++ b/editors/elvis/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST.common,v 1.3 2006/05/15 16:29:19 joerg Exp $
+@comment $NetBSD: PLIST,v 1.1 2008/04/22 16:23:57 jlam Exp $
bin/elvfmt
bin/elvis
bin/elvtags
@@ -7,8 +7,6 @@ man/man1/elvfmt.1
man/man1/elvis.1
man/man1/elvtags.1
man/man1/ref.1
-share/elvis/README
-share/elvis/README.etc
share/doc/elvis/bugs.txt
share/doc/elvis/ctags.man
share/doc/elvis/doexec.txt
@@ -38,6 +36,7 @@ share/doc/elvis/howto.html
share/doc/elvis/license.html
share/doc/elvis/printdoc.bat
share/doc/elvis/ref.man
+share/elvis/README
share/elvis/elvis.ali
share/elvis/elvis.arf
share/elvis/elvis.awf
diff --git a/editors/elvis/distinfo b/editors/elvis/distinfo
index a57b24902f0..d28dfb22c8b 100644
--- a/editors/elvis/distinfo
+++ b/editors/elvis/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.7 2006/06/26 10:21:55 rillig Exp $
+$NetBSD: distinfo,v 1.8 2008/04/22 16:23:57 jlam Exp $
SHA1 (elvis-2.2_0.tar.gz) = 8c16574b6d36529735b8ced70972ddaf6275a477
RMD160 (elvis-2.2_0.tar.gz) = 9867a3941a84a3db0bcfe4e36dd14132fbcf5805
Size (elvis-2.2_0.tar.gz) = 1439293 bytes
-SHA1 (patch-ab) = 3ded3089b617bccc3458e6c9101a339534fd3152
-SHA1 (patch-ac) = bbed33584e0301da4265727082336fb941e1638b
+SHA1 (patch-ab) = 285a3a5728a8f26af4741361b3d0bf159043c402
+SHA1 (patch-ac) = a866461c14dd7518f2ee5790a366a5eb7ffbee3c
SHA1 (patch-ad) = 702b08ec1182c3673721de62690a3a7c32983b8a
SHA1 (patch-ae) = 2a8eb92b44fa932fcc51e7af999f1363dd53ff74
diff --git a/editors/elvis/options.mk b/editors/elvis/options.mk
new file mode 100644
index 00000000000..4d93ff59cca
--- /dev/null
+++ b/editors/elvis/options.mk
@@ -0,0 +1,19 @@
+# $NetBSD: options.mk,v 1.1 2008/04/22 16:23:57 jlam Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.elvis
+PKG_SUPPORTED_OPTIONS= x11
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mx11)
+BUILDLINK_DEPMETHOD.libXt?= build
+. include "../../x11/libXft/buildlink3.mk"
+. include "../../x11/libXpm/buildlink3.mk"
+. include "../../x11/libXt/buildlink3.mk"
+CONFIGURE_ARGS+= --with-x
+CONFIGURE_ARGS+= --with-xft
+CONFIGURE_ARGS+= --x-includes=${X11BASE:Q}/include
+CONFIGURE_ARGS+= --x-libraries=${X11BASE:Q}/lib
+.else
+CONFIGURE_ARGS+= --without-x
+.endif
diff --git a/editors/elvis/patches/patch-ab b/editors/elvis/patches/patch-ab
index 6aeb6a6cc65..6292aeca1a1 100644
--- a/editors/elvis/patches/patch-ab
+++ b/editors/elvis/patches/patch-ab
@@ -1,8 +1,81 @@
-$NetBSD: patch-ab,v 1.2 2004/01/21 17:43:55 recht Exp $
+$NetBSD: patch-ab,v 1.3 2008/04/22 16:23:57 jlam Exp $
---- configure.orig 2003-10-21 04:32:25.000000000 +0200
-+++ configure 2004-01-21 18:22:46.000000000 +0100
-@@ -905,11 +905,8 @@
+--- configure.orig 2003-10-20 22:32:25.000000000 -0400
++++ configure
+@@ -27,6 +27,7 @@ GUI_GNOME=bug
+ # --bindir=DIR where to install the executables
+ # --datadir=DIR where to install the supporting data files
+ # --docdir=DIR where to install the :help files & other docs
++# --sysconfdir=DIR where to install the configuration files
+ # --prefix=DIR like --bindir=DIR/bin --datadir=DIR/lib/elvis
+ # --ioctl=VARIETY type of tty ioctl to use: termios, termio, sgtty
+ # --verbose explain each decision
+@@ -66,6 +67,7 @@ PREFIX=/usr
+ BINDIR='$(PREFIX)/bin'
+ DATADIR='$(PREFIX)/share/elvis/'
+ DOCDIR='$(PREFIX)/share/elvis/doc/'
++SYSCONFDIR='/etc/elvis'
+ SYS=""
+ DEFAULT_CC="cc -O"
+ IOCTL=""
+@@ -130,6 +132,7 @@ usage()
+ echo " --x-libraries=DIR add DIR to path for X-windows libraries"
+ echo " --bindir=DIR where to install the executables"
+ echo " --datadir=DIR where to install the supporting data files"
++ echo " --sysconfdir=DIR where to install the configuration files"
+ echo " --prefix=DIR like --bindir=DIR/bin --datadir=DIR/share/elvis"
+ echo " --libs=STRING non-X11 part of the LIBS= string in Makefile"
+ echo " --ioctl=VARIETY type of tty ioctl to use: termios, termio, or sgtty"
+@@ -157,14 +160,6 @@ do
+ GUI_GNOME=define
+ args="$args --with-gnome"
+ ;;
+- --with-x=no|--without-x)
+- GUI_X11=undef
+- args="$args --with-x=no"
+- ;;
+- --with-x*)
+- GUI_X11=define
+- args="$args --with-x"
+- ;;
+ --with-xft=no|--without-xft)
+ FEATURE_XFT=undef
+ args="$args --with-xft=no"
+@@ -173,6 +168,14 @@ do
+ FEATURE_XFT=define
+ args="$args --with-xft"
+ ;;
++ --with-x=no|--without-x)
++ GUI_X11=undef
++ args="$args --with-x=no"
++ ;;
++ --with-x*)
++ GUI_X11=define
++ args="$args --with-x"
++ ;;
+ --with-gcc=no|--without-gcc)
+ gnu=n
+ forcegcc=n
+@@ -203,6 +206,10 @@ do
+ DOCDIR=`echo "$i"|sed 's/^--docdir=//'`
+ args="$args $i"
+ ;;
++ --sysconfdir=*)
++ SYSCONFDIR=`echo "$i"|sed 's/^--sysconfdir=//'`
++ args="$args $i"
++ ;;
+ --prefix=*)
+ PREFIX=`echo "$i"|sed 's/^--prefix=//'`
+ args="$args $i"
+@@ -886,6 +893,7 @@ echo "Compiler: $CC"
+ echo "Bin dir: "`echo "$BINDIR" |sed s,'$(PREFIX)',"$PREFIX",`
+ echo "Data dir: "`echo "$DATADIR"|sed s,'$(PREFIX)',"$PREFIX",`
+ echo "Doc dir: "`echo "$DOCDIR" |sed s,'$(PREFIX)',"$PREFIX",`
++echo "Conf dir: "`echo "$SYSCONFDIR"|sed s,'$(PREFIX)',"$PREFIX",`
+ echo "Man dir: "`sh instman.sh -d -p"${PREFIX}"`
+ [ "$WHY" ] || echo "To see details, run \"configure --verbose\""
+
+@@ -905,11 +913,8 @@ if [ "$GUI_X11" = "define" ]
then
case "$FEATURE_XFT" in
define)
@@ -16,12 +89,20 @@ $NetBSD: patch-ab,v 1.2 2004/01/21 17:43:55 recht Exp $
;;
*)
xft=""
-@@ -950,7 +947,7 @@
+@@ -950,7 +955,7 @@ esac
# Generate the "config.h" file
-ELVISPATH=`echo "~/.elvis:/etc/elvis:$DATADIR:$DOCDIR" | sed s,'$(DATADIR)',"$DATADIR",g\;s,'$(PREFIX)',"$PREFIX",g`
-+ELVISPATH=`echo "~/.elvis:@PKG_SYSCONFDIR@:$DATADIR:$DOCDIR" | sed s,'$(DATADIR)',"$DATADIR",g\;s,'$(PREFIX)',"$PREFIX",g`
++ELVISPATH=`echo "~/.elvis:$SYSCONFDIR:$DATADIR:$DOCDIR" | sed s,'$(DATADIR)',"$DATADIR",g\;s,'$(PREFIX)',"$PREFIX",g`
cat >config.h <<eof-config
/* config.h */
+@@ -1200,6 +1205,7 @@ s!^PREFIX=.*!PREFIX=$PREFIX!
+ s!^BINDIR=.*!BINDIR=$BINDIR!
+ s!^DATADIR=.*!DATADIR=$DATADIR!
+ s!^DOCDIR=.*!DOCDIR=$DOCDIR!
++s!^SYSCONFDIR=.*!SYSCONFDIR=$SYSCONFDIR!
+ eof-all
+ if [ -d /usr/local/X11/include ]
+ then
diff --git a/editors/elvis/patches/patch-ac b/editors/elvis/patches/patch-ac
index b98d2a9f55f..8eba97c5bee 100644
--- a/editors/elvis/patches/patch-ac
+++ b/editors/elvis/patches/patch-ac
@@ -1,8 +1,20 @@
-$NetBSD: patch-ac,v 1.2 2006/05/15 16:29:19 joerg Exp $
+$NetBSD: patch-ac,v 1.3 2008/04/22 16:23:57 jlam Exp $
---- Makefile.in.orig 2003-10-21 02:32:25.000000000 +0000
+--- Makefile.in.orig 2003-10-20 22:32:25.000000000 -0400
+++ Makefile.in
-@@ -440,23 +440,24 @@ install.unix: $(ALL) doc/elvtags.man
+@@ -89,6 +89,11 @@ DATADIR=$(PREFIX)/share/elvis
+ DOCDIR= $(PREFIX)/share/elvis/doc
+
+ ################################################################################
++# This is the directory where "make install" will place the customized elvis
++# configuration files.
++SYSCONFDIR=/etc/elvis
++
++################################################################################
+ # This is the shell command for copying one file to another
+ CP=cp
+
+@@ -440,23 +445,16 @@ install.unix: $(ALL) doc/elvtags.man
(cd doc; for i in *.man; do sed 's/Elvis 2\.[0-9x][0-9a-z-]*/Elvis $(VERSION)/' $$i >$(DOCDIR)/$$i; done)
-(cd $(DATADIR); $(BINDIR)/elvtags -gitv stubs/*.c || ctags stubs/*.c)
chmod 0755 $(DATADIR)/*/. $(DATADIR) $(DOCDIR)
@@ -10,29 +22,25 @@ $NetBSD: patch-ac,v 1.2 2006/05/15 16:29:19 joerg Exp $
- -[ -d /etc/elvis ] || mkdir /etc/elvis
- -chmod 0755 /etc/elvis/
- -@ : >/etc/elvis/README && ( \
-+ ${BSD_INSTALL_MAN} doc/elvfmt.man ${PREFIX}/${PKGMANDIR}/man1/elvfmt.1
-+ ${BSD_INSTALL_MAN} doc/elvis.man ${PREFIX}/${PKGMANDIR}/man1/elvis.1
-+ ${BSD_INSTALL_MAN} doc/elvtags.man ${PREFIX}/${PKGMANDIR}/man1/elvtags.1
-+ ${BSD_INSTALL_MAN} doc/ref.man ${PREFIX}/${PKGMANDIR}/man1/ref.1
-+ -@ : >$(DATADIR)/README.etc && ( \
- echo "This directory contains system-dependent versions of elvis' configuration" \
- echo "files. The standard versions are available in $(DATADIR)" \
- echo "To customize any of these configuration files for this system," \
+- echo "This directory contains system-dependent versions of elvis' configuration" \
+- echo "files. The standard versions are available in $(DATADIR)" \
+- echo "To customize any of these configuration files for this system," \
- echo "first copy the standard version of the file into /etc/elvis and" \
-+ echo "first copy the standard version of the file into @PKG_SYSCONFDIR@ and" \
- echo "then edit the copy. Leave the standard version unchanged." \
+- echo "then edit the copy. Leave the standard version unchanged." \
- ) >>/etc/elvis/README
- -chmod 0644 /etc/elvis/README
-+ ) >>$(DATADIR)/README.etc
-+ -chmod 0644 $(DATADIR)/README.etc
++ ${BSD_INSTALL_MAN} doc/elvfmt.man $(PREFIX)/${PKGMANDIR}/man1/elvfmt.1
++ ${BSD_INSTALL_MAN} doc/elvis.man $(PREFIX)/${PKGMANDIR}/man1/elvis.1
++ ${BSD_INSTALL_MAN} doc/elvtags.man $(PREFIX)/${PKGMANDIR}/man1/elvtags.1
++ ${BSD_INSTALL_MAN} doc/ref.man $(PREFIX)/${PKGMANDIR}/man1/ref.1
@echo "This directory contains the standard versions of elvis' configuration" >$(DATADIR)/README
@echo "files. DO NOT MODIFY THESE FILES! To perform host-specific customization," >>$(DATADIR)/README
- @echo "copy files from this directory into /etc/elvis/, and then modify the copies." >>$(DATADIR)/README
-+ @echo "copy files from this directory into @PKG_SYSCONFDIR@/, and then modify the copies." >>$(DATADIR)/README
++ @echo "copy files from this directory into $(SYSCONFDIR)/, and then modify the copies." >>$(DATADIR)/README
@echo "To make user-specific changes, create a ~/.elvis/ directory (if it doesn't" >>$(DATADIR)/README
@echo "exist already) and copy files from this directory into ~/.elvis/ and then" >>$(DATADIR)/README
- @echo "modify the copies. Any file that elvis finds in ~/.elvis/ or /etc/elvis/" >>$(DATADIR)/README
-+ @echo "modify the copies. Any file that elvis finds in ~/.elvis/ or @PKG_SYSCONFDIR@/" >>$(DATADIR)/README
++ @echo "modify the copies. Any file that elvis finds in ~/.elvis/ or $(SYSCONFDIR)/" >>$(DATADIR)/README
@echo "overrides the similarly named file in this directory." >>$(DATADIR)/README
chmod 0644 $(DATADIR)/README