#38508 closed enhancement (duplicate)
RFE: add version number support to `platforms` field in portfiles
Reported by: | cooljeanius (Eric Gallager) | Owned by: | larryv (Lawrence Velázquez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.1.3 |
Keywords: | Cc: | ||
Port: |
Description
Thought of this is #38506; not sure if there's already a ticket open for it...
Anyway, currently, if a port is incompatible with a certain OS version, the portfile author has to write something like this:
pre-fetch { if {${os.platform} == "darwin" && ${os.major} < 9} { ui_error "${name} is only supported on OS X 10.5 Leopard or later." return -code error "unsupported platform version" } }
It'd be much easier to just be able to write something likeplatforms darwin 9+
or something like that instead.
Change History (5)
comment:1 follow-up: 2 Changed 12 years ago by larryv (Lawrence Velázquez)
Owner: | changed from macports-tickets@… to larryv@… |
---|---|
Status: | new → assigned |
comment:2 Changed 12 years ago by cooljeanius (Eric Gallager)
Replying to larryv@…:
I’ve been thinking about this. I’m leaning towards a syntax similar to that in
compiler_blacklist_versions
.platforms macosx {darwin >= 9} freebsd
That would be perfect, thanks for agreeing to take this on.
comment:3 Changed 12 years ago by larryv (Lawrence Velázquez)
Hm. It doesn’t seem that platforms
currently affects whether or not a port can be installed. Even after I change a port to use
platforms freebsd
I can still install it on OS X. Can anyone confirm this behavior?
comment:4 follow-up: 5 Changed 12 years ago by raimue (Rainer Müller)
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
The platform field is currently purely informational and is not enforced.
Duplicate of #15712.
comment:5 Changed 12 years ago by larryv (Lawrence Velázquez)
Replying to raimue@…:
The platform field is currently purely informational and is not enforced.
Would changing this cause any problems?
I’ve been thinking about this. I’m leaning towards a syntax similar to that in
compiler_blacklist_versions
.