Ticket #31392: sane-backends.diff

File sane-backends.diff, 3.5 KB (added by aguynamedryan+macports@…, 13 years ago)

attempt to rearrange variants

  • Portfile

    old new  
    44
    55name                        sane-backends
    66version                     1.0.22
    7 revision                    1
     7revision                    2
    88set download_id             3503
    99categories                  graphics
    1010platforms                   darwin
     
    2626                            rmd160  524713474a819331d0179fa642fef710d073f1d1
    2727
    2828depends_lib                 port:jpeg \
    29                             port:libusb-compat \
    3029                            port:net-snmp \
    3130                            port:tiff \
    3231                            port:zlib
     
    3837
    3938configure.args              --mandir=${prefix}/share/man \
    4039                            --with-docdir=${prefix}/share/doc/${name} \
    41                             --enable-local-backends \
    42                             --enable-libusb \
     40                            --disable-local-backends \
     41                            --disable-libusb \
    4342                            --disable-latex \
    4443                            --without-gphoto2
    4544
    4645use_parallel_build          yes
    4746
     47default_variants            +localbackends
     48
    4849pre-destroot {
    4950    xinstall -d -o root -g admin -m 775 ${destroot}${prefix}/var/lock
    5051}
    5152
    5253destroot.keepdirs ${destroot}${prefix}/var/lock
    5354
    54 variant disable_localbackends conflicts enable_pnmbackend with_gphoto2 description "turn off compilation of all backends but net" {
    55     depends_lib-delete      port:libusb-compat
    56     configure.args-delete   --enable-local-backends --enable-libusb
    57     configure.args-append   --disable-local-backends --disable-libusb
     55variant disable_localbackends conflicts localbackends description { Legacy compatibility variant } {}
     56if {[variant_isset disable_localbackends]} {
     57    default_variants        -localbackends
     58} else {
     59    default_variants        +localbackends
     60}
     61
     62variant localbackends conflicts enable_pnmbackend with_gphoto2 description "turn off compilation of all backends but net" {
     63    depends_lib-append      port:libusb-compat
     64    configure.args-delete   --disable-local-backends --disable-libusb
     65    configure.args-append   --enable-local-backends --enable-libusb
    5866}
    5967
    60 variant enable_pnmbackend conflicts disable_localbackends description "enable the pnm backend for testing frontends (possible security risk, see PROBLEMS file)" {
     68variant pnm requires localbackends conflicts enable_pnmbackend with_gphoto2 description "enable the pnm backend for testing frontends (possible security risk, see PROBLEMS file)" {
    6169    configure.args-append   --enable-pnm-backend
    6270}
     71variant enable_pnmbackend requires pnm description { Legacy compatibility variant } {}
    6372
    64 variant with_gphoto2 conflicts disable_localbackends description "include the gphoto2 backend" {
     73variant gphoto2 requires localbackends conflicts enable_pnmbackend with_gphoto2 description "include the gphoto2 backend" {
    6574    depends_lib-append      port:libexif \
    6675                            port:libgphoto2 \
    6776                            port:pkgconfig
    6877    configure.args-delete   --without-gphoto2
    6978    configure.args-append   --with-gphoto2
    7079}
     80variant with_gphoto2 requires gphoto2 description { Legacy compatibility variant } {}
    7181
    7282# This project uses u_long *everywhere* and doesn't bother including sys/types.h
    7383configure.cppflags-append   -include sys/types.h
     
    7989notes "\
    8090    Edit ${prefix}/etc/sane.d/dll.conf to enable only\
    8191    specific backends for a noticeable performance gain."
     92