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.
(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.
(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)
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 :)
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! :)
This PR could be closed! :) With guessing i found the port www/rubygem-d3_rails-rails4, which already is want we need :)