pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/plist * Creates a new variable PKGINFODIR (named si...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3e74287294e5
branches: trunk
changeset: 509941:3e74287294e5
user: jlam <jlam%pkgsrc.org@localhost>
date: Mon Mar 20 01:48:57 2006 +0000
description:
* Creates a new variable PKGINFODIR (named similarly to PKGMANDIR)
that is a purely user-settable variable to represent the relative
path under ${PREFIX} where info files are stored and "dir" files
are managed. PKGINFODIR defaults to "info". INFO_DIR still works,
but will be obsoleted after the 2006Q1 branch.
* Modify GNU_CONFIGURE_INFODIR to only honor ${PKGINFODIR} if the
package installs directly into ${PREFIX} and not some subdirectory
under ${PREFIX}. This fixes packages that don't really honor
$(infodir) all that well, and also avoids PLIST problems relating
to directory removal for those packages.
* Since the majority of Emacs Lisp packages use GNU_CONFIGURE, just
set GNU_CONFIGURE_INFODIR directly to ${EMACS_INFOPREFIX}, which is
the Emacs-distro-specific location for info files. Also pass
EMACS_INFOPREFIX through PLIST_SUBST for PLIST substitution.
* INFO_FILES should be defined if the package installs info files.
If the info files are not listed in the PLIST, then INFO_FILES
must list the filenames for the info files installed by the package,
which are assumed to be located in ${PREFIX}/${PKGINFODIR}.
* The plist module can now better detect info files listed in PLISTs
and exports a command to the pkginstall module to append info file
names to the +INFO_FILES scriptlet at install-time.
* The print-PLIST target is updated to properly list info files in
the auto-generated PLIST.
* The check-files code is updated to skip all "dir" Info database files.
diffstat:
doc/guide/files/fixes.xml | 64 ++++++++++++++++++++++---------------------
mk/bsd.pkg.check.mk | 6 ++--
mk/bsd.pkg.mk | 19 +++++++++---
mk/defaults/mk.conf | 5 ++-
mk/emacs.mk | 15 ++++++---
mk/install/bsd.pkginstall.mk | 33 +++++++++++++++------
mk/plist/plist-info.awk | 53 +++++++++++++++++------------------
mk/plist/plist.mk | 23 ++++++++++++---
mk/plist/print-plist.mk | 23 ++++++++-------
9 files changed, 143 insertions(+), 98 deletions(-)
diffs (truncated from 533 to 300 lines):
diff -r 8b5a7693f032 -r 3e74287294e5 doc/guide/files/fixes.xml
--- a/doc/guide/files/fixes.xml Sun Mar 19 23:58:14 2006 +0000
+++ b/doc/guide/files/fixes.xml Mon Mar 20 01:48:57 2006 +0000
@@ -1,4 +1,4 @@
-<!-- $NetBSD: fixes.xml,v 1.47 2006/03/12 11:34:09 rillig Exp $ -->
+<!-- $NetBSD: fixes.xml,v 1.48 2006/03/20 01:48:57 jlam Exp $ -->
<chapter id="fixes"> <?dbhtml filename="fixes.html"?>
<title>Making your package work</title>
@@ -1139,29 +1139,8 @@
<para>Some packages install info files or use the
<quote>makeinfo</quote> or <quote>install-info</quote>
- commands. Each of the info files:</para>
-
- <itemizedlist>
- <listitem>
- <para>is considered to be installed in the directory
- <filename>${PREFIX}/${INFO_DIR}</filename>,</para>
- </listitem>
-
- <listitem>
- <para>is registered in the Info directory file
- <filename>${PREFIX}/${INFO_DIR}/dir</filename>,</para>
- </listitem>
-
- <listitem>
- <para>and must be listed as a filename in the
- <varname>INFO_FILES</varname> variable in the package
- Makefile.</para>
- </listitem>
- </itemizedlist>
-
- <para><varname>INFO_DIR</varname> defaults to <quote>info</quote>
- and can be overridden in the package
- Makefile. <filename>INSTALL</filename> and
+ commands. <varname>INFO_FILES</varname> should be defined in
+ the package Makefile so that <filename>INSTALL</filename> and
<filename>DEINSTALL</filename> scripts will be generated to
handle registration of the info files in the Info directory
file. The <quote>install-info</quote> command used for the info
@@ -1169,9 +1148,34 @@
special purpose package automatically added as dependency if
needed.</para>
+ <para><varname>PKGINFODIR</varname> is the directory under
+ <filename>${PREFIX}</filename> where info files are primarily
+ located. <varname>PKGINFODIR</varname> defaults to
+ <quote>info</quote> and can be overridden by the user.
+
+ <para>There are two mutually exclusive ways to specify the info
+ files for the package:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>list each of info files in the package
+ <filename>PLIST</filename>; however any split info files
+ need not be listed, or</para>
+ </listitem>
+
+ <listitem>
+ <para>list the filename of each info file in the
+ <varname>INFO_FILES</varname> variable; however any split
+ info file filenames need not be listed. In this case
+ each of the info files should be installed into the
+ directory <filename>${PREFIX}/${PKGINFODIR}</filename>.
+ </listitem>
+
+ </itemizedlist>
+
<para>A package which needs the <quote>makeinfo</quote> command
- at build time must define the variable
- <varname>USE_MAKEINFO</varname> in its Makefile. If a minimum
+ at build time must add <quote>makeinfo</quote> to
+ <varname>USE_TOOLS</varname> in its Makefile. If a minimum
version of the <quote>makeinfo</quote> command is needed it
should be noted with the <varname>TEXINFO_REQD</varname>
variable in the package <filename>Makefile</filename>. By
@@ -1179,8 +1183,7 @@
does not provide a <command>makeinfo</command> command or if it
does not match the required minimum, a build dependency on the
<filename role="pkg">devel/gtexinfo</filename> package will
- be added automatically.
-</para>
+ be added automatically.</para>
<para>The build and installation process of the software provided
by the package should not use the
@@ -1197,9 +1200,8 @@
<para>The script overriding <command>install-info</command> has
no effect except the logging of a message. The script overriding
<command>makeinfo</command> logs a message and according to the
- value of <varname>USE_MAKEINFO</varname> and
- <varname>TEXINFO_REQD</varname> either run the appropriate
- <command>makeinfo</command> command or exit on error.</para>
+ value of <varname>TEXINFO_REQD</varname> either runs the appropriate
+ <command>makeinfo</command> command or exit on error.</para>
</sect2>
<sect2 id="manpages">
diff -r 8b5a7693f032 -r 3e74287294e5 mk/bsd.pkg.check.mk
--- a/mk/bsd.pkg.check.mk Sun Mar 19 23:58:14 2006 +0000
+++ b/mk/bsd.pkg.check.mk Mon Mar 20 01:48:57 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.check.mk,v 1.29 2006/02/23 14:38:07 tron Exp $
+# $NetBSD: bsd.pkg.check.mk,v 1.30 2006/03/20 01:48:57 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and defines the
# relevant variables and targets for the various install-time "check"
@@ -61,8 +61,8 @@
# handled by pkgsrc.
# Info index files updated when a new info file is added.
-.if defined(INFO_DIR)
-CHECK_FILES_SKIP+= ${PREFIX}/${INFO_DIR}/dir
+.if defined(INFO_FILES)
+CHECK_FILES_SKIP+= ${PREFIX}/.*/dir$$$$
.endif
# Perl's perllocal.pod index that is regenerated when a local module
diff -r 8b5a7693f032 -r 3e74287294e5 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Sun Mar 19 23:58:14 2006 +0000
+++ b/mk/bsd.pkg.mk Mon Mar 20 01:48:57 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1811 2006/03/17 08:02:41 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1812 2006/03/20 01:48:57 jlam Exp $
#
# This file is in the public domain.
#
@@ -581,10 +581,18 @@
CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM:Q}
. endif
+# Support for alternative info directories in packages is very sketchy.
+# For now, if we configure a package to install entirely into a
+# subdirectory of ${PREFIX}, then root the info directory directly under
+# that subdirectory.
+#
CONFIGURE_HAS_INFODIR?= yes
-GNU_CONFIGURE_INFODIR?= ${GNU_CONFIGURE_PREFIX}/${INFO_DIR}
-. if defined(INFO_FILES) && !empty(INFO_FILES) && \
- !empty(CONFIGURE_HAS_INFODIR:M[yY][eE][sS])
+.if ${GNU_CONFIGURE_PREFIX} == ${PREFIX}
+GNU_CONFIGURE_INFODIR?= ${GNU_CONFIGURE_PREFIX}/${PKGINFODIR}
+.else
+GNU_CONFIGURE_INFODIR?= ${GNU_CONFIGURE_PREFIX}/info
+.endif
+. if defined(INFO_FILES) && !empty(CONFIGURE_HAS_INFODIR:M[yY][eE][sS])
CONFIGURE_ARGS+= --infodir=${GNU_CONFIGURE_INFODIR:Q}
. endif
@@ -1839,7 +1847,7 @@
.endif
_PLIST_REGEXP.info= \
- ^${INFO_DIR}/[^/]*\.info(-[0-9]+)?(\.gz)$$
+ ^([^\/]*\/)*${PKGINFODIR}/[^/]*(\.info)?(-[0-9]+)?(\.gz)?$$
_PLIST_REGEXP.man= \
^([^/]*/)+(man[1-9ln]/[^/]*\.[1-9ln]|cat[1-9ln]/[^/]*\.[0-9])(\.gz)?$$
@@ -1968,6 +1976,7 @@
${ECHO_MSG} "${_PKGSRC_IN}> [Automatic manual page handling]"; \
${CAT} ${PLIST} | ${GREP} -v "^@" | \
${EGREP} ${_PLIST_REGEXP.man:Q} | ${_DOC_COMPRESS}
+ ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} install-script-data
.if empty(CHECK_FILES:M[nN][oO])
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} check-files-post
.endif
diff -r 8b5a7693f032 -r 3e74287294e5 mk/defaults/mk.conf
--- a/mk/defaults/mk.conf Sun Mar 19 23:58:14 2006 +0000
+++ b/mk/defaults/mk.conf Mon Mar 20 01:48:57 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.112 2006/03/09 20:44:45 tonio Exp $
+# $NetBSD: mk.conf,v 1.113 2006/03/20 01:48:58 jlam Exp $
#
# This file provides default values for variables that may be overridden
@@ -207,11 +207,14 @@
# Default: ${X11PREFIX} or where openmotif or lesstif is installed
INFO_DIR?= info
+PKGINFODIR?= ${INFO_DIR}
# Pathname relative to ${PREFIX} of directory holding the
# info files and the info "dir" (index) file.
# Possible: any path you like, e.g. share/info.
# Default: info (i.e. /usr/pkg/info)
# NOTE: the support for custom setting (not "info") is not complete.
+#
+# XXX INFO_DIR is obsolete and should be removed after pkgsrc-2006Q1.
PKGMANDIR?= man
# Pathname relative to ${PREFIX} of directory holding the
diff -r 8b5a7693f032 -r 3e74287294e5 mk/emacs.mk
--- a/mk/emacs.mk Sun Mar 19 23:58:14 2006 +0000
+++ b/mk/emacs.mk Mon Mar 20 01:48:57 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: emacs.mk,v 1.24 2006/03/11 06:23:20 uebayasi Exp $
+# $NetBSD: emacs.mk,v 1.25 2006/03/20 01:48:58 jlam Exp $
#
# This Makefile fragment handles Emacs Lisp Packages (== ELPs).
#
@@ -99,7 +99,7 @@
# installed into. Unlike EMACS_ETCPREFIX or
# EMACS_LISPPREFIX, subdirectory is not needed.
# Possible values:
-# ${PREFIX}/info
+# ${PREFIX}/${PKGINFODIR}
# ${PREFIX}/lib/xemacs/site-packages/info
#
# EMACS_LISPPREFIX
@@ -145,7 +145,7 @@
# Same as the one in Makefile, except that
# ${PREFIX} is omitted in PLIST.
# Possible values:
-# info
+# ${PKGINFODIR}
# lib/xemacs/site-packages/info
#
# EMACS_LISPPREFIX
@@ -299,15 +299,18 @@
EMACS_VERSION_MINOR= ${_EMACS_VERSION_MINOR}
.if ${EMACS_FLAVOR} == "emacs"
EMACS_ETCPREFIX= ${PREFIX}/share
-EMACS_INFOPREFIX= ${PREFIX}/info
+EMACS_INFOPREFIX= ${PREFIX}/${PKGINFODIR}
EMACS_LISPPREFIX= ${PREFIX}/share/emacs/site-lisp
EMACS_PKGNAME_PREFIX=
-.else
+.elif ${EMACS_FLAVOR} == "xemacs"
EMACS_ETCPREFIX= ${PREFIX}/lib/xemacs/site-packages/etc
EMACS_INFOPREFIX= ${PREFIX}/lib/xemacs/site-packages/info
EMACS_LISPPREFIX= ${PREFIX}/lib/xemacs/site-packages/lisp
EMACS_PKGNAME_PREFIX= xemacs-
+.else
+PKG_FAIL_REASON+= "\`\`${EMACS_FLAVOR}'' is not a valid EMACS_FLAVOR"
.endif
+GNU_CONFIGURE_INFODIR?= ${EMACS_INFOPREFIX}
_EMACS_FOR.emacs= "@comment "
_EMACS_FOR.emacs21= "@comment "
@@ -328,7 +331,9 @@
_EMACS_NOTFOR.${EMACS_FLAVOR}= "@comment "
_EMACS_NOTFOR.${_EMACS_TYPE}= "@comment "
+PLIST_SUBST+= EMACS_FLAVOR=${EMACS_FLAVOR:Q}
PLIST_SUBST+= EMACS_VERSION=${_EMACS_VERSION_NOREV:Q}
+PLIST_SUBST+= EMACS_INFOPREFIX=${EMACS_INFOPREFIX:C|^${PREFIX}/||}
PLIST_SUBST+= EMACS_LISPPREFIX=${EMACS_LISPPREFIX:C|^${PREFIX}/||}
PLIST_SUBST+= FOR_emacs=${_EMACS_FOR.emacs}
PLIST_SUBST+= FOR_emacs21=${_EMACS_FOR.emacs21}
diff -r 8b5a7693f032 -r 3e74287294e5 mk/install/bsd.pkginstall.mk
--- a/mk/install/bsd.pkginstall.mk Sun Mar 19 23:58:14 2006 +0000
+++ b/mk/install/bsd.pkginstall.mk Mon Mar 20 01:48:57 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.43 2006/03/17 18:22:30 jlam Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.44 2006/03/20 01:48:58 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and implements the
# common INSTALL/DEINSTALL scripts framework. To use the pkginstall
@@ -470,18 +470,12 @@
${TOUCH} ${TOUCH_ARGS} ${.TARGET}; \
fi
-# INFO_FILES contains names of info files that should be registered or
-# removed from the info directory indices. The listed info files
-# are assumed to be directly under ${INFO_DIR}.
-#
-INFO_FILES?= # empty
-
_INSTALL_INFO_FILES_FILE= ${_PKGINSTALL_DIR}/info-files
_INSTALL_INFO_FILES_DATAFILE= ${_PKGINSTALL_DIR}/info-files-data
_INSTALL_UNPACK_TMPL+= ${_INSTALL_INFO_FILES_FILE}
_INSTALL_DATA_TMPL+= ${_INSTALL_INFO_FILES_DATAFILE}
-.if !empty(INFO_FILES:M*)
+.if defined(INFO_FILES)
USE_TOOLS+= install-info:run
FILES_SUBST+= INSTALL_INFO=${INSTALL_INFO:Q}
.endif
@@ -495,7 +489,7 @@
exec 1>>${.TARGET}.tmp; \
while ${TEST} $$# -gt 0; do \
file="$$1"; shift; \
- file=${INFO_DIR:Q}"/$$file"; \
+ file=${PKGINFODIR:Q}"/$$file"; \
${ECHO} "# INFO: $$file"; \
done
${_PKG_SILENT}${_PKG_DEBUG}${MV} -f ${.TARGET}.tmp ${.TARGET}
@@ -505,11 +499,30 @@
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG} \
${SED} ${FILES_SUBST_SED} ../../mk/install/info-files > ${.TARGET}
+.if !defined(INFO_FILES)
${_PKG_SILENT}${_PKG_DEBUG} \
if ${_ZERO_FILESIZE_P} ${_INSTALL_INFO_FILES_DATAFILE}; then \
${RM} -f ${.TARGET}; \
${TOUCH} ${TOUCH_ARGS} ${.TARGET}; \
fi
+.endif
+
Home |
Main Index |
Thread Index |
Old Index