Bug 200129 - [patch] www/rubygem-d3_rails
Summary: [patch] www/rubygem-d3_rails
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ruby (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-05-11 13:28 UTC by Torsten Zühlsdorff
Modified: 2015-05-25 14:28 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (ruby)


Attachments
add options to choose between railties versions (681 bytes, patch)
2015-05-11 13:28 UTC, Torsten Zühlsdorff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Zühlsdorff 2015-05-11 13:28:58 UTC
Created attachment 156656 [details]
add options to choose between railties versions

While working at the gitlab-port, i figured out, that this port uses rubygem-railties version 3. 

The gem itselfs supports railties in version 3 and version 4. Version 4 is needed for the gitlab-port.

Therefore i wrote a patch  to add options to choose between the railties versions.
Comment 1 Johannes Jost Meixner freebsd_committer freebsd_triage 2015-05-11 16:08:27 UTC
(In reply to Torsten Zühlsdorff from comment #0)
Good idea in theory.

The problem is that, assuming you want to build Gitlab pkgs, this is not the right way to go - because the rubygem-d3_rails package will always be linked to railties3 by default.

What you could do is, make the port into a master/slave structure -- rubygem-d3_rails, with a 

RUN_DEPENDS?=	rubygem-railties>=3.1.0:${PORTSDIR}/www/rubygem-railties

and rubygem-d3_rails4,

with an added
PKGNAMESUFFIX=	4
RAILTIES4_RUN_DEPENDS=  rubygem-railties4>=4.0:${PORTSDIR}/www/rubygem-railties4

-- while keeping everything else equal.

Then have GitLab depend on the d3_rails4 port, and packages can be built.
Comment 2 Johannes Jost Meixner freebsd_committer freebsd_triage 2015-05-11 19:19:45 UTC
(In reply to Johannes Jost Meixner from comment #1)
Forgot to add.

Because everything else is equal, you do not need it in the slave port's Makefile.

Something like this could work:

MASTERDIR=      ${.CURDIR}/../rubygem-d3_rails

PKGNAMESUFFIX=  4

RAILTIES4_RUN_DEPENDS=  rubygem-railties4>=4.0:${PORTSDIR}/www/rubygem-railties4

.include "${MASTERDIR}/Makefile"


(Inspired by devel/php56-json with lang/php56)
Comment 3 Torsten Zühlsdorff 2015-05-12 07:26:01 UTC
I get your point, Johannes. Thanks for the explanation. I did this more than one time. I will rework the patches today and update the PRs :)
Comment 4 Torsten Zühlsdorff 2015-05-18 13:08:09 UTC
Sorry, but as you can see i did not find time to finish the rework. I'm currently in vacation and will do the changes next week! :)
Comment 5 Torsten Zühlsdorff 2015-05-25 14:24:40 UTC
This PR could be closed! :)

With guessing i found the port www/rubygem-d3_rails-rails4, which already is want we need :)