[93402] users/g5pw/dports/devel/radare2/Portfile

Ryan Schmidt ryandesign at macports.org
Mon May 21 14:09:19 PDT 2012


On May 21, 2012, at 15:46, g5pw at macports.org wrote:

> Revision: 93402
>          https://trac.macports.org/changeset/93402
> Author:   g5pw at macports.org
> Date:     2012-05-21 13:46:00 -0700 (Mon, 21 May 2012)
> Log Message:
> -----------
> devel/radare2:
> fixed whitespace mess, added livecheck, using system -W
> and removed a patch whose sole purpose was to create a file.
> Just created the file instead.

In addition it looks like you added a pre-patch block and some build.args that weren't there before, but it's hard to clearly see these functional changes because of the concurrent whitespace changes. In the future please make whitespace changes in a separate commit.

More below:


> Modified: users/g5pw/dports/devel/radare2/Portfile
> ===================================================================
> --- users/g5pw/dports/devel/radare2/Portfile	2012-05-21 20:39:13 UTC (rev 93401)
> +++ users/g5pw/dports/devel/radare2/Portfile	2012-05-21 20:46:00 UTC (rev 93402)
> @@ -3,31 +3,38 @@
> 
> PortSystem          1.0
> 
> -name				radare2
> -version				0.9
> -categories			devel
> +name                radare2
> +version             0.9
> +categories          devel
> platforms           darwin
> -license             GPL-3
> -maintainers			g5pw pixilla openmaintainer
> -description			Opensource tools to disasm, debug, analyze and manipulate binary files.
> -long_description    ${description}
> -homepage			http://radare.org/
> -master_sites		${homepage}get/
> +license             LGPL-3+
> +maintainers         g5pw pixilla openmaintainer
> +description         Opensource tools to disasm, debug, analyze and manipulate binary files.
> +long_description    ${name} provides ${description}.
> +homepage            http://radare.org
> +master_sites        ${homepage}/get/
> 
> -checksums           ${distname}${extract.suffix} \
> -						rmd160  f68ebf07ec62e907980e8f8bc195754bf993b466 \
> -						sha256  e12feea3b776601d7b680e64250897110cf4fca2f1214b4c527e13b7abe900e0
> +checksums           rmd160  f68ebf07ec62e907980e8f8bc195754bf993b466 \
> +                    sha256  e12feea3b776601d7b680e64250897110cf4fca2f1214b4c527e13b7abe900e0
> 
> patch.pre_args      -p1
> -patchfiles          patch-change_install_names.diff \
> -                    patch-libr-Makefile.diff \
> +patchfiles          patch-libr-Makefile.diff \
>                     patch-libr-config.mk.tail.diff \
>                     patch-libr-rules.mk.diff \
>                     patch-mk-gcc.mk.diff
> 
> -build.env-append "LDFLAGS=-L${prefix}/lib"
> -					
> +pre-patch {
> +    reinplace "s/\"main(){}\"/\"int main(){}\"/" ${worksrcpath}/configure
> +}

Since this reinplace affects only a single line, and doesn't involve any portfile variables, it would be better to make a patchfile.


> +build.env-append    LDFLAGS="-L${prefix}/lib"
> +build.args          CC="${configure.cc} [get_canonical_archflags]"

It's indeed necessary to specify the compiler and arch flags for this port, however calling get_canonical_archflags will not work as you want unless you define the universal variant before calling it. Meaning: on a line before you call get_canonical_archflags, write:

variant universal {}

Since this changes how the files are built (previously, the universal variant would install non-universal software), the revision should be increased.


> post-destroot {
>     # Fix link lib paths
> -    system "cd ${worksrcpath} && sh change_install_names ${destroot}"
> +    system -W ${filespath} "sh change_install_names ${destroot}"
> }
> +
> +livecheck.type      regex
> +livecheck.url       ${homepage}/y/?p=download
> +livecheck.regex     "${name}-(\\d\\.\\d)"




More information about the macports-dev mailing list