HomeFreeBSD

Fix some configuration test failures and use the system LevelDB port

Description

Fix some configuration test failures and use the system LevelDB port

These are fixes for two separate issues (even though fixing the latter
depends on fixing the former), but they are being landed together to avoid
having to bump PORTREVISION twice.

  1. r411689 ("Drop USES=gmake") caused a regression where several configuration tests (glx, libXcomposite, libXrender and leveldb) were failing even though they should not. The .pro files for those tests all have "OBJECTS_DIR = obj", which causes qmake to create this subdirectory when generating the test's Makefile and put object files there. The problem is that make(1) always tries to cd into this directory (among others in case MAKEOBJDIRPREFIX or MAKEOBJDIR are set), so the compiler was being invoked like this:

    c++ -o obj/foo.o /path/to/foo.cpp

    from _within_ obj/ itself, causing the compiler to fail. Readding USES=gmake is an option, but it causes the build to take a lot longer, so the approach I ended up adopting is to patch the .pro files and remove the OBJECTS_DIR lines. Fixing this enables a few more graphics-related configuration options ("graphics_surface" and "glx").
  1. The port was always failing to build if databases/leveldb was installed. Because we were not depending on databases/leveldb and also because of the item above, we were always building WebKit's bundled LevelDB copy as a static library and linking it into libQt5WebKit.so. However, the way the linker was invoked was always causing the system-wide libleveldb.so to be used instead:

    c++ -o libQt5WebKit.so -Wl,-whole-archive -lleveldb -Wl,-no-whole-archive -L/path/to/static/leveldb [...]

    Since there is no reason to use a bundled dependency anyway, it is easier to just make the build use the system-wide LevelDB. Doing so does require some patching though, as the LevelDB port installs the memenv.h header into a location that differs from the one WebKit expects.

PR: 212859
Reviewed by: tcberner
MFH: 2016Q3

Details

Provenance
rakucoAuthored on
Reviewer
tcberner
Parents
rP422802: Loading this plugin causes your tests to fail if there any
Branches
Unknown
Tags
Unknown