From 1c17beb762fea236d447a1341b66de6a9ae4f75f Mon Sep 17 00:00:00 2001 From: Steve Wills Date: Mon, 5 Dec 2011 03:23:43 +0000 Subject: [PATCH] - Add patch to support using PACKAGEROOT instead of PACKAGESITE PR: ports/156629 Submitted by: "Douglas K. Rand" Feature safe: yes --- sysutils/puppet/Makefile | 11 ++++++++++- sysutils/puppet/files/optpatch-package_root | 11 +++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 sysutils/puppet/files/optpatch-package_root diff --git a/sysutils/puppet/Makefile b/sysutils/puppet/Makefile index 4f213907569b..32df5ac457f1 100644 --- a/sysutils/puppet/Makefile +++ b/sysutils/puppet/Makefile @@ -50,7 +50,8 @@ MAN8= filebucket.8 pi.8 puppet.8 puppetca.8 puppetd.8 \ puppet-secret_agent.8 puppet-status.8 OPTIONS= MONGREL "Run puppet server as a mongrel service" Off \ - PACKAGE_ORIGIN "Use port origin as package name" On + PACKAGE_ORIGIN "Use port origin as package name" On \ + PACKAGE_ROOT "Use PACKAGEROOT insted of PACKAGESITE" Off .include @@ -63,6 +64,14 @@ EXTRA_PATCHES+= ${FILESDIR}/optpatch-package_origin RUN_DEPENDS+= rubygem-bzip2>=0:${PORTSDIR}/archivers/rubygem-bzip2 .endif +.if defined(WITH_PACKAGE_ROOT) +.if !defined(WITH_PACKAGE_ORIGIN) +EXTRA_PATCHES+= ${FILESDIR}/optpatch-package_root +.else +BROKEN= "PACKAGE_ROOT option patch is incompatable with PACKAGE_ORIGIN patch." +.endif +.endif + .include post-patch: diff --git a/sysutils/puppet/files/optpatch-package_root b/sysutils/puppet/files/optpatch-package_root new file mode 100644 index 000000000000..cbab8d58cf9d --- /dev/null +++ b/sysutils/puppet/files/optpatch-package_root @@ -0,0 +1,11 @@ +--- lib/puppet/provider/package/freebsd.rb-orig 2011-04-21 19:36:17.000000000 -0500 ++++ lib/puppet/provider/package/freebsd.rb 2011-04-21 20:09:50.000000000 -0500 +@@ -20,7 +20,7 @@ + + if @resource[:source] =~ /\/$/ + if @resource[:source] =~ /^(ftp|https?):/ +- Puppet::Util::Execution::withenv :PACKAGESITE => @resource[:source] do ++ Puppet::Util::Execution::withenv :PACKAGEROOT => @resource[:source] do + pkgadd "-r", @resource[:name] + end + else