Subject: pkg/29979: cannot determine config directory for vim from another package (inc patch)
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Iain Hibbert <plunky@rya-online.net>
List: pkgsrc-bugs
Date: 04/15/2005 18:12:00
>Number: 29979
>Category: pkg
>Synopsis: cannot determine config directory for vim from another package (inc patch)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Apr 15 18:12:00 +0000 2005
>Originator: Iain Hibbert
>Release: NetBSD 2.0
>Organization:
none
>Environment:
System: NetBSD galant 2.0 NetBSD 2.0 (GALANT) #12: Tue Mar 15 22:08:38 GMT 2005 plunky@galant:/home/plunky/src/sys/arch/i386/compile/GALANT i386
Architecture: i386
Machine: i386
>Description:
I have a package mostly written that depends on vim to view/edit some
preferences files in a fancy manner. The author of the software has created
vim syntax/plugin files to make it all look very nice, but I cannot install
the files in an extendable way because vim config files are in a subdirectory
named as to the version (eg ${PREFIX}/share/vim/vim63/.. for vim 6.3) and this
subdir name is not easily extracted from the package (it is hardcoded and will
presumably change for each version of vim)
>How-To-Repeat:
yes
>Fix:
My idea is to have an extra file editors/vim-share/version.mk containing
the vim version specific information but no package building commands that would
be included where appropriate, and could be included from other packages that
wished to install a vim plugin/syntax file to the correct place. This following
patch to be applied in the editors/vim-share directory will make such a system:
--- version.mk.orig 2005-03-11 20:46:48.000000000 +0000
+++ version.mk 2005-04-14 22:07:57.000000000 +0100
@@ -0,0 +1,5 @@
+# $NetBSD:$
+
+VIM_VERSION= 6.3
+VIM_PATCHLEVEL= 068
+VIM_SUBDIR= vim63
--- Makefile.orig 2005-04-14 22:06:00.000000000 +0100
+++ Makefile 2005-04-14 22:08:45.000000000 +0100
@@ -10,7 +10,7 @@
INSTALL_TARGET= installruntime installmacros installtutor installtools
-PLIST_SUBST+= VIM_SUBDIR="vim63"
+PLIST_SUBST+= VIM_SUBDIR="${VIM_SUBDIR}"
do-build:
@cd ${WRKSRC}/xxd && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS}
--- Makefile.common.orig 2005-04-14 22:06:06.000000000 +0100
+++ Makefile.common 2005-04-14 22:17:57.000000000 +0100
@@ -1,7 +1,7 @@
# $NetBSD: Makefile.common,v 1.44 2005/04/11 21:45:42 tv Exp $
-VIM_VERSION= 6.3
-VIM_PATCHLEVEL= 068
+.include "../../editors/vim-share/version.mk"
+
DISTNAME= vim-${VIM_VERSION}
CATEGORIES= editors
MASTER_SITES= ftp://ftp.vim.org/pub/editors/vim/unix/ \
@@ -26,7 +26,7 @@
CONFLICTS+= vim-kde-[0-9]*
-WRKSRC= ${WRKDIR}/vim63/src
+WRKSRC= ${WRKDIR}/${VIM_SUBDIR}/src
GNU_CONFIGURE= yes
# See "configure --help" extra options. These might affect the installed
@@ -34,9 +34,9 @@
CONFIGURE_ARGS+= ${VIM_EXTRA_OPTS}
CONFIGURE_ARGS+= --enable-multibyte
-PATCH_ARGS= -d ${WRKDIR}/vim63 --forward --quiet \
+PATCH_ARGS= -d ${WRKDIR}/${VIM_SUBDIR} --forward --quiet \
-E ${PATCH_STRIP}
-PATCH_DIST_ARGS= -d ${WRKDIR}/vim63 --forward --quiet \
+PATCH_DIST_ARGS= -d ${WRKDIR}/${VIM_SUBDIR} --forward --quiet \
-E ${PATCH_DIST_STRIP}
PATCHDIR?= ${.CURDIR}/../../editors/vim-share/patches
DISTINFO_FILE?= ${.CURDIR}/../../editors/vim-share/distinfo
>Unformatted:
(pkgsrc snapshot as of 14 April)