Re: [103793] trunk/dports/devel/lua-numlua

2013-03-12 Thread Ryan Schmidt

On Mar 11, 2013, at 23:39, Lawrence Velázquez  wrote:

 On Mar 11, 2013, at 4:35 AM, Andrea D'Amore wrote:
 
 I have had the portfile partially edited for a while so I'm not sure
 about why I went with lib: in first place, IIRC it was to due the
 presence of multiple library version in ports rather than using a
 non-mp provided library, i.e. there's hdf5 and hdf5-18 and I didn't
 want to force one or the other.
 This could (and maybe should) be in portfile logic accessing registry,
 probably when I set the dependency I couldn't remember the registry
 functions and was too lazy to check those.
 
 So if there's an actual reason for switching this from lib: to port:
 dependency and putting in explicit logic for the dependency checking
 I'd like to read it. Otherwise I'd rather keep the port the way it is,
 possibly switching to path: dependencies with leading $prefix in order
 to keep them in ports.
 
 If they use the same library name, you should be able to do something like 
 this. (I'm just making the path up; I don't know what the right one would be 
 in your case.)
 
path:lib/libhdf5.dylib:hdf5-18
 
 This stays inside the MacPorts prefix.

Correct. And you don't need to manually put ${prefix}/ at the beginning of the 
path; if the path is relative, it's taken to be relative to ${prefix}.

And if the library names are *not* the same, then the only correct thing to do 
is to use a port:-style dependency, and perhaps have variants for selecting 
which one you want.


___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: [103793] trunk/dports/devel/lua-numlua

2013-03-11 Thread Andrea D'Amore
On Fri, Mar 8, 2013 at 8:38 PM, Lawrence Velázquez lar...@macports.org wrote:
 The usual reasons?
 https://trac.macports.org/wiki/FAQ#ownlibs

Thanks but I was already aware of the FAQ.

I have had the portfile partially edited for a while so I'm not sure
about why I went with lib: in first place, IIRC it was to due the
presence of multiple library version in ports rather than using a
non-mp provided library, i.e. there's hdf5 and hdf5-18 and I didn't
want to force one or the other.
This could (and maybe should) be in portfile logic accessing registry,
probably when I set the dependency I couldn't remember the registry
functions and was too lazy to check those.

So if there's an actual reason for switching this from lib: to port:
dependency and putting in explicit logic for the dependency checking
I'd like to read it. Otherwise I'd rather keep the port the way it is,
possibly switching to path: dependencies with leading $prefix in order
to keep them in ports.

-- 
Andrea
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: [103793] trunk/dports/devel/lua-numlua

2013-03-11 Thread Lawrence Velázquez
On Mar 11, 2013, at 4:35 AM, Andrea D'Amore and.dam...@macports.org wrote:

 I have had the portfile partially edited for a while so I'm not sure
 about why I went with lib: in first place, IIRC it was to due the
 presence of multiple library version in ports rather than using a
 non-mp provided library, i.e. there's hdf5 and hdf5-18 and I didn't
 want to force one or the other.
 This could (and maybe should) be in portfile logic accessing registry,
 probably when I set the dependency I couldn't remember the registry
 functions and was too lazy to check those.
 
 So if there's an actual reason for switching this from lib: to port:
 dependency and putting in explicit logic for the dependency checking
 I'd like to read it. Otherwise I'd rather keep the port the way it is,
 possibly switching to path: dependencies with leading $prefix in order
 to keep them in ports.

If they use the same library name, you should be able to do something like 
this. (I'm just making the path up; I don't know what the right one would be in 
your case.)

path:lib/libhdf5.dylib:hdf5-18

This stays inside the MacPorts prefix.

vq
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: [103793] trunk/dports/devel/lua-numlua

2013-03-08 Thread Ryan Schmidt
On Mar 7, 2013, at 11:46, and.dam...@macports.org wrote:

 Revision: 103793
  https://trac.macports.org/changeset/103793
 Author:   and.dam...@macports.org
 Date: 2013-03-07 09:46:00 -0800 (Thu, 07 Mar 2013)
 Log Message:
 ---
 port lua-numlua: updating to 0.3, dropping old patchfiles, adding a Makefile 
 created ad-hoc, adding myself as maintiainer, fixes #38247; maintainer timeout
 
 Modified Paths:
 --
trunk/dports/devel/lua-numlua/Portfile
 
 Added Paths:
 ---
trunk/dports/devel/lua-numlua/files/Makefile
 
 Removed Paths:
 -
trunk/dports/devel/lua-numlua/files/patch-Makefile.diff
trunk/dports/devel/lua-numlua/files/patch-lib-Makefile.diff
trunk/dports/devel/lua-numlua/files/patch-lib-config.diff
trunk/dports/devel/lua-numlua/files/patch-src-Makefile.diff
 
 Modified: trunk/dports/devel/lua-numlua/Portfile
 ===
 --- trunk/dports/devel/lua-numlua/Portfile2013-03-07 16:41:55 UTC (rev 
 103792)
 +++ trunk/dports/devel/lua-numlua/Portfile2013-03-07 17:46:00 UTC (rev 
 103793)
 @@ -1,50 +1,60 @@
 # $Id$
 
 PortSystem 1.0
 +PortGroup   github  1.0
 
 +github.setupcarvalho numlua 0.3
 +github.tarball_from downloads

Here you say you're going to fetch from github downloads

 +use_zip yes
 +master_siteshttps://github.com/carvalho/numlua/archive/
 +set archive_hashf05281e96030adb9c09a01b9d9be4fa9fa4c795e
 +distfiles   ${archive_hash}.zip
 +worksrcdir  numlua-${archive_hash}

But here you override that by setting your own values. Was downloading from 
github downloads, as configured by the portgroup, not working?


 +depends_lib-append  port:lua \
 +port:atlas \
 +lib:fftw:fftw-3 \
 +lib:hdf5:hdf5-18

lib:-style dependencies should almost never be used, because they allow 
libraries installed outside of MacPorts to satisfy them. Use port:- or 
path:-style dependencies instead unless there's a specific reason.



___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: [103793] trunk/dports/devel/lua-numlua

2013-03-08 Thread Andrea D'Amore
On Fri, Mar 8, 2013 at 9:22 AM, Ryan Schmidt ryandes...@macports.org wrote:

 +github.setupcarvalho numlua 0.3
 +github.tarball_from downloads

 Here you say you're going to fetch from github downloads

 +use_zip yes
 +master_siteshttps://github.com/carvalho/numlua/archive/
 +set archive_hashf05281e96030adb9c09a01b9d9be4fa9fa4c795e
 +distfiles   ${archive_hash}.zip
 +worksrcdir  numlua-${archive_hash}

 But here you override that by setting your own values. Was downloading from 
 github downloads, as configured by the portgroup, not working?

That's a legacy line that I put in when I started editing the portfile
and forgot to delete, it skipped my svn diff review.
github's download api is deprecated and shouldn't be used anymore, the
repository doesn't have a tag so I'm using the latest hash since that
builds fine. I asked the author to add a tag for 0.3 .

 +lib:fftw:fftw-3 \
 +lib:hdf5:hdf5-18

 lib:-style dependencies should almost never be used, because they allow 
 libraries installed outside of MacPorts to satisfy them. Use port:- or 
 path:-style dependencies instead unless there's a specific reason.

That's the whole point of using lib:, what would be the disadvantage
in using external lib in this case?


-- 
Andrea
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev


Re: [103793] trunk/dports/devel/lua-numlua

2013-03-08 Thread Lawrence Velázquez
On Mar 8, 2013, at 5:44 AM, Andrea D'Amore and.dam...@macports.org wrote:

 That's the whole point of using lib:, what would be the disadvantage
 in using external lib in this case?

The usual reasons?

https://trac.macports.org/wiki/FAQ#ownlibs

vq
___
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev