From 6bd0765af7e172f63338e1591991ae18424e7d39 Mon Sep 17 00:00:00 2001 From: jlam Date: Tue, 14 Mar 2006 01:14:26 +0000 Subject: Modify the pkginstall framework so that it manages all aspects of INSTALL/DEINSTALL script creation within pkgsrc. If an INSTALL or DEINSTALL script is found in the package directory, it is automatically used as a template for the pkginstall-generated scripts. If instead, they should be used simply as the full scripts, then the package Makefile should set INSTALL_SRC or DEINSTALL_SRC explicitly, e.g.: INSTALL_SRC= ${PKGDIR}/INSTALL DEINSTALL_SRC= # emtpy As part of the restructuring of the pkginstall framework internals, we now *always* generate temporary INSTALL or DEINSTALL scripts. By comparing these temporary scripts with minimal INSTALL/DEINSTALL scripts formed from only the base templates, we determine whether or not the INSTALL/DEINSTALL scripts are actually needed by the package (see the generate-install-scripts target in bsd.pkginstall.mk). In addition, more variables in the framework have been made private. The *_EXTRA_TMPL variables have been renamed to *_TEMPLATE, which are more sensible names given the very few exported variables in this framework. The only public variables relating to the templates are: INSTALL_SRC INSTALL_TEMPLATE DEINSTALL_SRC DEINSTALL_TEMPLATE HEADER_TEMPLATE The packages in pkgsrc have been modified to reflect the changes in the pkginstall framework. --- lang/perl5/buildlink3.mk | 4 ++-- lang/perl5/packlist.mk | 6 +++--- lang/ruby18-base/Makefile | 5 +---- lang/sun-jre15/Makefile | 8 ++++---- 4 files changed, 10 insertions(+), 13 deletions(-) (limited to 'lang') diff --git a/lang/perl5/buildlink3.mk b/lang/perl5/buildlink3.mk index 312746f115c..f6228f56598 100644 --- a/lang/perl5/buildlink3.mk +++ b/lang/perl5/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.29 2005/12/29 06:21:46 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.30 2006/03/14 01:14:29 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ PERL5_BUILDLINK3_MK:= ${PERL5_BUILDLINK3_MK}+ @@ -21,7 +21,7 @@ BUILDLINK_PKGSRCDIR.perl?= ../../lang/perl5 PERL5_OPTIONS?= # empty . if !empty(PERL5_OPTIONS:Mthreads) -INSTALL_EXTRA_TMPL+= ${.CURDIR}/../../lang/perl5/files/install_threads.tmpl +INSTALL_TEMPLATE+= ${.CURDIR}/../../lang/perl5/files/install_threads.tmpl . endif . if ${PKG_INSTALLATION_TYPE} == "overwrite" diff --git a/lang/perl5/packlist.mk b/lang/perl5/packlist.mk index 25d3c728a9b..7a523d1f7a7 100644 --- a/lang/perl5/packlist.mk +++ b/lang/perl5/packlist.mk @@ -1,4 +1,4 @@ -# $NetBSD: packlist.mk,v 1.3 2005/12/29 06:21:47 jlam Exp $ +# $NetBSD: packlist.mk,v 1.4 2006/03/14 01:14:29 jlam Exp $ # # This Makefile fragment is intended to be included by packages that # create packlist files. This file is automatically included by @@ -30,8 +30,8 @@ _PERL5_PACKLIST= ${PERL5_PACKLIST:S/^/${PERL5_PACKLIST_DIR}\//} ### INSTALL/DEINSTALL scripts to manage symlinks ### -INSTALL_EXTRA_TMPL+= ${.CURDIR}/../../lang/perl5/files/install.tmpl -DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/../../lang/perl5/files/deinstall.tmpl +INSTALL_TEMPLATE+= ${.CURDIR}/../../lang/perl5/files/install.tmpl +DEINSTALL_TEMPLATE+= ${.CURDIR}/../../lang/perl5/files/deinstall.tmpl FILES_SUBST+= PERL5_COMMENT= FILES_SUBST+= PERL5_PACKLIST=${_PERL5_PACKLIST:Q} diff --git a/lang/ruby18-base/Makefile b/lang/ruby18-base/Makefile index bfda3f315a1..d7372e393f5 100644 --- a/lang/ruby18-base/Makefile +++ b/lang/ruby18-base/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2006/01/03 14:37:24 taca Exp $ +# $NetBSD: Makefile,v 1.18 2006/03/14 01:14:29 jlam Exp $ # DISTNAME= ${RUBY_DISTNAME} @@ -28,9 +28,6 @@ CONFIGURE_ENV+= PREFIX=${PREFIX:Q} INSTALL_TARGET= install install-doc WRKSRC= ${RUBY_WRKSRC} -DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/DEINSTALL -INSTALL_EXTRA_TMPL+= ${.CURDIR}/INSTALL - # Ruby build process depends on config.status's content CONFIG_STATUS_OVERRIDE= # empty diff --git a/lang/sun-jre15/Makefile b/lang/sun-jre15/Makefile index ce5cb579cb4..758bc943554 100644 --- a/lang/sun-jre15/Makefile +++ b/lang/sun-jre15/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.28 2006/02/05 23:09:52 joerg Exp $ +# $NetBSD: Makefile,v 1.29 2006/03/14 01:14:29 jlam Exp $ # Note: Regen distinfo with PKG_DEFAULT_OPTIONS+=sun-jre-jce @@ -29,9 +29,9 @@ PKG_SUPPORTED_OPTIONS= sun-jre-jce .include "../../mk/bsd.options.mk" -HEADER_EXTRA_TMPL= ${WRKDIR}/HEADER.tmpl -INSTALL_EXTRA_TMPL= ${PKGDIR}/INSTALL.tmpl -DEINSTALL_EXTRA_TMPL= ${PKGDIR}/DEINSTALL.tmpl +HEADER_TEMPLATE+= ${WRKDIR}/HEADER.tmpl +INSTALL_TEMPLATE+= ${PKGDIR}/INSTALL.tmpl +DEINSTALL_TEMPLATE+= ${PKGDIR}/DEINSTALL.tmpl FILES_SUBST+= JAVA_HOME=${JAVA_HOME:Q} FILES_SUBST+= MACHINE_ARCH=${MACHINE_ARCH:Q} -- cgit v1.2.3