diff options
author | bapt <bapt@FreeBSD.org> | 2016-05-18 20:07:42 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2016-05-18 20:07:42 +0800 |
commit | 0b22edc26ab3813819d77df3f378a870ef4df3e1 (patch) | |
tree | 0f370b58be9a236e248698846ade739b7df770c8 /sysutils | |
parent | ba91b760bddb47fccf6b5aa1baff2a2b1fcc8bcc (diff) | |
download | freebsd-ports-gnome-0b22edc26ab3813819d77df3f378a870ef4df3e1.tar.gz freebsd-ports-gnome-0b22edc26ab3813819d77df3f378a870ef4df3e1.tar.zst freebsd-ports-gnome-0b22edc26ab3813819d77df3f378a870ef4df3e1.zip |
Fix with ruby 2.2
Sponsored by: Gandi.net
Diffstat (limited to 'sysutils')
3 files changed, 24 insertions, 9 deletions
diff --git a/sysutils/puppet37/Makefile b/sysutils/puppet37/Makefile index 195ee88429de..27d99955cc4c 100644 --- a/sysutils/puppet37/Makefile +++ b/sysutils/puppet37/Makefile @@ -3,7 +3,7 @@ PORTNAME= puppet PORTVERSION= 3.7.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= http://downloads.puppetlabs.com/puppet/ PKGNAMESUFFIX= 37 @@ -34,13 +34,6 @@ SUB_LIST= RUBY=${RUBY} OPTIONS_DEFINE= DOCS EXAMPLES -.include <bsd.port.pre.mk> - -# puppet 4.x should support ruby 2.2.x -.if ${RUBY_VER} >= 2.2 -BROKEN= Does not work with Ruby 2.2 -.endif - post-patch: @${REINPLACE_CMD} -e "s|/etc/puppet|${ETCDIR}|" \ ${WRKSRC}/install.rb \ @@ -74,4 +67,4 @@ do-install: cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/ext/rack/example-passenger-vhost.conf ${STAGEDIR}${EXAMPLESDIR} -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/sysutils/puppet37/files/patch-lib_puppet_vendor_safe__yaml_lib_safe__yaml.rb b/sysutils/puppet37/files/patch-lib_puppet_vendor_safe__yaml_lib_safe__yaml.rb new file mode 100644 index 000000000000..3742b95263b3 --- /dev/null +++ b/sysutils/puppet37/files/patch-lib_puppet_vendor_safe__yaml_lib_safe__yaml.rb @@ -0,0 +1,11 @@ +--- lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb.orig 2015-03-25 16:32:47 UTC ++++ lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb +@@ -3,7 +3,7 @@ require "yaml" + # This needs to be defined up front in case any internal classes need to base + # their behavior off of this. + module SafeYAML +- YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : "syck" ++ YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : (defined?(Psych) && YAML == Psych ? "psych" : "syck") + end + + require "set" diff --git a/sysutils/puppet37/files/patch-spec_unit_reports_store__spec.rb b/sysutils/puppet37/files/patch-spec_unit_reports_store__spec.rb new file mode 100644 index 000000000000..aced54ffde5b --- /dev/null +++ b/sysutils/puppet37/files/patch-spec_unit_reports_store__spec.rb @@ -0,0 +1,11 @@ +--- spec/unit/reports/store_spec.rb.orig 2015-03-25 16:32:48 UTC ++++ spec/unit/reports/store_spec.rb +@@ -24,7 +24,7 @@ describe processor do + end + + it "should write the report to the file in YAML" do +- Time.stubs(:now).returns(Time.parse("2011-01-06 12:00:00 UTC")) ++ Time.stubs(:now).returns(Time.utc(2011,01,06,12,00,00)) + @report.process + + File.read(File.join(Puppet[:reportdir], @report.host, "201101061200.yaml")).should == @report.to_yaml |