how to generate the checksums with CMake?

Titus von Boxberg titus at v9g.de
Sat Feb 18 00:37:12 PST 2012


On 18.02.2012 08:31, Erik Sjölund wrote:
> Hi,
> I am trying to create a Portfile for some software that is using the
> build system CMake.
> I was wondering if anyone managed to automatically create the Portfile
> from within CMake.
It doesn't sound reasonable to do so, but probably I don't fully 
understand what you're up to.

>
> In CMake I can do "make package_source" to create a source tar.gz
> file. I then need to compute some checksums of that file. These
> checksums then need to be inserted into the Portfile at the line
> starting with "checksums".
>
> It would be nice if could create a make target
>
> make package_source_and_portfile
>
> Do you have any idea of how to do that?
For md5 you might use cmake -E md5sum
For others you have to use external tools.

You might play with add_custom_target and add_custom_command.

But
- this is not a cmake list
- I doubt that it's worth the effort since it is simple to
   handcraft a Portfile.

Regards
Titus


More information about the macports-dev mailing list