Date: Tue, 27 Sep 2016 07:08:19 +0000 (UTC) From: Raphael Kubo da Costa <rakuco@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r422803 - in head/www/webkit-qt5: . files Message-ID: <201609270708.u8R78JcH074381@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rakuco Date: Tue Sep 27 07:08:19 2016 New Revision: 422803 URL: https://svnweb.freebsd.org/changeset/ports/422803 Log: 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"). 2. 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 Added: head/www/webkit-qt5/files/patch-Source_WebCore_platform_leveldb_LevelDBDatabase.cpp (contents, props changed) head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_glx_glx.pro (contents, props changed) head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_leveldb_leveldb.cpp (contents, props changed) head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_leveldb_leveldb.pro (contents, props changed) head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_libXcomposite_libXcomposite.pro (contents, props changed) head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_libXrender_libXrender.pro (contents, props changed) Modified: head/www/webkit-qt5/Makefile Modified: head/www/webkit-qt5/Makefile ============================================================================== --- head/www/webkit-qt5/Makefile Tue Sep 27 06:47:11 2016 (r422802) +++ head/www/webkit-qt5/Makefile Tue Sep 27 07:08:19 2016 (r422803) @@ -2,7 +2,7 @@ PORTNAME= webkit DISTVERSION= ${QT5_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITE_SUBDIR= community_releases/${QT5_VERSION:R}/${QT5_VERSION}/ PKGNAMEPREFIX= qt5- @@ -12,6 +12,7 @@ COMMENT= Qt WebKit implementation LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \ libicui18n.so:devel/icu \ + libleveldb.so:databases/leveldb \ libpng.so:graphics/png \ libwebp.so:graphics/webp BUILD_DEPENDS= ${LOCALBASE}/bin/flex:textproc/flex Added: head/www/webkit-qt5/files/patch-Source_WebCore_platform_leveldb_LevelDBDatabase.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/webkit-qt5/files/patch-Source_WebCore_platform_leveldb_LevelDBDatabase.cpp Tue Sep 27 07:08:19 2016 (r422803) @@ -0,0 +1,13 @@ +databases/leveldb installs the memenv.h header into a different location. + +--- Source/WebCore/platform/leveldb/LevelDBDatabase.cpp.orig 2016-09-26 15:03:55 UTC ++++ Source/WebCore/platform/leveldb/LevelDBDatabase.cpp +@@ -38,7 +38,7 @@ + #include <leveldb/comparator.h> + #include <leveldb/db.h> + #include <leveldb/env.h> +-#include <helpers/memenv/memenv.h> ++#include <memenv/memenv.h> + #include <leveldb/slice.h> + #include <string> + #include <wtf/PassOwnPtr.h> Added: head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_glx_glx.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_glx_glx.pro Tue Sep 27 07:08:19 2016 (r422803) @@ -0,0 +1,13 @@ +Setting OBJECTS_DIR to "obj" causes problems with make(1), as "obj" is one of +the directories make tries to enter in case it exists (because of .OBJDIR). +Since qmake will create it because of OBJECTS_DIR, make will invoke the +compiler from there and fail because it's trying to pass "-o obj/foo.o" while +already in obj/. + +--- Tools/qmake/config.tests/glx/glx.pro.orig 2016-09-26 14:56:31 UTC ++++ Tools/qmake/config.tests/glx/glx.pro +@@ -1,4 +1,3 @@ + SOURCES = glx.cpp +-OBJECTS_DIR = obj + LIBS += -lX11 -lGL + Added: head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_leveldb_leveldb.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_leveldb_leveldb.cpp Tue Sep 27 07:08:19 2016 (r422803) @@ -0,0 +1,13 @@ +databases/leveldb installs the memenv.h header into a different location. + +--- Tools/qmake/config.tests/leveldb/leveldb.cpp.orig 2016-09-26 15:03:32 UTC ++++ Tools/qmake/config.tests/leveldb/leveldb.cpp +@@ -19,7 +19,7 @@ + + #include <leveldb/db.h> + #include <leveldb/env.h> +-#include <helpers/memenv/memenv.h> ++#include <memenv/memenv.h> + + int main(int, char**) + { Added: head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_leveldb_leveldb.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_leveldb_leveldb.pro Tue Sep 27 07:08:19 2016 (r422803) @@ -0,0 +1,14 @@ +Setting OBJECTS_DIR to "obj" causes problems with make(1), as "obj" is one of +the directories make tries to enter in case it exists (because of .OBJDIR). +Since qmake will create it because of OBJECTS_DIR, make will invoke the +compiler from there and fail because it's trying to pass "-o obj/foo.o" while +already in obj/. + +--- Tools/qmake/config.tests/leveldb/leveldb.pro.orig 2016-09-26 14:57:15 UTC ++++ Tools/qmake/config.tests/leveldb/leveldb.pro +@@ -1,5 +1,4 @@ + SOURCES = leveldb.cpp +-OBJECTS_DIR = obj + LIBS += -lleveldb -lmemenv + + load(qt_build_config) Added: head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_libXcomposite_libXcomposite.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_libXcomposite_libXcomposite.pro Tue Sep 27 07:08:19 2016 (r422803) @@ -0,0 +1,12 @@ +Setting OBJECTS_DIR to "obj" causes problems with make(1), as "obj" is one of +the directories make tries to enter in case it exists (because of .OBJDIR). +Since qmake will create it because of OBJECTS_DIR, make will invoke the +compiler from there and fail because it's trying to pass "-o obj/foo.o" while +already in obj/. + +--- Tools/qmake/config.tests/libXcomposite/libXcomposite.pro.orig 2016-09-26 14:56:58 UTC ++++ Tools/qmake/config.tests/libXcomposite/libXcomposite.pro +@@ -1,3 +1,2 @@ + SOURCES = libXcomposite.cpp +-OBJECTS_DIR = obj + LIBS += -lXcomposite -lX11 Added: head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_libXrender_libXrender.pro ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/webkit-qt5/files/patch-Tools_qmake_config.tests_libXrender_libXrender.pro Tue Sep 27 07:08:19 2016 (r422803) @@ -0,0 +1,12 @@ +Setting OBJECTS_DIR to "obj" causes problems with make(1), as "obj" is one of +the directories make tries to enter in case it exists (because of .OBJDIR). +Since qmake will create it because of OBJECTS_DIR, make will invoke the +compiler from there and fail because it's trying to pass "-o obj/foo.o" while +already in obj/. + +--- Tools/qmake/config.tests/libXrender/libXrender.pro.orig 2016-09-26 14:56:47 UTC ++++ Tools/qmake/config.tests/libXrender/libXrender.pro +@@ -1,3 +1,2 @@ + SOURCES = libXrender.cpp +-OBJECTS_DIR = obj + LIBS += -lXrender -lX11
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609270708.u8R78JcH074381>