Opened 13 years ago

Last modified 8 years ago

#31392 assigned enhancement

sane-backends: clean up variant names

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: sane-backends

Description

The sane-backends variants use prefixes, which is not how we usually name variants in MacPorts:

$ port variants sane-backends
sane-backends has the variants:
   disable_localbackends: turn off compilation of all backends but net
     * conflicts with enable_pnmbackend with_gphoto2
   enable_pnmbackend: enable the pnm backend for testing frontends (possible security risk, see PROBLEMS file)
     * conflicts with disable_localbackends
   universal: Build for multiple architectures
   with_gphoto2: include the gphoto2 backend
     * conflicts with disable_localbackends
  • "disable_localbackends" should invert its functionality and become "localbackends", default to on
  • "enable_pnmbackend" should become "pnmbackend" (or even just "pnm")
  • "with_gphoto2" should become "gphoto2"

When the variants are renamed, stub variants with the old variant names should stay around for "awhile" (until "all" users have upgraded) to provide a migration path. For example:

variant disable_localbackends conflicts localbackends description {Legacy compatibility variant} {}
if {[variant_isset disable_localbackends]} {
    default_variants -localbackends
} else {
    default_variants +localbackends
}
variant enable_pnmbackend requires pnmbackend description {Legacy compatibility variant} {}
variant with_gphoto2 requires gphoto2 description {Legacy compatibility variant} {}

And the revision should be increased when the variants are renamed.

Attachments (1)

sane-backends.diff (3.5 KB) - added by aguynamedryan+macports@… 13 years ago.
attempt to rearrange variants

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by aguynamedryan+macports@…

Attachment: sane-backends.diff added

attempt to rearrange variants

comment:1 Changed 13 years ago by aguynamedryan+macports@…

I've taken a stab at this, but I'm a little shaky on variants.

comment:2 Changed 8 years ago by mf2k (Frank Schima)

Owner: changed from aguynamedryan+sane@… to macports-tickets@…
Status: newassigned

comment:3 Changed 8 years ago by mf2k (Frank Schima)

Version: 2.0.3
Note: See TracTickets for help on using tickets.