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
This commit is contained in:
parent
441bb19368
commit
156439cd26
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=403552
@ -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 RMAGIC
|
||||
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:${PORTSDIR}/databases/rubygem-mysql
|
||||
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>
|
||||
|
@ -1,17 +0,0 @@
|
||||
--- Gemfile.orig 2014-03-30 21:39:22.047223369 +0000
|
||||
+++ Gemfile 2014-03-30 21:39:43.309222769 +0000
|
||||
@@ -25,14 +25,6 @@
|
||||
end
|
||||
|
||||
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")
|
@ -1,12 +0,0 @@
|
||||
--- Gemfile.orig 2015-04-02 19:40:25.929698000 +0000
|
||||
+++ Gemfile 2015-04-02 19:41:11.539003000 +0000
|
||||
@@ -44,6 +44,9 @@
|
||||
gem "activerecord-jdbc-adapter", "~> 1.3.2"
|
||||
end
|
||||
|
||||
+# Thin webserver
|
||||
+gem "thin", "~> 1.6.2"
|
||||
+
|
||||
# Include database gems for the adapters found in the database
|
||||
# configuration file
|
||||
require 'erb'
|
@ -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
|
||||
|
1
www/redmine/files/rmagic.rb
Normal file
1
www/redmine/files/rmagic.rb
Normal file
@ -0,0 +1 @@
|
||||
gem "rmagick", ">= 2.13.4"
|
1
www/redmine/files/thin.rb
Normal file
1
www/redmine/files/thin.rb
Normal file
@ -0,0 +1 @@
|
||||
gem "thin", ">= 1.6.2"
|
@ -2,8 +2,6 @@
|
||||
@owner %%WWWOWN%%
|
||||
@group %%WWWGRP%%
|
||||
%%WWWDIR%%/Gemfile
|
||||
@owner %%WWWOWN%%
|
||||
@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
|
||||
@sample %%WWWDIR%%/config/settings.yml.sample
|
||||
@(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/tmp/pdf/empty
|
||||
@(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/tmp/test/empty
|
||||
@(%%WWWOWN%%,%%WWWGRP%%,) %%WWWDIR%%/tmp/thumbnails/empty
|
||||
|
Loading…
Reference in New Issue
Block a user