Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jun 2021 20:36:16 +0200
From:      Philipp Ost <pj@smo.de>
To:        ports@freebsd.org
Subject:   Re: New port: math/polymake -- some questions and help needed
Message-ID:  <5350b863-620a-c9a4-99c6-9b081d9b8887@smo.de>
In-Reply-To: <YMfGT1e6yy%2BX9Phr@graf.pompo.net>
References:  <87dbb6a1-2b1e-ef43-cf3c-b4becddff1b9@smo.de> <YMfGT1e6yy%2BX9Phr@graf.pompo.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/14/21 11:12 PM, Thierry Thomas wrote:
>> I've been working on a port of polymake (polymake.org). Most of the work
>> is done, but there are some questions. Please advise:
> 
> Remark: this is a resurrection
> 
> $ grep polymake /usr/ports/MOVED
> math/polymake||2014-06-22|Has expired: Does not build with any supported version of Perl

I suspected as much. A FreeBSD port is hinted at on the polymake forums, 
but I didn't dig deeper.

That said, it was SVN revision 358827 which removed polymake from the 
ports tree.

> 
>> - How to deal with machine/installation dependent path names?
>> polymake installs a helper library into
>> ${PREFIX}/libexec/polymake/perlx/%%PERL_VERSION%%/amd64-freebsd-thread-multi/auto/Polymake/Ext/Ext.so
>>
>> amd64-freebsd-thread-multi is the output of
>>
>> 	perl -E 'use Config; print "$Config::Config{archname}\n";'
>>
>> How do I correctly handle this entry in pkg-plist?
> 
> You can define a variable to be passed in plist:
> PLIST_SUB=     ARCH=${ARCH}
> 
> and then %%ARCH%% will be available.

I'm aware of %%ARCH%%. The trouble I have with that particular directory 
name is its dependency on the options chosen in lang/perl5.*. If someone 
builds perl with both of these options set to off or without threading 
support, the directory name is going to be one of ${ARCH}-freebsd or 
${ARCH}-freebsd-multi. How to handle these cases? I don't think it's 
safe to assume that no one fiddles with these options.


>> - From reading the Porters Handbook, I get the impression that setting
>> DESTDIR is frowned upon. However, if I don't set DESTDIR=${STAGEDIR} in
>> the do-install target, "make stage" dumps everything to ${PREFIX}. Any
>> comments on this?
> 
> I guess that you’ll have to patch the Makefile…

I thought so… Compilation is handled using ninja, everything else is 
handled by custom perl scripts.

I'll work on a better solution.

[...]
> What is the output of `ldconfig -r | grep polymake'?
> 
> On FreeBSD, if your library is libpolymake.so.4.4, you should also
> install a symlink for libpolymake.so and libpolymake.so.4.
> Without that, it won’t be registered in the libraries hints file.

I wasn't aware of that. Thanks for the hint! It used to come up empty, 
but it's fixed now:

$ ldconfig -r | grep polymake
         274:-lpolymake.4 => /usr/local/lib/libpolymake.so.4

Now 'portlint -A' is happy, too. :-)

> 
> Thanks for this revival!
> 

It's been quite the learning curve! There are still some open issues, 
but I'm making progress.

Thanks for the help!

Philipp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5350b863-620a-c9a4-99c6-9b081d9b8887>