pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/autoswc Reimport of autoswc, version 1.0, com...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7c16e231de22
branches: trunk
changeset: 469296:7c16e231de22
user: jmmv <jmmv%pkgsrc.org@localhost>
date: Sat Feb 21 23:28:32 2004 +0000
description:
Reimport of autoswc, version 1.0, coming from sysutils:
autoswc is an utility that automatically generates system wide cache files
for use with configure scripts created by GNU autoconf, and specially by
those executed within pkgsrc.
Reason for the move: pkgtools' Makefile says this category is for packages
used within pkgsrc. autoswc is specially designed to work for pkgsrc, so
it is better placed here. And it may get more exposure ;-)
diffstat:
pkgtools/autoswc/DESCR | 3 +
pkgtools/autoswc/Makefile | 72 ++++++++++
pkgtools/autoswc/PLIST | 7 +
pkgtools/autoswc/files/autoswc.8 | 130 ++++++++++++++++++
pkgtools/autoswc/files/autoswc.mk | 50 +++++++
pkgtools/autoswc/files/autoswc.sh | 209 +++++++++++++++++++++++++++++
pkgtools/autoswc/files/config.site | 41 +++++
pkgtools/autoswc/files/configure.ac | 253 ++++++++++++++++++++++++++++++++++++
8 files changed, 765 insertions(+), 0 deletions(-)
diffs (truncated from 797 to 300 lines):
diff -r 4f4f7cf1dce0 -r 7c16e231de22 pkgtools/autoswc/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/autoswc/DESCR Sat Feb 21 23:28:32 2004 +0000
@@ -0,0 +1,3 @@
+autoswc is an utility that automatically generates system wide cache files
+for use with configure scripts created by GNU autoconf, and specially by
+those executed within pkgsrc.
diff -r 4f4f7cf1dce0 -r 7c16e231de22 pkgtools/autoswc/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/autoswc/Makefile Sat Feb 21 23:28:32 2004 +0000
@@ -0,0 +1,72 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/02/21 23:28:32 jmmv Exp $
+
+DISTNAME= autoswc-1.0
+CATEGORIES= sysutils
+MASTER_SITES= # empty
+DISTFILES= # empty
+
+MAINTAINER= jmmv%NetBSD.org@localhost
+COMMENT= Generates system wide cache files for GNU autoconf
+
+DEPENDS= autoconf>=2.59:../../devel/autoconf
+DEPENDS+= automake>=1.8.2:../../devel/automake
+DEPENDS+= libtool-base>=1.5.2:../../devel/libtool-base
+
+NO_BUILDLINK= YES
+NO_CHECKSUM= YES
+NO_CONFIGURE= YES
+NO_MTREE= YES
+USE_PKGINSTALL= YES
+WRKSRC= ${WRKDIR}
+
+PKG_SYSCONFSUBDIR= autoswc
+CACHEDIR= /var/db/autoswc
+MKCONF= /etc/mk.conf
+OWN_DIRS= ${CACHEDIR}
+
+EVAL_PREFIX+= PREFIX.autoconf=autoconf
+PREFIX.autoconf_DEFAULT= ${LOCALBASE}
+EVAL_PREFIX+= PREFIX.automake=automake
+PREFIX.automake_DEFAULT= ${LOCALBASE}
+EVAL_PREFIX+= PREFIX.libtool=libtool
+PREFIX.libtool_DEFAULT= ${LOCALBASE}
+
+SUBST_CLASSES+= build
+SUBST_MESSAGE.build= "Building autoswc."
+SUBST_STAGE.build= do-build
+SUBST_FILES.build= autoswc
+SUBST_FILES.build+= autoswc.8
+SUBST_FILES.build+= autoswc.mk
+SUBST_FILES.build+= config.site
+SUBST_SED.build= -e 's|@ACLOCAL@|${PREFIX.automake}/bin/aclocal|g'
+SUBST_SED.build+= -e 's|@AUTOCONF@|${PREFIX.autoconf}/bin/autoconf|g'
+SUBST_SED.build+= -e 's|@AUTOMAKE@|${PREFIX.automake}/bin/automake|g'
+SUBST_SED.build+= -e 's|@CACHEDIR@|${CACHEDIR}|g'
+SUBST_SED.build+= -e 's|@LIBTOOLIZE@|${PREFIX.libtool}/bin/libtoolize|g'
+SUBST_SED.build+= -e 's|@MAKE@|${MAKE}|g'
+SUBST_SED.build+= -e 's|@MKCONF@|${MKCONF}|g'
+SUBST_SED.build+= -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_SED.build+= -e 's|@SH@|${SH}|g'
+SUBST_SED.build+= -e 's|@SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
+
+INSTALL_DIRS= man/man8 sbin
+
+do-extract:
+ ${CP} ${FILESDIR}/autoswc.8 ${WRKSRC}
+ ${CP} ${FILESDIR}/autoswc.mk ${WRKSRC}
+ ${CP} ${FILESDIR}/autoswc.sh ${WRKSRC}/autoswc
+ ${CP} ${FILESDIR}/config.site ${WRKSRC}
+
+do-build:
+ @${DO_NADA}
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/autoswc ${PREFIX}/sbin
+ ${INSTALL_DATA} ${WRKSRC}/autoswc.8 ${PREFIX}/man/man8
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/autoswc
+ ${INSTALL_DATA} ${WRKSRC}/autoswc.mk ${PREFIX}/share/autoswc
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/autoswc
+ ${INSTALL_DATA} ${WRKSRC}/config.site ${PREFIX}/share/autoswc
+ ${INSTALL_DATA} ${FILESDIR}/configure.ac ${PREFIX}/share/autoswc
+
+.include "../../mk/bsd.pkg.mk"
diff -r 4f4f7cf1dce0 -r 7c16e231de22 pkgtools/autoswc/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/autoswc/PLIST Sat Feb 21 23:28:32 2004 +0000
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/02/21 23:28:32 jmmv Exp $
+man/man8/autoswc.8
+sbin/autoswc
+share/autoswc/autoswc.mk
+share/autoswc/config.site
+share/autoswc/configure.ac
+@dirrm share/autoswc
diff -r 4f4f7cf1dce0 -r 7c16e231de22 pkgtools/autoswc/files/autoswc.8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/autoswc/files/autoswc.8 Sat Feb 21 23:28:32 2004 +0000
@@ -0,0 +1,130 @@
+.\" $NetBSD: autoswc.8,v 1.1.1.1 2004/02/21 23:28:36 jmmv Exp $
+.\"
+.\" autoswc - Generates system wide cache files for GNU autoconf
+.\" Copyright (c) 2004 Julio M. Merino Vidal <jmmv%NetBSD.org@localhost>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Neither the name of The NetBSD Foundation nor the names of its
+.\" contributors may be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
+.\" 3. Neither the name of author nor the names of its contributors may
+.\" be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd February 21, 2004
+.Dt AUTOSWC 8
+.Os
+.Sh NAME
+.Nm autoswc
+.Nd generates system wide cache files for GNU autoconf
+.Sh SYNOPSIS
+.Nm
+.Op Fl c Ar ac_file
+.Op Fl n Ar cache_name
+.Sh DESCRIPTION
+.Nm
+is an utility that automatically generates system wide cache files for use
+with configure scripts created by
+.Nm GNU autoconf ,
+and specially by those executed within
+.Nm pkgsrc .
+.Pp
+.Nm
+starts by reading the configuration script template.
+It will use
+.Pa @SYSCONFDIR@/configure.ac
+if found, or fallback to
+.Pa @PREFIX@/share/autoswc/configure.ac
+otherwise (a custom file may be given using the
+.Fl c
+flag, though).
+This issues all checks that the user wants to store in the system wide
+cache file, and are basically calls to standard
+.Nm GNU autoconf ,
+.Nm GNU automake
+and/or
+.Nm GNU libtool
+macros.
+There is no need to manually execute any of the
+.Sq AC_INIT ,
+.Sq AM_INIT_AUTOMAKE ,
+.Sq AC_CACHE_SAVE
+and
+.Sq AC_OUTPUT
+macros, as they are automatically inserted in the right place during
+execution.
+.Pp
+The default cache file is stored inside the
+.Pa @CACHEDIR@
+directory, using
+.Pa config.cache.default
+as the file name.
+The
+.Sq default
+part can be changed using the
+.Fl n
+flag, which takes the base name of the cache file.
+.Pp
+To tell
+.Nm pkgsrc
+to use the system wide cache, all you need to do is append the following
+line to your
+.Pa @MKCONF@
+file:
+.Bd -literal -offset indent
+\&.sinclude "@PREFIX@/share/autoswc/autoswc.mk"
+.Ed
+.Pp
+In case you used the
+.Fl n
+flag, you also need to define the
+.Va AUTOSWC_CACHE_NAME
+variable in this file, setting it to the value passed to the flag.
+.Sh NOTES
+Be very careful about what you add to
+.Pa configure.ac .
+You should only check for things that are unlikely to change over time,
+as functions in the
+.Lb libc
+and its header files.
+Failure to do so can easily lead to cache files that get outdated very
+easily during installation of new packages, and cause unexpected
+configuration errors.
+.Pp
+It is recommended that you rebuild the cache file periodically.
+You can configure a simple
+.Xr cron 8
+job to it, which just needs to launch this utility.
+.Pp
+If you hit a compilation problem in any package when using
+.Nm ,
+be
+.Em absolutely
+sure it is not beeing caused by an outdated cache before reporting
+problems.
+The safest and easiest way to do this is to clean the package in question
+and restart the build with the
+.Va AUTOSWC_DISABLE
+variable set, like in the following example:
+.Bd -literal -offset indent
+$ @MAKE@ clean
+$ @MAKE@ AUTOSWC_DISABLE=YES
+.Ed
+.Sh AUTHORS
+.An Julio M. Merino Vidal Aq jmmv%netbsd.org@localhost
diff -r 4f4f7cf1dce0 -r 7c16e231de22 pkgtools/autoswc/files/autoswc.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/autoswc/files/autoswc.mk Sat Feb 21 23:28:32 2004 +0000
@@ -0,0 +1,50 @@
+# $NetBSD: autoswc.mk,v 1.1.1.1 2004/02/21 23:28:36 jmmv Exp $
+#
+# autoswc - Generates system wide cache files for GNU autoconf
+# Copyright (c) 2004 Julio M. Merino Vidal <jmmv%NetBSD.org@localhost>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of author nor the names of its contributors may
+# be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+.if !defined(AUTOSWC_MK)
+AUTOSWC_MK= # defined
+
+. if !defined(AUTOSWC_DISABLE)
+AUTOSWC_CACHE_FILE?= @CACHEDIR@/config.cache.${AUTOSWC_CACHE_NAME}
+AUTOSWC_CACHE_NAME?= default
+
+. if exists(@SYSCONFDIR@/config.site)
+AUTOSWC_CONFIG_SITE?= @SYSCONFDIR@/config.site
+. else
+AUTOSWC_CONFIG_SITE?= @PREFIX@/share/autoswc/config.site
+. endif
+
+CONFIGURE_ENV+= AUTOSWC_CACHE_FILE="${AUTOSWC_CACHE_FILE}"
+CONFIGURE_ENV+= AUTOSWC_CACHE_NAME="${AUTOSWC_CACHE_NAME}"
+CONFIGURE_ENV+= CONFIG_SITE="${AUTOSWC_CONFIG_SITE}"
+. endif
+
+.endif # AUTOSWC_MK
diff -r 4f4f7cf1dce0 -r 7c16e231de22 pkgtools/autoswc/files/autoswc.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/autoswc/files/autoswc.sh Sat Feb 21 23:28:32 2004 +0000
@@ -0,0 +1,209 @@
+#!@SH@
+#
+# $NetBSD: autoswc.sh,v 1.1.1.1 2004/02/21 23:28:36 jmmv Exp $
+#
+# autoswc - Generates system wide cache files for GNU autoconf
+# Copyright (c) 2004 Julio M. Merino Vidal <jmmv%NetBSD.org@localhost>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
Home |
Main Index |
Thread Index |
Old Index