I am currently working on bringing polymake into the FreeBSD ports system. It builds fine and the testsuite runs without errors.
I am working with the polymake-4.4-minimal version.
Because of problems with the respective ports, libnormaliz and SymPol are currently disabled. Java support is disabled, too, as neither javaview nor jReality are currently in the ports tree.
That being said, I ran into some problems on which I would like some help and comments:
- perlx path is configuration dependent:
The perlx pathname depends on the build time configuration of the perl interpreter. On FreeBSD, the lang/perl5 ports let the user set both multiplicity and threading support independently; they default to on. As a result, the perlx path can be one of
$ARCH-freebsd
$ARCH-freebsd-multi
$ARCH-freebsd-thread-multi
What's the reason behind this? Wouldn't it be sufficient to just use $ARCH-$OSNAME instead?
Can this be changed without causing too much trouble?
FreeBSD prefers static packing lists. So far, I've not yet found a satisfying solution how to handle this.
- Staging issues:
On FreeBSD, a port must not install files directly to the regular destination directories, but into a separate staging directory from which the package will be built - see the Porters Handbook on staging.
Polymake's install target does not easily conform to this requirement. `make stage`, e.g., installs everything directly on the system. As a temporary workaround, I set DESTDIR=${STAGEDIR} in the port's Makefile. This, however, will not be accepted by the FreeBSD project, as DESTDIR is used with a different meaning
(it could point to an alternative environment, where the port should be installed, e.g. in a jail).
The port must unconditionally respect the value of DESTDIR (defaults to "/").
What is the preferred way to tackle this?
Currently, this is a showstopper.
- Broken symbolic links with a non-default directory layout:
Letting polymake pick its directory structure, I get the following:
Code: Select all
$ ls -ilF work/stage/usr/local/lib/libpolymake*
269718 lrwxr-xr-x 1 root wheel 39 Jun 16 17:22 work/stage/usr/local/lib/libpolymake-apps-rt.so@ -> polymake/lib/libpolymake-apps-rt.so.4.4
271362 lrwxr-xr-x 1 root wheel 39 Jun 16 17:22 work/stage/usr/local/lib/libpolymake-apps-rt.so.4@ -> polymake/lib/libpolymake-apps-rt.so.4.4
265547 lrwxr-xr-x 1 root wheel 39 Jun 16 17:22 work/stage/usr/local/lib/libpolymake-apps-rt.so.4.4@ -> polymake/lib/libpolymake-apps-rt.so.4.4
270393 lrwxr-xr-x 1 root wheel 36 Jun 16 17:22 work/stage/usr/local/lib/libpolymake-apps.so@ -> polymake/lib/libpolymake-apps.so.4.4
269717 lrwxr-xr-x 1 root wheel 36 Jun 16 17:22 work/stage/usr/local/lib/libpolymake-apps.so.4@ -> polymake/lib/libpolymake-apps.so.4.4
265551 lrwxr-xr-x 1 root wheel 36 Jun 16 17:22 work/stage/usr/local/lib/libpolymake-apps.so.4.4@ -> polymake/lib/libpolymake-apps.so.4.4
271361 lrwxr-xr-x 1 root wheel 18 Jun 16 17:22 work/stage/usr/local/lib/libpolymake.so@ -> libpolymake.so.4.4
271278 lrwxr-xr-x 1 root wheel 18 Jun 16 17:22 work/stage/usr/local/lib/libpolymake.so.4@ -> libpolymake.so.4.4
271363 -r-xr-xr-x 1 root wheel 979936 Jun 16 17:22 work/stage/usr/local/lib/libpolymake.so.4.4*
$ ls -ilF work/stage/usr/local/lib/polymake/lib/libpolymake-apps*
265548 lrwxr-xr-x 1 root wheel 26 Jun 16 17:22 work/stage/usr/local/lib/polymake/lib/libpolymake-apps-rt.so@ -> libpolymake-apps-rt.so.4.4
265546 -r-xr-xr-x 1 root wheel 6656 Jun 16 17:21 work/stage/usr/local/lib/polymake/lib/libpolymake-apps-rt.so.4.4*
265552 lrwxr-xr-x 1 root wheel 23 Jun 16 17:22 work/stage/usr/local/lib/polymake/lib/libpolymake-apps.so@ -> libpolymake-apps.so.4.4
265550 -r-xr-xr-x 1 root wheel 880352 Jun 16 17:21 work/stage/usr/local/lib/polymake/lib/libpolymake-apps.so.4.4*
$
I'm calling the configure script with
Code: Select all
--prefix=${PREFIX} \
--exec-prefix=${PREFIX} \
--bindir=${PREFIX}/bin \
--includedir=${PREFIX}/include \
--libdir=${PREFIX}/lib \
--libexecdir=${PREFIX}/libexec/polymake \
--datadir=${PREFIX}/share/polymake \
--docdir=${DOCSDIR}
to conform with FreeBSD's directory structure. As a result I get:
Code: Select all
$ ls -ilF work/stage/usr/local/lib/libpolymake*
237294 lrwxr-xr-x 1 root wheel 26 Jun 17 16:16 work/stage/usr/local/lib/libpolymake-apps-rt.so@ -> libpolymake-apps-rt.so.4.4
237292 lrwxr-xr-x 1 root wheel 44 Jun 17 16:16 work/stage/usr/local/lib/libpolymake-apps-rt.so.4.4@ -> exec/polymake/lib/libpolymake-apps-rt.so.4.4
237298 lrwxr-xr-x 1 root wheel 23 Jun 17 16:16 work/stage/usr/local/lib/libpolymake-apps.so@ -> libpolymake-apps.so.4.4
237296 lrwxr-xr-x 1 root wheel 41 Jun 17 16:16 work/stage/usr/local/lib/libpolymake-apps.so.4.4@ -> exec/polymake/lib/libpolymake-apps.so.4.4
236848 lrwxr-xr-x 1 root wheel 18 Jun 17 16:16 work/stage/usr/local/lib/libpolymake.so@ -> libpolymake.so.4.4
234482 lrwxr-xr-x 1 root wheel 18 Jun 17 16:16 work/stage/usr/local/lib/libpolymake.so.4@ -> libpolymake.so.4.4
235122 -r-xr-xr-x 1 root wheel 1213184 Jun 17 16:16 work/stage/usr/local/lib/libpolymake.so.4.4*
$ ls -ilF work/stage/usr/local/libexec/polymake/lib/libpolymake-apps*
237293 lrwxr-xr-x 1 root wheel 26 Jun 17 16:16 work/stage/usr/local/libexec/polymake/lib/libpolymake-apps-rt.so@ -> libpolymake-apps-rt.so.4.4
237291 -r-xr-xr-x 1 root wheel 6656 Jun 17 16:16 work/stage/usr/local/libexec/polymake/lib/libpolymake-apps-rt.so.4.4*
237297 lrwxr-xr-x 1 root wheel 23 Jun 17 16:16 work/stage/usr/local/libexec/polymake/lib/libpolymake-apps.so@ -> libpolymake-apps.so.4.4
237295 -r-xr-xr-x 1 root wheel 880352 Jun 17 16:16 work/stage/usr/local/libexec/polymake/lib/libpolymake-apps.so.4.4*
$
Could this be a pattern matching problem?
The *.so.4 links are created in the port's Makefile, as FreeBSD needs these to register the shared library in the ldconfig hints file.
- File permissions:
This is just a question: Why does install.pl sets file permissions to 777? Wouldn't 644 (and 755 for executables) be sufficient?
Thanks in advance for any help!
Philipp