$OpenBSD: patch-Tools_qmake_mkspecs_features_functions_prf,v 1.1.1.1 2016/12/25 14:13:13 zhuk Exp $
Unbreak linking to static libraries by providing exact paths when possible.

Particular problem: system version of leveldb gets picked up due to madness in -L.
--- Tools/qmake/mkspecs/features/functions.prf.orig	Mon May 30 14:52:29 2016
+++ Tools/qmake/mkspecs/features/functions.prf	Sat Jul 30 00:00:45 2016
@@ -269,14 +269,13 @@ defineTest(linkAgainstLibrary) {
         mac {
             LIBS += -Wl,-force_load,$${path}$${QMAKE_DIR_SEP}lib$${target}.a
         } else:win32-msvc*|wince*|win32-icc {
+            LIBS += -L$$path
             LIBS += -l$$target
             QMAKE_LFLAGS += /OPT:REF
         } else {
             CONFIG *= no_smart_library_merge
-            LIBS += -Wl,-whole-archive -l$$target -Wl,-no-whole-archive
+            LIBS += -Wl,-whole-archive $${path}/$${QMAKE_PREFIX_STATICLIB}$${target}.$${QMAKE_EXTENSION_STATICLIB} -Wl,-no-whole-archive
         }
-
-        LIBS += -L$$path
 
         win32-msvc*|wince*|win32-icc {
             POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}$${target}.lib
