[MacPorts] #52293: neomutt: update db4, add lmdb, simplify header cache implementation handling

MacPorts noreply at macports.org
Wed Sep 21 01:36:53 CEST 2016


#52293: neomutt: update db4, add lmdb, simplify header cache implementation
handling
----------------------+------------------------
  Reporter:  cal@…    |      Owner:  leonardo@…
      Type:  defect   |     Status:  new
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:  2.3.4
Resolution:           |   Keywords:  haspatch
      Port:  neomutt  |
----------------------+------------------------
Description changed by cal@…:

Old description:

> Here's a patch that adds a variant for LMDB, updates the DB4 version used
> to the latest compatible version and removes an unneeded `-L/usr/lib` for
> the header cache variant.
>
> OK to commit?
>
> {{{
> #!patch
> Index: Portfile
> ===================================================================
> --- Portfile    (revision 152935)
> +++ Portfile    (working copy)
> @@ -5,7 +5,7 @@
>  PortGroup           github 1.0
>
>  github.setup        neomutt neomutt 20160916 neomutt-
> -revision            1
> +revision            2
>  categories          mail
>  platforms           darwin
>  license             GPL-2
> @@ -52,6 +52,7 @@
>                      --without-gnutls \
>                      --without-gss \
>                      --without-idn \
> +                    --without-ldbm \
>                      --without-qdbm \
>                      --without-regex \
>                      --without-sasl \
> @@ -60,8 +61,18 @@
>
>  default_variants    +idn +imap +pop +ssl
>
> -if {![variant_isset db4] && ![variant_isset qdbm] && ![variant_isset
> tokyocabinet]} {
> -    variant_set     gdbm
> +set hcache_variants {db4 qdbm tokyocabinet gdbm ldbm}
> +if {[variant_isset headercache]} {
> +    set found no
> +    foreach hcache_impl {db4 qdbm tokyocabinet gdbm ldbm} {
> +        if {[variant_isset $hcache_impl]} {
> +            set found yes
> +        }
> +    }
> +    if {!$found} {
> +        # If no variant was chosen, choose one for the user
> +        variant_set ldbm
> +    }
>  }
>
>  post-destroot {
> @@ -73,16 +84,16 @@
>  variant compress description {Compressed folders} {
>      configure.args-replace      --disable-compressed --enable-compressed
>  }
> -variant db4 conflicts qdbm gdbm tokyocabinet description {Use Berkeley
> DB database} {
> +variant db4 conflicts {*}[lsearch -all -inline -not $hcache_variants
> db4] description {Use Berkeley DB database} {
>      configure.args-replace      --without-bdb --with-bdb=${prefix}
> -    configure.cppflags-append   "-I${prefix}/include/db44"
> -    configure.ldflags-append    "-L${prefix}/lib/db44"
> -    depends_lib-append          port:db44
> +    configure.cppflags-append   "-I${prefix}/include/db48"
> +    configure.ldflags-append    "-L${prefix}/lib/db48"
> +    depends_lib-append          port:db48
>  }
>  variant debug description {Debugging support} {
>      configure.args-append       --enable-debug
>  }
> -variant gdbm conflicts db4 qdbm tokyocabinet description {Use GNU dbm
> database} {
> +variant gdbm conflicts {*}[lsearch -all -inline -not $hcache_variants
> gdbm] description {Use GNU dbm database} {
>      configure.args-replace      --without-gdbm --with-gdbm=${prefix}
>      depends_lib-append          port:gdbm
>  }
> @@ -95,9 +106,8 @@
>      configure.args-append       --with-gpgme-prefix=${prefix}
>      depends_lib-append          port:gpgme
>  }
> -variant headercache conflicts db4 description {Enable header caching
> (requires gdbm, qdbm, or tokyocabinet)} {
> +variant headercache description {Enable header caching (requires db4,
> gdbm, qdbm, ldbm or tokyocabinet)} {
>      configure.args-replace      --disable-hcache --enable-hcache
> -    configure.ldflags-append    "-L/usr/lib"
>  }
>  variant idn description {Internationalized Domain Name support} {
>      configure.args-replace      --without-idn --with-idn=${prefix}
> @@ -106,13 +116,17 @@
>  variant imap description {IMAP support} {
>      configure.args-replace      --disable-imap --enable-imap
>  }
> +variant ldbm conflicts {*}[lsearch -all -inline -not $hcache_variants
> ldbm] description {Use LDBM database} {
> +    configure.args-replace      --without-ldbm --with-ldbm=${prefix}
> +    depends_lib-append          port:ldbm
> +}
>  variant nntp description {NNTP support} {
>      configure.args-replace      --disable-nntp --enable-nntp
>  }
>  variant pop description {POP support} {
>      configure.args-replace      --disable-pop --enable-pop
>  }
> -variant qdbm conflicts db4 gdbm tokyocabinet description {Use QDBM
> database} {
> +variant qdbm conflicts {*}[lsearch -all -inline -not $hcache_variants
> qdbm] description {Use QDBM database} {
>      configure.args-replace      --without-qdbm --with-qdbm=${prefix}
>      depends_lib-append          port:qdbm
>  }
> @@ -130,7 +144,7 @@
>      configure.args-replace      --without-ssl --with-ssl=${prefix}
>      depends_lib-append          path:lib/libssl.dylib:openssl
>  }
> -variant tokyocabinet conflicts db4 gdbm qdbm description {Use Tokyo
> Cabinet database} {
> +variant tokyocabinet conflicts {*}[lsearch -all -inline -not
> $hcache_variants tokyocabinet] description {Use Tokyo Cabinet database} {
>      configure.args-replace      --without-tokyocabinet --with-
> tokyocabinet=${prefix}
>      depends_lib-append          port:tokyocabinet
>  }
> }}}

New description:

 Here's a patch that adds a variant for LMDB, updates the DB4 version used
 to the latest compatible version and removes an unneeded `-L/usr/lib` for
 the header cache variant.

 OK to commit?

 {{{
 #!patch
 Index: Portfile
 ===================================================================
 --- Portfile    (revision 152935)
 +++ Portfile    (working copy)
 @@ -5,7 +5,7 @@
  PortGroup           github 1.0

  github.setup        neomutt neomutt 20160916 neomutt-
 -revision            1
 +revision            2
  categories          mail
  platforms           darwin
  license             GPL-2
 @@ -52,6 +52,7 @@
                      --without-gnutls \
                      --without-gss \
                      --without-idn \
 +                    --without-lmdb \
                      --without-qdbm \
                      --without-regex \
                      --without-sasl \
 @@ -60,8 +61,18 @@

  default_variants    +idn +imap +pop +ssl

 -if {![variant_isset db4] && ![variant_isset qdbm] && ![variant_isset
 tokyocabinet]} {
 -    variant_set     gdbm
 +set hcache_variants {db4 qdbm tokyocabinet gdbm lmdb}
 +if {[variant_isset headercache]} {
 +    set found no
 +    foreach hcache_impl {db4 qdbm tokyocabinet gdbm lmdb} {
 +        if {[variant_isset $hcache_impl]} {
 +            set found yes
 +        }
 +    }
 +    if {!$found} {
 +        # If no variant was chosen, choose one for the user
 +        variant_set lmdb
 +    }
  }

  post-destroot {
 @@ -73,16 +84,16 @@
  variant compress description {Compressed folders} {
      configure.args-replace      --disable-compressed --enable-compressed
  }
 -variant db4 conflicts qdbm gdbm tokyocabinet description {Use Berkeley DB
 database} {
 +variant db4 conflicts {*}[lsearch -all -inline -not $hcache_variants db4]
 description {Use Berkeley DB database} {
      configure.args-replace      --without-bdb --with-bdb=${prefix}
 -    configure.cppflags-append   "-I${prefix}/include/db44"
 -    configure.ldflags-append    "-L${prefix}/lib/db44"
 -    depends_lib-append          port:db44
 +    configure.cppflags-append   "-I${prefix}/include/db48"
 +    configure.ldflags-append    "-L${prefix}/lib/db48"
 +    depends_lib-append          port:db48
  }
  variant debug description {Debugging support} {
      configure.args-append       --enable-debug
  }
 -variant gdbm conflicts db4 qdbm tokyocabinet description {Use GNU dbm
 database} {
 +variant gdbm conflicts {*}[lsearch -all -inline -not $hcache_variants
 gdbm] description {Use GNU dbm database} {
      configure.args-replace      --without-gdbm --with-gdbm=${prefix}
      depends_lib-append          port:gdbm
  }
 @@ -95,9 +106,8 @@
      configure.args-append       --with-gpgme-prefix=${prefix}
      depends_lib-append          port:gpgme
  }
 -variant headercache conflicts db4 description {Enable header caching
 (requires gdbm, qdbm, or tokyocabinet)} {
 +variant headercache description {Enable header caching (requires db4,
 gdbm, qdbm, lmdb or tokyocabinet)} {
      configure.args-replace      --disable-hcache --enable-hcache
 -    configure.ldflags-append    "-L/usr/lib"
  }
  variant idn description {Internationalized Domain Name support} {
      configure.args-replace      --without-idn --with-idn=${prefix}
 @@ -106,13 +116,17 @@
  variant imap description {IMAP support} {
      configure.args-replace      --disable-imap --enable-imap
  }
 +variant lmdb conflicts {*}[lsearch -all -inline -not $hcache_variants
 lmdb] description {Use LMDB database} {
 +    configure.args-replace      --without-lmdb --with-lmdb=${prefix}
 +    depends_lib-append          port:lmdb
 +}
  variant nntp description {NNTP support} {
      configure.args-replace      --disable-nntp --enable-nntp
  }
  variant pop description {POP support} {
      configure.args-replace      --disable-pop --enable-pop
  }
 -variant qdbm conflicts db4 gdbm tokyocabinet description {Use QDBM
 database} {
 +variant qdbm conflicts {*}[lsearch -all -inline -not $hcache_variants
 qdbm] description {Use QDBM database} {
      configure.args-replace      --without-qdbm --with-qdbm=${prefix}
      depends_lib-append          port:qdbm
  }
 @@ -130,7 +144,7 @@
      configure.args-replace      --without-ssl --with-ssl=${prefix}
      depends_lib-append          path:lib/libssl.dylib:openssl
  }
 -variant tokyocabinet conflicts db4 gdbm qdbm description {Use Tokyo
 Cabinet database} {
 +variant tokyocabinet conflicts {*}[lsearch -all -inline -not
 $hcache_variants tokyocabinet] description {Use Tokyo Cabinet database} {
      configure.args-replace      --without-tokyocabinet --with-
 tokyocabinet=${prefix}
      depends_lib-append          port:tokyocabinet
  }
 }}}

--

-- 
Ticket URL: <https://trac.macports.org/ticket/52293#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list