svn commit: r403552 - in head/www/redmine: . files
Michael Moll
mmoll at FreeBSD.org
Fri Dec 11 17:28:03 UTC 2015
Author: mmoll
Date: Fri Dec 11 17:28:01 2015
New Revision: 403552
URL: https://svnweb.freebsd.org/changeset/ports/403552
Log:
www/redmine: change how optional gems are included
- patch Gemfile to pull in files in bundler.d/
o eases including optional features without regenerating
extra patches with each update
o convert thin and imagemagick options to use bundler.d
o this does not fix PR 201112, but eases future updates
which will fix it implicitly
- while here, use @sample
Added:
head/www/redmine/files/rmagic.rb (contents, props changed)
head/www/redmine/files/thin.rb (contents, props changed)
Deleted:
head/www/redmine/files/extra-patch-Gemfile
head/www/redmine/files/extra-patch-thin-Gemfile
Modified:
head/www/redmine/Makefile
head/www/redmine/files/patch-Gemfile
head/www/redmine/pkg-plist
Modified: head/www/redmine/Makefile
==============================================================================
--- head/www/redmine/Makefile Fri Dec 11 16:54:22 2015 (r403551)
+++ head/www/redmine/Makefile Fri Dec 11 17:28:01 2015 (r403552)
@@ -3,6 +3,7 @@
PORTNAME= redmine
PORTVERSION= 2.6.9
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://www.redmine.org/releases/
@@ -42,6 +43,7 @@ OPTIONS_DEFINE= MYSQL MYSQL2 POSTGRESQL
OPTIONS_DEFAULT=MYSQL2 RMAGIC THIN
OPTIONS_SINGLE= WWWSERVER
OPTIONS_SINGLE_WWWSERVER= THIN PASSENGER
+OPTIONS_SUB= yes
POSTGRESQL_DESC=Enable PostgreSQL support
RMAGIC_DESC= Enable Gantt charts support
THIN_DESC= Use Thin WEB server
@@ -53,16 +55,14 @@ MYSQL_RUN_DEPENDS= rubygem-mysql>=2.8.1:
MYSQL2_RUN_DEPENDS= rubygem-mysql2>=0:${PORTSDIR}/databases/rubygem-mysql2
PASSENGER_RUN_DEPENDS= passenger-config:${PORTSDIR}/www/rubygem-passenger
POSTGRESQL_RUN_DEPENDS= rubygem-pg>=0:${PORTSDIR}/databases/rubygem-pg
-RMAGIC_EXTRA_PATCHES_OFF= ${FILESDIR}/extra-patch-Gemfile
RMAGIC_RUN_DEPENDS= rubygem-rmagick>=2.13.4:${PORTSDIR}/graphics/rubygem-rmagick
-THIN_EXTRA_PATCHES= ${FILESDIR}/extra-patch-thin-Gemfile
THIN_RUN_DEPENDS= thin:${PORTSDIR}/www/rubygem-thin
THIN_SUB_LIST= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
THIN_VARS= USE_RC_SUBR=redmine
post-extract:
@${RM} ${WRKSRC}/.hgignore ${WRKSRC}/.travis.yml
- @${MV} ${WRKSRC}/config/settings.yml ${WRKSRC}/config/settings.yml-dist
+ @${MV} ${WRKSRC}/config/settings.yml ${WRKSRC}/config/settings.yml.sample
post-patch:
@${FIND} ${WRKSRC} -name '*.bak' -o -name '*.orig' -delete
@@ -73,13 +73,16 @@ pre-install:
do-install:
${MKDIR} ${STAGEDIR}${WWWDIR}
${MKDIR} ${STAGEDIR}${WWWDIR}/tmp/pids
+ ${MKDIR} ${STAGEDIR}${WWWDIR}/bundler.d
cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}
+do-install-RMAGIC-on:
+ ${CP} ${FILESDIR}/rmagic.rb ${STAGEDIR}${WWWDIR}/bundler.d
+
+do-install-THIN-on:
+ ${CP} ${FILESDIR}/thin.rb ${STAGEDIR}${WWWDIR}/bundler.d
+
post-install:
${TOUCH} ${STAGEDIR}${WWWDIR}/Gemfile.lock
- if ! [ -r ${STAGEDIR}${WWWDIR}/config/settings.yml ]; then \
- ${INSTALL_DATA} ${STAGEDIR}${WWWDIR}/config/settings.yml-dist \
- ${STAGEDIR}${WWWDIR}/config/settings.yml; \
- fi
.include <bsd.port.mk>
Modified: head/www/redmine/files/patch-Gemfile
==============================================================================
--- head/www/redmine/files/patch-Gemfile Fri Dec 11 16:54:22 2015 (r403551)
+++ head/www/redmine/files/patch-Gemfile Fri Dec 11 17:28:01 2015 (r403552)
@@ -1,6 +1,6 @@
---- Gemfile.orig 2015-12-09 20:52:29 UTC
+--- Gemfile.orig 2015-12-09 23:40:39 UTC
+++ Gemfile
-@@ -1,25 +1,25 @@
+@@ -1,37 +1,29 @@
source 'https://rubygems.org'
-gem "rails", "3.2.22"
@@ -32,7 +32,19 @@
gem "rack-openid"
end
-@@ -82,23 +82,6 @@ else
+ platforms :mri, :mingw do
+- # Optional gem for exporting the gantt to a PNG file, not supported with jruby
+- group :rmagick do
+- # RMagick 2 supports ruby 1.9
+- # RMagick 1 would be fine for ruby 1.8 but Bundler does not support
+- # different requirements for the same gem on different platforms
+- gem "rmagick", (RUBY_VERSION < "1.9" ? "2.13.3" : "~> 2.13.4")
+- end
+-
+ # Optional Markdown support, not for JRuby
+ group :markdown do
+ gem "redcarpet", (RUBY_VERSION < "1.9" ? "~> 2.3.0" : "~> 3.3.2")
+@@ -82,23 +74,6 @@ else
warn("Please configure your config/database.yml first")
end
@@ -56,3 +68,11 @@
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
+@@ -111,3 +86,7 @@ Dir.glob File.expand_path("../plugins/*/
+ #TODO: switch to "eval_gemfile file" when bundler >= 1.2.0 will be required (rails 4)
+ instance_eval File.read(file), file
+ end
++
++Dir["#{File.dirname(__FILE__)}/bundler.d/*.rb"].each do |bundle|
++ self.instance_eval(Bundler.read_file(bundle))
++end
Added: head/www/redmine/files/rmagic.rb
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/redmine/files/rmagic.rb Fri Dec 11 17:28:01 2015 (r403552)
@@ -0,0 +1 @@
+gem "rmagick", ">= 2.13.4"
Added: head/www/redmine/files/thin.rb
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/redmine/files/thin.rb Fri Dec 11 17:28:01 2015 (r403552)
@@ -0,0 +1 @@
+gem "thin", ">= 1.6.2"
Modified: head/www/redmine/pkg-plist
==============================================================================
--- head/www/redmine/pkg-plist Fri Dec 11 16:54:22 2015 (r403551)
+++ head/www/redmine/pkg-plist Fri Dec 11 17:28:01 2015 (r403552)
@@ -2,8 +2,6 @@
@owner %%WWWOWN%%
@group %%WWWGRP%%
%%WWWDIR%%/Gemfile
- at owner %%WWWOWN%%
- at group %%WWWGRP%%
%%WWWDIR%%/Gemfile.lock
@owner
@group
@@ -592,8 +590,6 @@
%%WWWDIR%%/config/locales/zh.yml
%%WWWDIR%%/config/preinitializer.rb
%%WWWDIR%%/config/routes.rb
-%%WWWDIR%%/config/settings.yml
-%%WWWDIR%%/config/settings.yml-dist
%%WWWDIR%%/db/migrate/001_setup.rb
%%WWWDIR%%/db/migrate/002_issue_move.rb
%%WWWDIR%%/db/migrate/003_issue_add_note.rb
@@ -1842,6 +1838,9 @@
%%WWWDIR%%/test/unit/wiki_test.rb
%%WWWDIR%%/test/unit/workflow_test.rb
%%WWWDIR%%/test/unit/workflow_transition_test.rb
+%%RMAGIC%%%%WWWDIR%%/bundler.d/rmagic.rb
+%%THIN%%%%WWWDIR%%/bundler.d/thin.rb
+ at sample %%WWWDIR%%/config/settings.yml.sample
@(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/tmp/pdf/empty
@(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/tmp/test/empty
@(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/tmp/thumbnails/empty
More information about the svn-ports-all
mailing list