<div dir="ltr"><div>Hello again,<br></div>here's my current Portfile, located in a local portfile repository ~/ports/audio/libebur128<br><br># $Id$<br>PortSystem 1.0<br>PortGroup github 1.0<br>github.setup jiixyj libebur128 1.1.0 v<br>github.tarball_from releases<br>PortGroup cmake 1.0<br># optional, but we would be grateful if you tested and included this<br>cmake.out_of_source yes<br>name libebur128<br>version 1.1.0<br>categories audio<br>platforms darwin<br>maintainers audionuma \<br> gmail.com:audionuma<br>description loudness measure according to EBU R128<br>long_description loudness measure according to EBU R128<br>homepage <a href="https://github.com/jiixyj/libebur128" target="_blank">https://github.com/jiixyj/libebur128</a><br>master_sites <a href="https://github.com/jiixyj/libebur128" target="_blank">https://github.com/jiixyj/libebur128</a><br>checksums rmd160 2eb66acfd34557f66961e34b21fefa126fabb889 \<br> sha256 c60e78f4bfda387a0895c64a4fc9850445e3a4425cc98f9140885966ce17c1d1<br>depends_lib port:speex-devel<br><br><br><div><div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-27 13:59 GMT+01:00 Mojca Miklavec <span dir="ltr"><<a href="mailto:mojca@macports.org" target="_blank">mojca@macports.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On 27 February 2016 at 13:47, Manu N <<a href="mailto:audionuma@gmail.com" target="_blank">audionuma@gmail.com</a>> wrote:<br>
> Hello,<br>
> I would like to make a portfile from a cmake based project (<br>
> <a href="https://github.com/jiixyj/libebur128" rel="noreferrer" target="_blank">https://github.com/jiixyj/libebur128</a> ).<br>
> Currently, I can build the library using MacPorts cmake and MacPorts<br>
> libspeexdsp, which is an optional dependancy.<br>
> I have been reading the <a href="https://guide.macports.org/#development" rel="noreferrer" target="_blank">https://guide.macports.org/#development</a> pages, but<br>
> couldn't find how I would port such a project.<br>
> My main questions are :<br>
> how do I get from a github project to a tarball<br>
<br>
</span>PortGroup github 1.0<br>
github.setup jiixyj libebur128 1.1.0 v<br>
<br>
The first two arguments in github.setup are project name and<br>
repository name, the third one is the version and the last one is the<br>
prefix before the version (in the tag).<br>
<br></blockquote><div><br>OK.<br></div><div>Added a github.tarball_from releases command as there is a release on github.<br></div><div>Nevertheless, I had to manually add the libebur128-1.1.0.tar.gz file into the /opt/local/var/macports/distfiles/libebur128 directory to have the installation work, otherwise `port` was searching for the archive in it's usual online repositories. Is that the expected behavior ?<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Then use "sudo port -v extract" to get the checksums (disclaimer:<br>
until someone starts complaining that this is not a "safe enough"<br>
approach because something could already be compromised).<br>
<span><br></span></blockquote><div><br></div><div>OK<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
> how do I use the cmake scripts to actually build the library inside a<br>
> portfile.<br>
<br>
</span>PortGroup cmake 1.0<br>
# optional, but we would be grateful if you tested and included this<br>
cmake.out_of_source yes<br>
<br></blockquote><div><br></div><div>OK<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
This is basically all you need. If you want to switch some features<br>
on/off, you could do something like<br>
<br>
configure.args-append -DENABLE_TESTS=ON<br>
<span><br></span></blockquote><div><br></div><div>Now, if I add the following lines to the Portfile (at the end)<br><br>variant with_tests description {Build tests suite} {<br> configure.args-append -DENABLE_TESTS=ON<br>}<br><br></div><div>and run<br><br></div><div>port variants libebur128<br><br></div><div>the result is :<br><br>libebur128 has the variants:<br> debug: Enable debug binaries<br> universal: Build for multiple architectures<br><br></div><div>So it seems that my with_tests variant is not found.<br></div><div>I have tried a portindex command in the ~/ports directory with no success.<br><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>
> I hope this beginner questions are not too obvious and that someone can<br>
> point me to the adequate documentation for these questions.<br>
<br>
</span>You can take a look at cmake-1.0.tcl and github-1.0.tcl or grep for<br>
cmake/github in other ports.<br>
<br>
The rest is the same as for other ports.<br>
<span><font color="#888888"><br>
Mojca<br>
</font></span></blockquote></div>Thanks.<br></div><div class="gmail_extra">audionuma<br><br></div></div></div></div>