> On Mar 30, 2016, at 10:10 AM, [email protected] wrote:
>
> Revision
> 147186
> Author
> [email protected]
> Date
> 2016-03-30 08:10:35 -0700 (Wed, 30 Mar 2016)
> Log Message
>
> nmap: add a way to build without subversion (fixes #37343), also switched
> no_* variants to the correct (current) positive style
> Modified Paths
>
> • trunk/dports/net/nmap/Portfile
> @@ -32,20 +33,17 @@
> sha256
> 58cf8896d09057d1c3533f430c06b22791d0227ebbb93dede2ccb73693ed4b4b
>
> depends_lib port:libpcap \
> - path:lib/libssl.dylib:openssl \
> - port:pcre \
> port:zlib \
> port:apr \
> - port:subversion
>
> use_bzip2 yes
>
> configure.args --without-zenmap --without-ndiff \
> --mandir=\\\${prefix}/share/man \
> --infodir=\\\${prefix}/share/info \
> - --with-openssl=${prefix} \
> - --with-libpcre=${prefix} \
> - --with-liblua=included
> + --with-liblua=included \
> + --without-subversion
> +
>
> # nmap's configure script in nselib-bin does not respect
> --with-liblua=included
> # as with many ports, configure fails if nawk is installed, force use of
> system awk
> @@ -54,16 +52,23 @@
> use_parallel_build no
> configure.ccache no
>
> -variant no_ssl description {build without ssl support} {
> - configure.args-delete --with-openssl=${prefix}
> - depends_lib-delete path:lib/libssl.dylib:openssl
> +default_variants +ssl +pcre +subversion
> +
> +variant ssl description {build with ssl support} {
> + configure.args-append --with-openssl=${prefix}
> + depends_lib-append path:lib/libssl.dylib:openssl
> }
>
> -variant no_pcre description {build without pcre support} {
> - configure.args-delete --with-pcre=${prefix}
> - depends_lib-delete port:pcre
> +variant pcre description {build with pcre support} {
> + configure.args-append --with-pcre=${prefix}
> + depends_lib-append port:pcre
> }
>
> +variant subversion description {build with subversion (nmap-update) support}
> {
> + configure.args-delete --without-subversion
> + depends_lib-append port:subversion
> + }
> +
Switching from negative "no_" variants to positive variants is good, but when
you do this, you should provide an upgrade path that preserves the user's
choices. In this case, that means continuing for one year to provide a no_ssl
variant (which does nothing, other than acting as a flag to indicate that you
should not set "default_variants +ssl"), and similarly continuing to provide a
no_pcre variant and not setting "default_variants +pcre" if that variant is
chosen. For example:
# Can be removed after March 2017
variant no_ssl description {Legacy compatibility variant} {}
if {![variant_isset no_ssl]} {
default_variants +ssl
}
variant no_pcre description {Legacy compatibility variant} {}
if {![variant_isset no_pcre]} {
default_variants +pcre
}
_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev