aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2021-08-28 21:20:03 +0000
committerHiroki Sato <hrs@FreeBSD.org>2021-08-28 21:23:10 +0000
commitf81528f28eaf3f85e88b768ab408ec31dd621b25 (patch)
treedc3c803644804277ac0165025eb3baa39a68126a
parent54764895bab54e5886c5d9a6190a113bfa2f8b58 (diff)
downloadports-f81528f28eaf3f85e88b768ab408ec31dd621b25.tar.gz
ports-f81528f28eaf3f85e88b768ab408ec31dd621b25.zip
cad/klayout: update to 0.27.3
-rw-r--r--cad/klayout/Makefile59
-rw-r--r--cad/klayout/distinfo6
-rw-r--r--cad/klayout/files/patch-build.sh71
-rw-r--r--cad/klayout/files/patch-src-ant-ant-ant.pro9
-rw-r--r--cad/klayout/files/patch-src-ant-unit_tests-unit_tests.pro9
-rw-r--r--cad/klayout/files/patch-src-app.pri9
-rw-r--r--cad/klayout/files/patch-src-buddies-src-bd-bd.pro32
-rw-r--r--cad/klayout/files/patch-src-buddies-src-buddy_app.pri40
-rw-r--r--cad/klayout/files/patch-src-buddies-unit_tests-unit_tests.pro12
-rw-r--r--cad/klayout/files/patch-src-db-db-db.pro9
-rw-r--r--cad/klayout/files/patch-src-db-unit_tests-unit_tests.pro9
-rw-r--r--cad/klayout/files/patch-src-drc-drc-drc.pro9
-rw-r--r--cad/klayout/files/patch-src-drc-unit_tests-unit_tests.pro8
-rw-r--r--cad/klayout/files/patch-src-edt-edt-edt.pro9
-rw-r--r--cad/klayout/files/patch-src-edt-unit_tests-unit_tests.pro9
-rw-r--r--cad/klayout/files/patch-src-gsi-gsi-gsi.pro9
-rw-r--r--cad/klayout/files/patch-src-gsi-gsi_test-gsi_test.pro8
-rw-r--r--cad/klayout/files/patch-src-gsi-unit_tests-unit_tests.pro9
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt4-QtCore-QtCore.pro11
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt4-QtDesigner-QtDesigner.pro11
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt4-QtGui-QtGui.pro17
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt4-QtNetwork-QtNetwork.pro15
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt4-QtSql-QtSql.pro15
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt4-QtUiTools-QtUiTools.pro11
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt4-QtXml-QtXml.pro11
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt5-QtCore-QtCore.pro11
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt5-QtDesigner-QtDesigner.pro11
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt5-QtGui-QtGui.pro21
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt5-QtMultimedia-QtMultimedia.pro19
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt5-QtNetwork-QtNetwork.pro15
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt5-QtPrintSupport-QtPrintSupport.pro23
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt5-QtSql-QtSql.pro15
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt5-QtSvg-QtSvg.pro23
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt5-QtUiTools-QtUiTools.pro11
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt5-QtWidgets-QtWidgets.pro19
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt5-QtXml-QtXml.pro11
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qt5-QtXmlPatterns-QtXmlPatterns.pro15
-rw-r--r--cad/klayout/files/patch-src-gsiqt-qtbasic-qtbasic.pro11
-rw-r--r--cad/klayout/files/patch-src-img-img-img.pro9
-rw-r--r--cad/klayout/files/patch-src-img-unit_tests-unit_tests.pro9
-rw-r--r--cad/klayout/files/patch-src-klayout.pri25
-rw-r--r--cad/klayout/files/patch-src-klayout_main-klayout_main-klayout_main.pro53
-rw-r--r--cad/klayout/files/patch-src-klayout_main-tests-tests.pro9
-rw-r--r--cad/klayout/files/patch-src-lay-lay-lay.pro55
-rw-r--r--cad/klayout/files/patch-src-lay-lay-laySignalHandler.cc11
-rw-r--r--cad/klayout/files/patch-src-lay-lay-laySystemPaths.cc19
-rw-r--r--cad/klayout/files/patch-src-lay-unit_tests-unit_tests.pro9
-rw-r--r--cad/klayout/files/patch-src-laybasic-laybasic-layBrowserDialog.h10
-rw-r--r--cad/klayout/files/patch-src-laybasic-laybasic-laybasic.pro31
-rw-r--r--cad/klayout/files/patch-src-laybasic-unit_tests-unit_tests.pro9
-rw-r--r--cad/klayout/files/patch-src-lib-lib-lib.pro9
-rw-r--r--cad/klayout/files/patch-src-lib-unit_tests-unit_tests.pro9
-rw-r--r--cad/klayout/files/patch-src-lib.pri11
-rw-r--r--cad/klayout/files/patch-src-lvs-lvs-lvs.pro9
-rw-r--r--cad/klayout/files/patch-src-lvs-unit_tests-unit_tests.pro9
-rw-r--r--cad/klayout/files/patch-src-lym-lym-lym.pro30
-rw-r--r--cad/klayout/files/patch-src-lym-unit_tests-unit_tests.pro25
-rw-r--r--cad/klayout/files/patch-src-plugins-db_plugin.pri27
-rw-r--r--cad/klayout/files/patch-src-plugins-lay_plugin.pri27
-rw-r--r--cad/klayout/files/patch-src-plugins-plugins.pro10
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-cif-lay_plugin-lay_plugin.pro11
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-cif-unit_tests-unit_tests.pro14
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-dxf-lay_plugin-lay_plugin.pro11
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-dxf-unit_tests-unit_tests.pro14
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-gds2-lay_plugin-lay_plugin.pro11
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-gds2-unit_tests-unit_tests.pro14
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-lefdef-lay_plugin-lay_plugin.pro11
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-lefdef-unit_tests-unit_tests.pro14
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-magic-lay_plugin-lay_plugin.pro11
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-magic-unit_tests-unit_tests.pro14
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-oasis-lay_plugin-lay_plugin.pro11
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-oasis-unit_tests-unit_tests.pro14
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-pcb-lay_plugin-lay_plugin.pro11
-rw-r--r--cad/klayout/files/patch-src-plugins-streamers-pcb-unit_tests-unit_tests.pro14
-rw-r--r--cad/klayout/files/patch-src-plugins-tools-diff-lay_plugin-lay_plugin.pro11
-rw-r--r--cad/klayout/files/patch-src-plugins-tools-net_tracer-lay_plugin-lay_plugin.pro11
-rw-r--r--cad/klayout/files/patch-src-plugins-tools-net_tracer-unit_tests-unit_tests.pro15
-rw-r--r--cad/klayout/files/patch-src-plugins-tools-view_25d-lay_plugin-lay_plugin.pro11
-rw-r--r--cad/klayout/files/patch-src-plugins-tools-view_25d-unit_tests-unit_tests.pro14
-rw-r--r--cad/klayout/files/patch-src-plugins-tools-xor-lay_plugin-lay_plugin.pro11
-rw-r--r--cad/klayout/files/patch-src-pya-pya-pya.pro11
-rw-r--r--cad/klayout/files/patch-src-pya-unit_tests-unit_tests.pro9
-rw-r--r--cad/klayout/files/patch-src-pyastub-pyastub.pro11
-rw-r--r--cad/klayout/files/patch-src-pymod-QtCore-QtCore.pro13
-rw-r--r--cad/klayout/files/patch-src-pymod-QtDesigner-QtDesigner.pro8
-rw-r--r--cad/klayout/files/patch-src-pymod-QtGui-QtGui.pro14
-rw-r--r--cad/klayout/files/patch-src-pymod-QtMultimedia-QtMultimedia.pro8
-rw-r--r--cad/klayout/files/patch-src-pymod-QtNetwork-QtNetwork.pro8
-rw-r--r--cad/klayout/files/patch-src-pymod-QtPrintSupport-QtPrintSupport.pro8
-rw-r--r--cad/klayout/files/patch-src-pymod-QtSql-QtSql.pro8
-rw-r--r--cad/klayout/files/patch-src-pymod-QtSvg-QtSvg.pro8
-rw-r--r--cad/klayout/files/patch-src-pymod-QtUiTools-QtUiTools.pro11
-rw-r--r--cad/klayout/files/patch-src-pymod-QtWidgets-QtWidgets.pro8
-rw-r--r--cad/klayout/files/patch-src-pymod-QtXml-QtXml.pro17
-rw-r--r--cad/klayout/files/patch-src-pymod-QtXmlPatterns-QtXmlPatterns.pro8
-rw-r--r--cad/klayout/files/patch-src-pymod-bridge_sample-bridge_sample.pro17
-rw-r--r--cad/klayout/files/patch-src-pymod-db-db.pro9
-rw-r--r--cad/klayout/files/patch-src-pymod-lay-lay.pro9
-rw-r--r--cad/klayout/files/patch-src-pymod-pymod.pri45
-rw-r--r--cad/klayout/files/patch-src-pymod-rdb-rdb.pro8
-rw-r--r--cad/klayout/files/patch-src-pymod-tl-tl.pro35
-rw-r--r--cad/klayout/files/patch-src-pymod-unit_tests-unit_tests.pro8
-rw-r--r--cad/klayout/files/patch-src-rba-rba-rba.pro9
-rw-r--r--cad/klayout/files/patch-src-rba-unit_tests-unit_tests.pro11
-rw-r--r--cad/klayout/files/patch-src-rbastub-rbastub.pro9
-rw-r--r--cad/klayout/files/patch-src-rdb-rdb-rdb.pro9
-rw-r--r--cad/klayout/files/patch-src-rdb-unit_tests-unit_tests.pro9
-rw-r--r--cad/klayout/files/patch-src-tl-tl-tlStream.cc20
-rw-r--r--cad/klayout/files/patch-src-tl-unit_tests-unit_tests.pro9
-rw-r--r--cad/klayout/files/patch-src-unit_tests-unit_tests.pro28
-rw-r--r--cad/klayout/files/patch-src-with_all_libs.pri55
-rw-r--r--cad/klayout/pkg-plist365
112 files changed, 1918 insertions, 172 deletions
diff --git a/cad/klayout/Makefile b/cad/klayout/Makefile
index 41de80bbe590..e513a94a6c1d 100644
--- a/cad/klayout/Makefile
+++ b/cad/klayout/Makefile
@@ -1,11 +1,10 @@
PORTNAME= klayout
-PORTVERSION= 0.25.8
-PORTREVISION= 2
+PORTVERSION= 0.27.3
DISTVERSIONPREFIX= v
CATEGORIES= cad
MAINTAINER= hrs@FreeBSD.org
-COMMENT= Qt-based GDS2 Viewer
+COMMENT= Qt-based chip mask layout viewing and editing tool
LICENSE= GPLv2
@@ -22,32 +21,62 @@ USE_QT= core buildtools designer gui multimedia network printsupport \
qmake sql svg testlib widgets xml xmlpatterns
USE_LDCONFIG= yes
-CXXFLAGS+= -fPIC -I${LOCALBASE}/include/qt5
-LDFLAGS+= ${LIBS} -L${LOCALBASE}/lib/qt5 -lpthread
+CXXFLAGS+= -fPIC -I${LOCALBASE}/include/qt5 \
+ ${QT5MODULES:S,^,-I${LOCALBASE}/include/qt5/Qt,}
+LDFLAGS+= ${LIBS} ${QT5MODULES:S,^,-lQt5,} \
+ -L${LOCALBASE}/lib/qt5 -lpthread
QT5MODULES= Core Designer Gui Multimedia MultimediaWidgets \
Network PrintSupport Sql Svg Test Widgets Xml XmlPatterns
-.for M in ${QT5MODULES}
-CXXFLAGS+= -I${LOCALBASE}/include/qt5/Qt${M}
-LIBS+= -lQt5${M}
-.endfor
-MAKE_ENV= INSTALL_ROOT=${STAGEDIR}
+MAKE_ENV= INSTALLROOT=${STAGEDIR} \
+ PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR}
BUILD_WRKSRC= ${WRKSRC}/build-release
INSTALL_WRKSRC= ${WRKSRC}/build-release
+TEST_WRKSRC= ${WRKSRC}/build-release
do-configure:
cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} ${SH} build.sh \
-with-qtbinding \
-qt5 \
- -rpath ${LOCALBASE}/lib \
- -prefix ${PREFIX} \
+ -rpath "${PREFIX}/lib/klayout" \
+ -prefix "${PREFIX}" \
-python ${PYTHON_CMD} \
-ruby ${RUBY} \
-dry-run
+post-configure:
+ ${ECHO_CMD} "#define PLUGINS_BASEDIR \"${PREFIX}/lib/klayout\"" \
+ > ${WRKSRC}/src/lay/lay/laySystemPathsDefaults.h
+
+pre-install:
+ for D in lib db tl rdb pya; do \
+ ${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/klayout/$${D}; \
+ done
+ for D in db_plugins lay_plugins; do \
+ ${MKDIR} ${STAGEDIR}${PREFIX}/lib/klayout/$${D}; \
+ done
+
post-install:
- cd ${STAGEDIR}${PREFIX} && \
- ${MV} libklayout* ${STAGEDIR}${PREFIX}/lib && \
- ${MV} klayout strm* ${STAGEDIR}${PREFIX}/bin
+ cd ${INSTALL_WRKSRC} && \
+ ${STRIP_CMD} `${FIND} libklayout*so* -type f` && \
+ ${MV} libklayout*so* ${STAGEDIR}${PREFIX}/lib/klayout
+.for D in db_plugins lay_plugins
+ cd ${INSTALL_WRKSRC}/$D && \
+ ${STRIP_CMD} `${FIND} *so* -type f` && \
+ ${MV} *so* ${STAGEDIR}${PREFIX}/lib/klayout/$D
+.endfor
+ cd ${INSTALL_WRKSRC}/pymod && \
+ ${STRIP_CMD} `${FIND} lib*so* -type f` && \
+ ${MV} lib*so* ${STAGEDIR}${PREFIX}/lib/klayout
+ cd ${STAGEDIR}${PYTHON_SITELIBDIR}/klayout && \
+ ${STRIP_CMD} `${FIND} *.so -type f`
+ cd ${INSTALL_WRKSRC} && \
+ ${INSTALL_PROGRAM} klayout strm* ${STAGEDIR}${PREFIX}/bin
+
+do-test:
+ cd ${TEST_WRKSRC} && \
+ ${SETENV} QT_QPA_PLATFORM=offscreen TESTTMP=testtmp TESTSRC=.. \
+ LD_LIBRARY_PATH=${STAGEDIR}${PREFIX}/lib/klayout/db_plugins:${STAGEDIR}${PREFIX}/lib/klayout/lay_plugins \
+ ./ut_runner
.include <bsd.port.mk>
diff --git a/cad/klayout/distinfo b/cad/klayout/distinfo
index 3acbfd113ca4..3e03d3a59f2c 100644
--- a/cad/klayout/distinfo
+++ b/cad/klayout/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1552658839
-SHA256 (KLayout-klayout-v0.25.8_GH0.tar.gz) = 63372bda3ed825552e01f505a3c979431f0485300183c38ebceb864451c24cbe
-SIZE (KLayout-klayout-v0.25.8_GH0.tar.gz) = 21009736
+TIMESTAMP = 1629922499
+SHA256 (KLayout-klayout-v0.27.3_GH0.tar.gz) = 8c21e6898db5285bf75e65f9a74724564e3419cd76a35bfc53dde3944827017a
+SIZE (KLayout-klayout-v0.27.3_GH0.tar.gz) = 57274694
diff --git a/cad/klayout/files/patch-build.sh b/cad/klayout/files/patch-build.sh
index 8979b3f04bfc..d899e68e1a71 100644
--- a/cad/klayout/files/patch-build.sh
+++ b/cad/klayout/files/patch-build.sh
@@ -1,6 +1,6 @@
---- build.sh.orig 2019-02-23 17:34:47 UTC
+--- build.sh.orig 2021-07-23 08:00:26 UTC
+++ build.sh
-@@ -482,7 +482,7 @@ echo " Build directory: $BUILD"
+@@ -576,7 +576,7 @@ echo " Build directory: $BUILD"
mkdir -p $BUILD
# source the version script
@@ -9,7 +9,7 @@
# qmake needs absolute paths, so we get them now:
# OSX does not have `readlink -f` command. Use equivalent Perl script.
-@@ -495,11 +495,7 @@ else
+@@ -589,11 +589,7 @@ else
fi
if [ "$IS_MAC" = "no" ]; then
@@ -21,7 +21,7 @@
else
MAKE_PRG=make
fi
-@@ -521,9 +517,9 @@ cd $BUILD
+@@ -615,9 +611,9 @@ cd $BUILD
# chose the right qmake
if [ $HAVE_QT5 = 0 ]; then
@@ -33,28 +33,38 @@
fi
$QMAKE -v
-@@ -531,54 +527,55 @@ $QMAKE -v
+@@ -625,82 +621,85 @@ $QMAKE -v
# Force a minimum rebuild because of version info
touch $CURR_DIR/src/version/version.h
-qmake_options=(
-+## XXX
-+## CONFIG=\"$CONFIG\"
++# XXX
++# CONFIG=\"$CONFIG\"
+qmake_options="
-recursive
- CONFIG+="$CONFIG"
- RUBYLIBFILE="$RUBYLIBFILE"
-- RUBYINCLUDE="$RUBYINCLUDE"
-- RUBYINCLUDE2="$RUBYINCLUDE2"
- RUBYVERSIONCODE="$RUBYVERSIONCODE"
- HAVE_RUBY="$HAVE_RUBY"
+- PYTHON="$PYTHON"
- PYTHONLIBFILE="$PYTHONLIBFILE"
- PYTHONINCLUDE="$PYTHONINCLUDE"
+- PYTHONEXTSUFFIX="$PYTHONEXTSUFFIX"
- HAVE_PYTHON="$HAVE_PYTHON"
- HAVE_QTBINDINGS="$HAVE_QTBINDINGS"
+- HAVE_QT_UITOOLS="$HAVE_QT_UITOOLS"
+- HAVE_QT_NETWORK="$HAVE_QT_NETWORK"
+- HAVE_QT_SQL="$HAVE_QT_SQL"
+- HAVE_QT_SVG="$HAVE_QT_SVG"
+- HAVE_QT_PRINTSUPPORT="$HAVE_QT_PRINTSUPPORT"
+- HAVE_QT_MULTIMEDIA="$HAVE_QT_MULTIMEDIA"
+- HAVE_QT_DESIGNER="$HAVE_QT_DESIGNER"
+- HAVE_QT_XML="$HAVE_QT_XML"
- HAVE_64BIT_COORD="$HAVE_64BIT_COORD"
+- HAVE_QT="$HAVE_QT"
- HAVE_QT5="$HAVE_QT5"
- HAVE_CURL="$HAVE_CURL"
+- HAVE_EXPAT="$HAVE_EXPAT"
- PREFIX="$BIN"
- RPATH="$RPATH"
- KLAYOUT_VERSION="$KLAYOUT_VERSION"
@@ -62,17 +72,27 @@
- KLAYOUT_VERSION_REV="$KLAYOUT_VERSION_REV"
-)
+ RUBYLIBFILE=\"$RUBYLIBFILE\"
-+ RUBYINCLUDE=\"$RUBYINCLUDE\"
-+ RUBYINCLUDE2=\"$RUBYINCLUDE2\"
+ RUBYVERSIONCODE=\"$RUBYVERSIONCODE\"
+ HAVE_RUBY=\"$HAVE_RUBY\"
++ PYTHON=\"$PYTHON\"
+ PYTHONLIBFILE=\"$PYTHONLIBFILE\"
+ PYTHONINCLUDE=\"$PYTHONINCLUDE\"
++ PYTHONEXTSUFFIX=\"$PYTHONEXTSUFFIX\"
+ HAVE_PYTHON=\"$HAVE_PYTHON\"
+ HAVE_QTBINDINGS=\"$HAVE_QTBINDINGS\"
++ HAVE_QT_UITOOLS=\"$HAVE_QT_UITOOLS\"
++ HAVE_QT_NETWORK=\"$HAVE_QT_NETWORK\"
++ HAVE_QT_SQL=\"$HAVE_QT_SQL\"
++ HAVE_QT_SVG=\"$HAVE_QT_SVG\"
++ HAVE_QT_PRINTSUPPORT=\"$HAVE_QT_PRINTSUPPORT\"
++ HAVE_QT_MULTIMEDIA=\"$HAVE_QT_MULTIMEDIA\"
++ HAVE_QT_DESIGNER=\"$HAVE_QT_DESIGNER\"
++ HAVE_QT_XML=\"$HAVE_QT_XML\"
+ HAVE_64BIT_COORD=\"$HAVE_64BIT_COORD\"
++ HAVE_QT=\"$HAVE_QT\"
+ HAVE_QT5=\"$HAVE_QT5\"
+ HAVE_CURL=\"$HAVE_CURL\"
++ HAVE_EXPAT=\"$HAVE_EXPAT\"
+ PREFIX=\"$BIN\"
+ RPATH=\"$RPATH\"
+ KLAYOUT_VERSION=\"$KLAYOUT_VERSION\"
@@ -80,6 +100,29 @@
+ KLAYOUT_VERSION_REV=\"$KLAYOUT_VERSION_REV\"
+"
+ # NOTE: qmake does not like include paths which clash with paths built into the compiler
+ # hence we don't add RUBYINCLUDE or RUBYINCLUDE2 in this case (found on CentOS 8 where Ruby
+ # headers are installed in /usr/include)
+ if [ "$RUBYINCLUDE" != "/usr/include" ] && [ "$RUBYINCLUDE" != "/usr/local/include" ]; then
+- qmake_options+=( RUBYINCLUDE="$RUBYINCLUDE" )
++ qmake_options="$qmake_options RUBYINCLUDE=\"$RUBYINCLUDE\""
+ fi
+ if [ "$RUBYINCLUDE2" != "/usr/include" ] && [ "$RUBYINCLUDE2" != "/usr/local/include" ]; then
+- qmake_options+=( RUBYINCLUDE2="$RUBYINCLUDE2" )
++ qmake_options="$qmake_options RUBYINCLUDE2=\"$RUBYINCLUDE2\""
+ fi
+
+ # This should speed up build time considerably
+ # https://ortogonal.github.io/ccache-and-qmake-qtcreator/
+ if [ "$QMAKE_CCACHE" = 1 ]; then
+- qmake_options+=(
+- CONFIG+="ccache"
+- )
++ qmake_options="$qmake_options
++ CONFIG+=\"ccache\"
++ "
+ fi
+
if [ $BUILD_EXPERT = 1 ]; then
- qmake_options+=(
- QMAKE_AR="$AR cqs"
@@ -119,8 +162,10 @@
-echo $QMAKE "$CURR_DIR/src/klayout.pro" "${qmake_options[@]}"
-$QMAKE "$CURR_DIR/src/klayout.pro" "${qmake_options[@]}"
-+echo $QMAKE "$CURR_DIR/src/klayout.pro" ${qmake_options} QMAKE_CFLAGS="$CFLAGS"
-+$QMAKE "$CURR_DIR/src/klayout.pro" ${qmake_options} QMAKE_CXXFLAGS="$CXXFLAGS" QMAKE_CFLAGS="$CFLAGS" QMAKE_LFLAGS="$LDFLAGS"
++echo $QMAKE "$CURR_DIR/src/klayout.pro" ${qmake_options} \
++ QMAKE_CXXFLAGS="$CXXFLAGS" QMAKE_CFLAGS="$CFLAGS" QMAKE_LFLAGS="$LDFLAGS"
++$QMAKE "$CURR_DIR/src/klayout.pro" ${qmake_options} \
++ QMAKE_CXXFLAGS="$CXXFLAGS" QMAKE_CFLAGS="$CFLAGS" QMAKE_LFLAGS="$LDFLAGS"
cd $CURR_DIR
echo ""
diff --git a/cad/klayout/files/patch-src-ant-ant-ant.pro b/cad/klayout/files/patch-src-ant-ant-ant.pro
new file mode 100644
index 000000000000..5b49f9566830
--- /dev/null
+++ b/cad/klayout/files/patch-src-ant-ant-ant.pro
@@ -0,0 +1,9 @@
+--- src/ant/ant/ant.pro.orig 2021-08-28 17:19:48 UTC
++++ src/ant/ant/ant.pro
+@@ -37,5 +37,5 @@ SOURCES = \
+
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$LAYBASIC_INC $$DB_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$LAYBASIC_INC $$DB_INC
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_laybasic -lklayout_db
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_laybasic.so $$DESTDIR/libklayout_db.so
+
diff --git a/cad/klayout/files/patch-src-ant-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-ant-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..dc522ea67561
--- /dev/null
+++ b/cad/klayout/files/patch-src-ant-unit_tests-unit_tests.pro
@@ -0,0 +1,9 @@
+--- src/ant/unit_tests/unit_tests.pro.orig 2021-08-28 17:19:11 UTC
++++ src/ant/unit_tests/unit_tests.pro
+@@ -12,5 +12,5 @@ SOURCES = \
+ INCLUDEPATH += $$ANT_INC $$TL_INC $$LAYBASIC_INC $$DB_INC $$GSI_INC
+ DEPENDPATH += $$ANT_INC $$TL_INC $$LAYBASIC_INC $$DB_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_ant -lklayout_laybasic -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_ant.so $$DESTDIR_UT/libklayout_laybasic.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-app.pri b/cad/klayout/files/patch-src-app.pri
new file mode 100644
index 000000000000..47203de7360c
--- /dev/null
+++ b/cad/klayout/files/patch-src-app.pri
@@ -0,0 +1,9 @@
+--- src/app.pri.orig 2021-08-27 07:30:18 UTC
++++ src/app.pri
+@@ -1,5 +1,5 @@
+
+ TEMPLATE = app
+
+-target.path = $$PREFIX
++target.path = $$shell_path($(INSTALLROOT)$$PREFIX/bin)
+ INSTALLS += target
diff --git a/cad/klayout/files/patch-src-buddies-src-bd-bd.pro b/cad/klayout/files/patch-src-buddies-src-bd-bd.pro
new file mode 100644
index 000000000000..26d2620e8a3a
--- /dev/null
+++ b/cad/klayout/files/patch-src-buddies-src-bd-bd.pro
@@ -0,0 +1,32 @@
+--- src/buddies/src/bd/bd.pro.orig 2021-08-28 16:26:18 UTC
++++ src/buddies/src/bd/bd.pro
+@@ -34,24 +34,24 @@ RESOURCES = \
+
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$VERSION_INC $$DB_INC $$LIB_INC $$RDB_INC $$LYM_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$VERSION_INC $$DB_INC $$LIB_INC $$RDB_INC $$LYM_INC
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_db -lklayout_gsi -lklayout_lib -lklayout_rdb -lklayout_lym
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_db.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_lib.so $$DESTDIR/libklayout_rdb.so $$DESTDIR/libklayout_lym.so
+
+ INCLUDEPATH += $$RBA_INC
+ DEPENDPATH += $$RBA_INC
+
+ equals(HAVE_RUBY, "1") {
+- LIBS += -lklayout_rba
++ LIBS += $$DESTDIR/libklayout_rba.so
+ } else {
+- LIBS += -lklayout_rbastub
++ LIBS += $$DESTDIR/libklayout_rbastub.so
+ }
+
+ INCLUDEPATH += $$PYA_INC
+ DEPENDPATH += $$PYA_INC
+
+ equals(HAVE_PYTHON, "1") {
+- LIBS += -lklayout_pya
++ LIBS += $$DESTDIR/libklayout_pya.so
+ } else {
+- LIBS += -lklayout_pyastub
++ LIBS += $$DESTDIR/libklayout_pyastub.so
+ }
+
+
diff --git a/cad/klayout/files/patch-src-buddies-src-buddy_app.pri b/cad/klayout/files/patch-src-buddies-src-buddy_app.pri
new file mode 100644
index 000000000000..c307d494d17d
--- /dev/null
+++ b/cad/klayout/files/patch-src-buddies-src-buddy_app.pri
@@ -0,0 +1,40 @@
+--- src/buddies/src/buddy_app.pri.orig 2021-07-23 08:00:26 UTC
++++ src/buddies/src/buddy_app.pri
+@@ -19,31 +19,31 @@ SOURCES = $$PWD/bd/main.cc
+
+ INCLUDEPATH += $$BD_INC $$TL_INC $$GSI_INC
+ DEPENDPATH += $$BD_INC $$TL_INC $$GSI_INC
+-LIBS += -L$$DESTDIR -lklayout_bd -lklayout_db -lklayout_tl -lklayout_gsi -lklayout_lib -lklayout_rdb -lklayout_lym
++LIBS += $$DESTDIR/libklayout_bd.so $$DESTDIR/libklayout_db.so $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_lib.so $$DESTDIR/libklayout_rdb.so $$DESTDIR/libklayout_lym.so
+
+ INCLUDEPATH += $$RBA_INC
+ DEPENDPATH += $$RBA_INC
+
+ equals(HAVE_RUBY, "1") {
+- LIBS += -lklayout_rba
++ LIBS += $$DESTDIR/libklayout_rba.so
+ } else {
+- LIBS += -lklayout_rbastub
++ LIBS += $$DESTDIR/libklayout_rbastub.so
+ }
+
+ INCLUDEPATH += $$PYA_INC
+ DEPENDPATH += $$PYA_INC
+
+ equals(HAVE_PYTHON, "1") {
+- LIBS += -lklayout_pya
++ LIBS += $$DESTDIR/libklayout_pya.so
+ } else {
+- LIBS += -lklayout_pyastub
++ LIBS += $$DESTDIR/libklayout_pyastub.so
+ }
+
+ DEFINES += BD_TARGET=$$TARGET
+
+ LIBS += $$RUBYLIBFILE
+
+-if(mac|linux*) {
++if(mac|linux*|*bsd*) {
+ LIBS += -ldl
+ }
+
diff --git a/cad/klayout/files/patch-src-buddies-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-buddies-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..570721cd013f
--- /dev/null
+++ b/cad/klayout/files/patch-src-buddies-unit_tests-unit_tests.pro
@@ -0,0 +1,12 @@
+--- src/buddies/unit_tests/unit_tests.pro.orig 2021-07-23 08:00:26 UTC
++++ src/buddies/unit_tests/unit_tests.pro
+@@ -27,4 +27,8 @@ SOURCES += \
+ INCLUDEPATH += $$BD_INC $$DB_INC $$TL_INC $$GSI_INC $$RBA_INC
+ DEPENDPATH += $$BD_INC $$DB_INC $$TL_INC $$GSI_INC $$RBA_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_bd -lklayout_db -lklayout_tl -lklayout_gsi -l$$RBA_LIB
++LIBS += $$DESTDIR_UT/libklayout_bd.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
++
++!isEmpty(RBA_LIB) {
++ LIBS += $$DESTDIR_UT/lib$${RBA_LIB}.so
++}
diff --git a/cad/klayout/files/patch-src-db-db-db.pro b/cad/klayout/files/patch-src-db-db-db.pro
new file mode 100644
index 000000000000..c1a123f34822
--- /dev/null
+++ b/cad/klayout/files/patch-src-db-db-db.pro
@@ -0,0 +1,9 @@
+--- src/db/db/db.pro.orig 2021-08-28 16:45:43 UTC
++++ src/db/db/db.pro
+@@ -395,5 +395,5 @@ HEADERS = \
+
+ INCLUDEPATH += $$TL_INC $$GSI_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-db-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-db-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..4179a0463d6e
--- /dev/null
+++ b/cad/klayout/files/patch-src-db-unit_tests-unit_tests.pro
@@ -0,0 +1,9 @@
+--- src/db/unit_tests/unit_tests.pro.orig 2021-08-28 17:26:04 UTC
++++ src/db/unit_tests/unit_tests.pro
+@@ -87,5 +87,5 @@ SOURCES = \
+ INCLUDEPATH += $$TL_INC $$DB_INC $$GSI_INC
+ DEPENDPATH += $$TL_INC $$DB_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-drc-drc-drc.pro b/cad/klayout/files/patch-src-drc-drc-drc.pro
new file mode 100644
index 000000000000..da35391f9019
--- /dev/null
+++ b/cad/klayout/files/patch-src-drc-drc-drc.pro
@@ -0,0 +1,9 @@
+--- src/drc/drc/drc.pro.orig 2021-08-28 17:01:48 UTC
++++ src/drc/drc/drc.pro
+@@ -18,5 +18,5 @@ RESOURCES = \
+
+ INCLUDEPATH += $$TL_INC $$DB_INC $$GSI_INC $$LYM_INC $$RDB_INC
+ DEPENDPATH += $$TL_INC $$DB_INC $$GSI_INC $$LYM_INC $$RDB_INC
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_db -lklayout_gsi -lklayout_lym -lklayout_rdb
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_db.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_lym.so $$DESTDIR/libklayout_rdb.so
+
diff --git a/cad/klayout/files/patch-src-drc-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-drc-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..2b53df079016
--- /dev/null
+++ b/cad/klayout/files/patch-src-drc-unit_tests-unit_tests.pro
@@ -0,0 +1,8 @@
+--- src/drc/unit_tests/unit_tests.pro.orig 2021-08-28 17:02:21 UTC
++++ src/drc/unit_tests/unit_tests.pro
+@@ -15,4 +15,4 @@ SOURCES = \
+ INCLUDEPATH += $$DRC_INC $$TL_INC $$RDB_INC $$DB_INC $$GSI_INC $$LYM_INC
+ DEPENDPATH += $$DRC_INC $$TL_INC $$RDB_INC $$DB_INC $$GSI_INC $$LYM_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_drc -lklayout_rdb -lklayout_db -lklayout_tl -lklayout_gsi -lklayout_lym
++LIBS += $$DESTDIR_UT/libklayout_drc.so $$DESTDIR_UT/libklayout_rdb.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so $$DESTDIR_UT/libklayout_lym.so
diff --git a/cad/klayout/files/patch-src-edt-edt-edt.pro b/cad/klayout/files/patch-src-edt-edt-edt.pro
new file mode 100644
index 000000000000..0060a03db527
--- /dev/null
+++ b/cad/klayout/files/patch-src-edt-edt-edt.pro
@@ -0,0 +1,9 @@
+--- src/edt/edt/edt.pro.orig 2021-08-28 16:59:48 UTC
++++ src/edt/edt/edt.pro
+@@ -71,5 +71,5 @@ DEPENDPATH += $$TL_INC $$GSI_INC $$LAYBASIC_INC $$DB_I
+ INCLUDEPATH += $$DESTDIR/laybasic/laybasic
+ DEPENDPATH += $$DESTDIR/laybasic/laybasic
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_laybasic -lklayout_db
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_laybasic.so $$DESTDIR/libklayout_db.so
+
diff --git a/cad/klayout/files/patch-src-edt-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-edt-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..4118adc1ad39
--- /dev/null
+++ b/cad/klayout/files/patch-src-edt-unit_tests-unit_tests.pro
@@ -0,0 +1,9 @@
+--- src/edt/unit_tests/unit_tests.pro.orig 2021-08-28 16:59:05 UTC
++++ src/edt/unit_tests/unit_tests.pro
+@@ -13,5 +13,5 @@ SOURCES = \
+ INCLUDEPATH += $$EDT_INC $$TL_INC $$LAYBASIC_INC $$DB_INC $$GSI_INC
+ DEPENDPATH += $$EDT_INC $$TL_INC $$LAYBASIC_INC $$DB_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_edt -lklayout_laybasic -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_edt.so $$DESTDIR_UT/libklayout_laybasic.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-gsi-gsi-gsi.pro b/cad/klayout/files/patch-src-gsi-gsi-gsi.pro
new file mode 100644
index 000000000000..d08d24f9a5ae
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsi-gsi-gsi.pro
@@ -0,0 +1,9 @@
+--- src/gsi/gsi/gsi.pro.orig 2021-08-28 17:25:20 UTC
++++ src/gsi/gsi/gsi.pro
+@@ -51,5 +51,5 @@ SOURCES += gsiDeclTl.cc
+
+ INCLUDEPATH += $$TL_INC
+ DEPENDPATH += $$TL_INC
+-LIBS += -L$$DESTDIR -lklayout_tl
++LIBS += $$DESTDIR/libklayout_tl.so
+
diff --git a/cad/klayout/files/patch-src-gsi-gsi_test-gsi_test.pro b/cad/klayout/files/patch-src-gsi-gsi_test-gsi_test.pro
new file mode 100644
index 000000000000..85e056ef931c
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsi-gsi_test-gsi_test.pro
@@ -0,0 +1,8 @@
+--- src/gsi/gsi_test/gsi_test.pro.orig 2021-08-28 17:03:04 UTC
++++ src/gsi/gsi_test/gsi_test.pro
+@@ -18,4 +18,4 @@ HEADERS = \
+
+ INCLUDEPATH += $$TL_INC $$GSI_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so
diff --git a/cad/klayout/files/patch-src-gsi-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-gsi-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..cc11f32e7264
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsi-unit_tests-unit_tests.pro
@@ -0,0 +1,9 @@
+--- src/gsi/unit_tests/unit_tests.pro.orig 2021-08-28 17:03:32 UTC
++++ src/gsi/unit_tests/unit_tests.pro
+@@ -14,5 +14,5 @@ HEADERS += \
+ INCLUDEPATH += $$TL_INC $$GSI_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qt4-QtCore-QtCore.pro b/cad/klayout/files/patch-src-gsiqt-qt4-QtCore-QtCore.pro
new file mode 100644
index 000000000000..02d5670274aa
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt4-QtCore-QtCore.pro
@@ -0,0 +1,11 @@
+--- src/gsiqt/qt4/QtCore/QtCore.pro.orig 2021-08-28 16:41:29 UTC
++++ src/gsiqt/qt4/QtCore/QtCore.pro
+@@ -11,7 +11,7 @@ DEFINES += MAKE_GSI_QTCORE_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ SOURCES += \
+ gsiDeclQtCoreAdd.cc
diff --git a/cad/klayout/files/patch-src-gsiqt-qt4-QtDesigner-QtDesigner.pro b/cad/klayout/files/patch-src-gsiqt-qt4-QtDesigner-QtDesigner.pro
new file mode 100644
index 000000000000..806822847a15
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt4-QtDesigner-QtDesigner.pro
@@ -0,0 +1,11 @@
+--- src/gsiqt/qt4/QtDesigner/QtDesigner.pro.orig 2021-08-28 16:41:02 UTC
++++ src/gsiqt/qt4/QtDesigner/QtDesigner.pro
+@@ -10,7 +10,7 @@ DEFINES += MAKE_GSI_QTDESIGNER_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ SOURCES += \
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qt4-QtGui-QtGui.pro b/cad/klayout/files/patch-src-gsiqt-qt4-QtGui-QtGui.pro
new file mode 100644
index 000000000000..2dfebd8b9d5f
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt4-QtGui-QtGui.pro
@@ -0,0 +1,17 @@
+--- src/gsiqt/qt4/QtGui/QtGui.pro.orig 2021-08-28 16:43:12 UTC
++++ src/gsiqt/qt4/QtGui/QtGui.pro
+@@ -10,12 +10,12 @@ DEFINES += MAKE_GSI_QTGUI_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ # there are some bridges between db and Qt, hence this:
+ INCLUDEPATH += $$DB_INC
+ DEPENDPATH += $$DB_INC
+-LIBS += -lklayout_db
++LIBS += $$DESTDIR/libklayout_db.so
+
+ SOURCES += \
+ gsiDeclQtGuiAdd.cc
diff --git a/cad/klayout/files/patch-src-gsiqt-qt4-QtNetwork-QtNetwork.pro b/cad/klayout/files/patch-src-gsiqt-qt4-QtNetwork-QtNetwork.pro
new file mode 100644
index 000000000000..9f7ba4d261e8
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt4-QtNetwork-QtNetwork.pro
@@ -0,0 +1,15 @@
+--- src/gsiqt/qt4/QtNetwork/QtNetwork.pro.orig 2021-08-28 16:42:40 UTC
++++ src/gsiqt/qt4/QtNetwork/QtNetwork.pro
+@@ -10,10 +10,10 @@ DEFINES += MAKE_GSI_QTNETWORK_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ # because QQbject is used as base class for many classes, we need this:
+-LIBS += -lklayout_QtCore
++LIBS += $$DESTDIR/libklayout_QtCore.so
+
+ SOURCES += \
+ gsiDeclQtNetworkAdd.cc
diff --git a/cad/klayout/files/patch-src-gsiqt-qt4-QtSql-QtSql.pro b/cad/klayout/files/patch-src-gsiqt-qt4-QtSql-QtSql.pro
new file mode 100644
index 000000000000..edcf6c64f6a3
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt4-QtSql-QtSql.pro
@@ -0,0 +1,15 @@
+--- src/gsiqt/qt4/QtSql/QtSql.pro.orig 2021-08-28 16:41:59 UTC
++++ src/gsiqt/qt4/QtSql/QtSql.pro
+@@ -10,10 +10,10 @@ DEFINES += MAKE_GSI_QTSQL_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ # because QAsbtractTableModel is used as base class, we need this:
+-LIBS += -lklayout_QtCore
++LIBS += $$DESTDIR/libklayout_QtCore.so
+
+ SOURCES += \
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qt4-QtUiTools-QtUiTools.pro b/cad/klayout/files/patch-src-gsiqt-qt4-QtUiTools-QtUiTools.pro
new file mode 100644
index 000000000000..4457acda9d11
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt4-QtUiTools-QtUiTools.pro
@@ -0,0 +1,11 @@
+--- src/gsiqt/qt4/QtUiTools/QtUiTools.pro.orig 2021-08-28 16:40:31 UTC
++++ src/gsiqt/qt4/QtUiTools/QtUiTools.pro
+@@ -10,7 +10,7 @@ DEFINES += MAKE_GSI_QTUITOOLS_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ SOURCES += \
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qt4-QtXml-QtXml.pro b/cad/klayout/files/patch-src-gsiqt-qt4-QtXml-QtXml.pro
new file mode 100644
index 000000000000..49591e14c41b
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt4-QtXml-QtXml.pro
@@ -0,0 +1,11 @@
+--- src/gsiqt/qt4/QtXml/QtXml.pro.orig 2021-08-28 16:39:58 UTC
++++ src/gsiqt/qt4/QtXml/QtXml.pro
+@@ -10,7 +10,7 @@ DEFINES += MAKE_GSI_QTXML_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ SOURCES += \
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qt5-QtCore-QtCore.pro b/cad/klayout/files/patch-src-gsiqt-qt5-QtCore-QtCore.pro
new file mode 100644
index 000000000000..53184bdf2d51
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt5-QtCore-QtCore.pro
@@ -0,0 +1,11 @@
+--- src/gsiqt/qt5/QtCore/QtCore.pro.orig 2021-08-28 16:29:54 UTC
++++ src/gsiqt/qt5/QtCore/QtCore.pro
+@@ -11,7 +11,7 @@ DEFINES += MAKE_GSI_QTCORE_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ SOURCES += \
+ gsiDeclQtCoreAdd.cc
diff --git a/cad/klayout/files/patch-src-gsiqt-qt5-QtDesigner-QtDesigner.pro b/cad/klayout/files/patch-src-gsiqt-qt5-QtDesigner-QtDesigner.pro
new file mode 100644
index 000000000000..ba456452cee8
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt5-QtDesigner-QtDesigner.pro
@@ -0,0 +1,11 @@
+--- src/gsiqt/qt5/QtDesigner/QtDesigner.pro.orig 2021-08-28 17:27:01 UTC
++++ src/gsiqt/qt5/QtDesigner/QtDesigner.pro
+@@ -10,7 +10,7 @@ DEFINES += MAKE_GSI_QTDESIGNER_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ SOURCES += \
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qt5-QtGui-QtGui.pro b/cad/klayout/files/patch-src-gsiqt-qt5-QtGui-QtGui.pro
new file mode 100644
index 000000000000..b7cf76160e64
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt5-QtGui-QtGui.pro
@@ -0,0 +1,21 @@
+--- src/gsiqt/qt5/QtGui/QtGui.pro.orig 2021-08-28 16:33:45 UTC
++++ src/gsiqt/qt5/QtGui/QtGui.pro
+@@ -10,15 +10,15 @@ DEFINES += MAKE_GSI_QTGUI_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ # there are some bridges between db and Qt, hence this:
+ INCLUDEPATH += $$DB_INC
+ DEPENDPATH += $$DB_INC
+-LIBS += -lklayout_db
++LIBS += $$DESTDIR/libklayout_db.so
+
+ # because QQbject is used as base class for many classes, we need this:
+-LIBS += -lklayout_QtCore
++LIBS += $$DESTDIR/libklayout_QtCore.so
+
+ SOURCES += \
+ gsiDeclQtGuiAdd.cc
diff --git a/cad/klayout/files/patch-src-gsiqt-qt5-QtMultimedia-QtMultimedia.pro b/cad/klayout/files/patch-src-gsiqt-qt5-QtMultimedia-QtMultimedia.pro
new file mode 100644
index 000000000000..c0b0db205b7e
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt5-QtMultimedia-QtMultimedia.pro
@@ -0,0 +1,19 @@
+--- src/gsiqt/qt5/QtMultimedia/QtMultimedia.pro.orig 2021-08-28 16:38:53 UTC
++++ src/gsiqt/qt5/QtMultimedia/QtMultimedia.pro
+@@ -10,13 +10,13 @@ DEFINES += MAKE_GSI_QTMULTIMEDIA_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ # because QQbject is used as base class for many classes, we need this:
+-LIBS += -lklayout_QtCore
++LIBS += $$DESTDIR/libklayout_QtCore.so
+
+ # because QWidget is used for some UI stuff, we need this:
+-LIBS += -lklayout_QtWidgets
++LIBS += $$DESTDIR/libklayout_QtWidgets.so
+
+ SOURCES += \
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qt5-QtNetwork-QtNetwork.pro b/cad/klayout/files/patch-src-gsiqt-qt5-QtNetwork-QtNetwork.pro
new file mode 100644
index 000000000000..4336d7be56a7
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt5-QtNetwork-QtNetwork.pro
@@ -0,0 +1,15 @@
+--- src/gsiqt/qt5/QtNetwork/QtNetwork.pro.orig 2021-08-28 16:32:44 UTC
++++ src/gsiqt/qt5/QtNetwork/QtNetwork.pro
+@@ -10,10 +10,10 @@ DEFINES += MAKE_GSI_QTNETWORK_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ # because QQbject is used as base class for many classes, we need this:
+-LIBS += -lklayout_QtCore
++LIBS += $$DESTDIR/libklayout_QtCore.so
+
+ SOURCES += \
+ gsiDeclQtNetworkAdd.cc
diff --git a/cad/klayout/files/patch-src-gsiqt-qt5-QtPrintSupport-QtPrintSupport.pro b/cad/klayout/files/patch-src-gsiqt-qt5-QtPrintSupport-QtPrintSupport.pro
new file mode 100644
index 000000000000..b48e11482537
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt5-QtPrintSupport-QtPrintSupport.pro
@@ -0,0 +1,23 @@
+--- src/gsiqt/qt5/QtPrintSupport/QtPrintSupport.pro.orig 2021-08-28 16:37:50 UTC
++++ src/gsiqt/qt5/QtPrintSupport/QtPrintSupport.pro
+@@ -10,16 +10,16 @@ DEFINES += MAKE_GSI_QTPRINTSUPPORT_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ # because QQbject is used as base class for many classes, we need this:
+-LIBS += -lklayout_QtCore
++LIBS += $$DESTDIR/libklayout_QtCore.so
+
+ # because QWidget is used for some UI stuff, we need this:
+-LIBS += -lklayout_QtWidgets
++LIBS += $$DESTDIR/libklayout_QtWidgets.so
+
+ # because QPagedPaintDevice is used, we need this:
+-LIBS += -lklayout_QtGui
++LIBS += $$DESTDIR/libklayout_QtGui.so
+
+ SOURCES += \
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qt5-QtSql-QtSql.pro b/cad/klayout/files/patch-src-gsiqt-qt5-QtSql-QtSql.pro
new file mode 100644
index 000000000000..0cf8a811697f
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt5-QtSql-QtSql.pro
@@ -0,0 +1,15 @@
+--- src/gsiqt/qt5/QtSql/QtSql.pro.orig 2021-08-28 16:32:05 UTC
++++ src/gsiqt/qt5/QtSql/QtSql.pro
+@@ -10,10 +10,10 @@ DEFINES += MAKE_GSI_QTSQL_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ # because QQbject is used as base class for many classes, we need this:
+-LIBS += -lklayout_QtCore
++LIBS += $$DESTDIR/libklayout_QtCore.so
+
+ SOURCES += \
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qt5-QtSvg-QtSvg.pro b/cad/klayout/files/patch-src-gsiqt-qt5-QtSvg-QtSvg.pro
new file mode 100644
index 000000000000..d69db02c6b64
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt5-QtSvg-QtSvg.pro
@@ -0,0 +1,23 @@
+--- src/gsiqt/qt5/QtSvg/QtSvg.pro.orig 2021-08-28 16:36:01 UTC
++++ src/gsiqt/qt5/QtSvg/QtSvg.pro
+@@ -10,16 +10,16 @@ DEFINES += MAKE_GSI_QTSVG_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ # because QQbject is used as base class for many classes, we need this:
+-LIBS += -lklayout_QtCore
++LIBS += $$DESTDIR/libklayout_QtCore.so
+
+ # because QWidget is used for some UI stuff, we need this:
+-LIBS += -lklayout_QtWidgets
++LIBS += $$DESTDIR/libklayout_QtWidgets.so
+
+ # because QPaintDevice is used, we need this:
+-LIBS += -lklayout_QtGui
++LIBS += $$DESTDIR/libklayout_QtGui.so
+
+ SOURCES += \
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qt5-QtUiTools-QtUiTools.pro b/cad/klayout/files/patch-src-gsiqt-qt5-QtUiTools-QtUiTools.pro
new file mode 100644
index 000000000000..96dbe2ea6ae1
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt5-QtUiTools-QtUiTools.pro
@@ -0,0 +1,11 @@
+--- src/gsiqt/qt5/QtUiTools/QtUiTools.pro.orig 2021-08-28 16:35:24 UTC
++++ src/gsiqt/qt5/QtUiTools/QtUiTools.pro
+@@ -10,7 +10,7 @@ DEFINES += MAKE_GSI_QTUITOOLS_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic -lklayout_QtCore
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so $$DESTDIR/libklayout_QtCore.so
+
+ SOURCES += \
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qt5-QtWidgets-QtWidgets.pro b/cad/klayout/files/patch-src-gsiqt-qt5-QtWidgets-QtWidgets.pro
new file mode 100644
index 000000000000..8784044ab1e9
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt5-QtWidgets-QtWidgets.pro
@@ -0,0 +1,19 @@
+--- src/gsiqt/qt5/QtWidgets/QtWidgets.pro.orig 2021-08-28 16:30:52 UTC
++++ src/gsiqt/qt5/QtWidgets/QtWidgets.pro
+@@ -10,13 +10,13 @@ DEFINES += MAKE_GSI_QTWIDGETS_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ # because QPainter is used as base class for QStylePainter, we need this:
+-LIBS += -lklayout_QtGui
++LIBS += $$DESTDIR/libklayout_QtGui.so
+
+ # because QObject is the base class of some classes we need this
+-LIBS += -lklayout_QtCore
++LIBS += $$DESTDIR/libklayout_QtCore.so
+
+ SOURCES += \
+ gsiDeclQtWidgetsAdd.cc
diff --git a/cad/klayout/files/patch-src-gsiqt-qt5-QtXml-QtXml.pro b/cad/klayout/files/patch-src-gsiqt-qt5-QtXml-QtXml.pro
new file mode 100644
index 000000000000..59a24b1919f9
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt5-QtXml-QtXml.pro
@@ -0,0 +1,11 @@
+--- src/gsiqt/qt5/QtXml/QtXml.pro.orig 2021-08-28 16:34:41 UTC
++++ src/gsiqt/qt5/QtXml/QtXml.pro
+@@ -10,7 +10,7 @@ DEFINES += MAKE_GSI_QTXML_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ SOURCES += \
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qt5-QtXmlPatterns-QtXmlPatterns.pro b/cad/klayout/files/patch-src-gsiqt-qt5-QtXmlPatterns-QtXmlPatterns.pro
new file mode 100644
index 000000000000..7c44137fa217
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qt5-QtXmlPatterns-QtXmlPatterns.pro
@@ -0,0 +1,15 @@
+--- src/gsiqt/qt5/QtXmlPatterns/QtXmlPatterns.pro.orig 2021-08-28 16:36:55 UTC
++++ src/gsiqt/qt5/QtXmlPatterns/QtXmlPatterns.pro
+@@ -10,10 +10,10 @@ DEFINES += MAKE_GSI_QTXMLPATTERNS_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_qtbasic
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_qtbasic.so
+
+ # because QQbject is used as base class for many classes, we need this:
+-LIBS += -lklayout_QtCore
++LIBS += $$DESTDIR/libklayout_QtCore.so
+
+ SOURCES += \
+
diff --git a/cad/klayout/files/patch-src-gsiqt-qtbasic-qtbasic.pro b/cad/klayout/files/patch-src-gsiqt-qtbasic-qtbasic.pro
new file mode 100644
index 000000000000..5a5b9126bba2
--- /dev/null
+++ b/cad/klayout/files/patch-src-gsiqt-qtbasic-qtbasic.pro
@@ -0,0 +1,11 @@
+--- src/gsiqt/qtbasic/qtbasic.pro.orig 2021-08-28 16:43:44 UTC
++++ src/gsiqt/qtbasic/qtbasic.pro
+@@ -10,7 +10,7 @@ DEFINES += MAKE_GSI_QTBASIC_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$QTBASIC_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$QTBASIC_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_db.so
+
+ SOURCES += \
+ gsiQt.cc \
diff --git a/cad/klayout/files/patch-src-img-img-img.pro b/cad/klayout/files/patch-src-img-img-img.pro
new file mode 100644
index 000000000000..f6ddbec1570b
--- /dev/null
+++ b/cad/klayout/files/patch-src-img-img-img.pro
@@ -0,0 +1,9 @@
+--- src/img/img/img.pro.orig 2021-08-28 16:50:46 UTC
++++ src/img/img/img.pro
+@@ -37,5 +37,5 @@ SOURCES = \
+
+ INCLUDEPATH += $$TL_INC $$DB_INC $$GSI_INC $$LAYBASIC_INC $$DB_INC
+ DEPENDPATH += $$TL_INC $$DB_INC $$GSI_INC $$LAYBASIC_INC $$DB_INC
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_db -lklayout_gsi -lklayout_laybasic -lklayout_db
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_db.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_laybasic.so $$DESTDIR/libklayout_db.so
+
diff --git a/cad/klayout/files/patch-src-img-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-img-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..129fe1c98c4b
--- /dev/null
+++ b/cad/klayout/files/patch-src-img-unit_tests-unit_tests.pro
@@ -0,0 +1,9 @@
+--- src/img/unit_tests/unit_tests.pro.orig 2021-08-28 16:51:37 UTC
++++ src/img/unit_tests/unit_tests.pro
+@@ -13,5 +13,5 @@ SOURCES = \
+ INCLUDEPATH += $$IMG_INC $$DB_INC $$TL_INC $$LAYBASIC_INC $$GSI_INC
+ DEPENDPATH += $$IMG_INC $$DB_INC $$TL_INC $$LAYBASIC_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_img -lklayout_laybasic -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_img.so $$DESTDIR_UT/libklayout_laybasic.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-klayout.pri b/cad/klayout/files/patch-src-klayout.pri
index 2268a4ae92ca..7cb9ed62df1b 100644
--- a/cad/klayout/files/patch-src-klayout.pri
+++ b/cad/klayout/files/patch-src-klayout.pri
@@ -1,21 +1,12 @@
---- src/klayout.pri.orig 2019-02-23 17:34:47 UTC
+--- src/klayout.pri.orig 2021-07-23 08:00:26 UTC
+++ src/klayout.pri
-@@ -68,7 +68,8 @@ QMAKE_CXXFLAGS_WARN_ON += \
- -Wno-deprecated-declarations \
- -Wno-reserved-user-defined-literal \
-
--QT += network xml sql
-+QT += network xml sql widgets
-+INCLUDEPATH += .
+@@ -100,7 +100,9 @@ equals(HAVE_RUBY, "1") {
+ }
- equals(HAVE_QT5, "1") {
- QT += designer printsupport
-@@ -84,7 +85,7 @@ equals(HAVE_QT5, "1") {
- win32 {
- QMAKE_LFLAGS += -Wl,--exclude-all-symbols
- } else {
-- QMAKE_CXXFLAGS += -fvisibility=hidden
-+# QMAKE_CXXFLAGS += -fvisibility=hidden
+ !isEmpty(RPATH) {
++ !equals($$basename(_PRO_FILE_), "unit_tests.pro") {
+ QMAKE_RPATHDIR += $$RPATH
++ }
}
- VERSION_STRING = $$KLAYOUT_VERSION
+ !isEmpty(BITS_PATH) {
diff --git a/cad/klayout/files/patch-src-klayout_main-klayout_main-klayout_main.pro b/cad/klayout/files/patch-src-klayout_main-klayout_main-klayout_main.pro
new file mode 100644
index 000000000000..72ca7bb4c376
--- /dev/null
+++ b/cad/klayout/files/patch-src-klayout_main-klayout_main-klayout_main.pro
@@ -0,0 +1,53 @@
+--- src/klayout_main/klayout_main/klayout_main.pro.orig 2021-08-28 16:11:14 UTC
++++ src/klayout_main/klayout_main/klayout_main.pro
+@@ -27,39 +27,39 @@ DEPENDPATH += $$QTBASIC_INC
+
+ equals(HAVE_QTBINDINGS, "1") {
+
+- LIBS += -lklayout_qtbasic -lklayout_QtGui
++ LIBS += $$DESTDIR/libklayout_qtbasic.so $$DESTDIR/libklayout_QtGui.so
+
+ !equals(HAVE_QT_XML, "0") {
+- LIBS += -lklayout_QtXml
++ LIBS += $$DESTDIR/libklayout_QtXml.so
+ }
+ !equals(HAVE_QT_NETWORK, "0") {
+- LIBS += -lklayout_QtNetwork
++ LIBS += $$DESTDIR/libklayout_QtNetwork.so
+ }
+ !equals(HAVE_QT_SQL, "0") {
+- LIBS += -lklayout_QtSql
++ LIBS += $$DESTDIR/libklayout_QtSql.so
+ }
+ !equals(HAVE_QT_DESIGNER, "0") {
+- LIBS += -lklayout_QtDesigner
++ LIBS += $$DESTDIR/libklayout_QtDesigner.so
+ }
+ !equals(HAVE_QT_UITOOLS, "0") {
+- LIBS += -lklayout_QtUiTools
++ LIBS += $$DESTDIR/libklayout_QtUiTools.so
+ }
+
+ equals(HAVE_QT5, "1") {
+
+- LIBS += -lklayout_QtWidgets
++ LIBS += $$DESTDIR/libklayout_QtWidgets.so
+
+ !equals(HAVE_QT_MULTIMEDIA, "0") {
+- LIBS += -lklayout_QtMultimedia
++ LIBS += $$DESTDIR/libklayout_QtMultimedia.so
+ }
+ !equals(HAVE_QT_PRINTSUPPORT, "0") {
+- LIBS += -lklayout_QtPrintSupport
++ LIBS += $$DESTDIR/libklayout_QtPrintSupport.so
+ }
+ !equals(HAVE_QT_SVG, "0") {
+- LIBS += -lklayout_QtSvg
++ LIBS += $$DESTDIR/libklayout_QtSvg.so
+ }
+ !equals(HAVE_QT_XML, "0") {
+- LIBS += -lklayout_QtXmlPatterns
++ LIBS += $$DESTDIR/libklayout_QtXmlPatterns.so
+ }
+
+ }
diff --git a/cad/klayout/files/patch-src-klayout_main-tests-tests.pro b/cad/klayout/files/patch-src-klayout_main-tests-tests.pro
new file mode 100644
index 000000000000..bad59c1d08a7
--- /dev/null
+++ b/cad/klayout/files/patch-src-klayout_main-tests-tests.pro
@@ -0,0 +1,9 @@
+--- src/klayout_main/tests/tests.pro.orig 2021-08-28 16:12:22 UTC
++++ src/klayout_main/tests/tests.pro
+@@ -12,5 +12,5 @@ SOURCES = \
+ INCLUDEPATH += $$RBA_INC $$TL_INC $$DB_INC $$GSI_INC
+ DEPENDPATH += $$RBA_INC $$TL_INC $$DB_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_rba -lklayout_tl -lklayout_db -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_rba.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-lay-lay-lay.pro b/cad/klayout/files/patch-src-lay-lay-lay.pro
new file mode 100644
index 000000000000..160a781f3e39
--- /dev/null
+++ b/cad/klayout/files/patch-src-lay-lay-lay.pro
@@ -0,0 +1,55 @@
+--- src/lay/lay/lay.pro.orig 2021-07-23 08:00:26 UTC
++++ src/lay/lay/lay.pro
+@@ -181,13 +181,13 @@ RESOURCES = layBuildInMacros.qrc \
+
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LAYBASIC_INC $$ANT_INC $$IMG_INC $$EDT_INC $$LYM_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LAYBASIC_INC $$ANT_INC $$IMG_INC $$EDT_INC $$LYM_INC
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db -lklayout_rdb -lklayout_lym -lklayout_laybasic -lklayout_ant -lklayout_img -lklayout_edt
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_db.so $$DESTDIR/libklayout_rdb.so $$DESTDIR/libklayout_lym.so $$DESTDIR/libklayout_laybasic.so $$DESTDIR/libklayout_ant.so $$DESTDIR/libklayout_img.so $$DESTDIR/libklayout_edt.so
+
+ win32 {
+ # for stack trace support:
+ # lpsapi for GetModuleFileName and others
+ # dbghelp for SymFromAddr and other
+- LIBS += -lpsapi -ldbghelp
++ LIBS += $$DESTDIR/libpsapi.so $$DESTDIR/libdbghelp.so
+ }
+
+ *bsd* {
+@@ -203,12 +203,12 @@ INCLUDEPATH += $$QTBASIC_INC
+ DEPENDPATH += $$QTBASIC_INC
+
+ equals(HAVE_QTBINDINGS, "1") {
+- LIBS += -lklayout_qtbasic -lklayout_QtGui -lklayout_QtCore
++ LIBS += $$DESTDIR/libklayout_qtbasic.so $$DESTDIR/libklayout_QtGui.so $$DESTDIR/libklayout_QtCore.so
+ !equals(HAVE_QT_XML, "0") {
+- LIBS += -lklayout_QtXml
++ LIBS += $$DESTDIR/libklayout_QtXml.so
+ }
+ equals(HAVE_QT5, "1") {
+- LIBS += -lklayout_QtWidgets
++ LIBS += $$DESTDIR/libklayout_QtWidgets.so
+ }
+ }
+
+@@ -216,16 +216,16 @@ INCLUDEPATH += $$RBA_INC
+ DEPENDPATH += $$RBA_INC
+
+ equals(HAVE_RUBY, "1") {
+- LIBS += -lklayout_rba
++ LIBS += $$DESTDIR/libklayout_rba.so
+ } else {
+- LIBS += -lklayout_rbastub
++ LIBS += $$DESTDIR/libklayout_rbastub.so
+ }
+
+ INCLUDEPATH += $$PYA_INC
+ DEPENDPATH += $$PYA_INC
+
+ equals(HAVE_PYTHON, "1") {
+- LIBS += -lklayout_pya
++ LIBS += $$DESTDIR/libklayout_pya.so
+ } else {
+- LIBS += -lklayout_pyastub
++ LIBS += $$DESTDIR/libklayout_pyastub.so
+ }
diff --git a/cad/klayout/files/patch-src-lay-lay-laySignalHandler.cc b/cad/klayout/files/patch-src-lay-lay-laySignalHandler.cc
deleted file mode 100644
index c359c33c9a10..000000000000
--- a/cad/klayout/files/patch-src-lay-lay-laySignalHandler.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/lay/lay/laySignalHandler.cc.orig 2019-02-23 17:34:47 UTC
-+++ src/lay/lay/laySignalHandler.cc
-@@ -450,7 +450,7 @@ void install_signal_handlers ()
- act.sa_sigaction = signal_handler;
- sigemptyset (&act.sa_mask);
- act.sa_flags = SA_SIGINFO;
--#if !defined(__APPLE__)
-+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__DrafonFly__)
- act.sa_restorer = 0;
- #endif
-
diff --git a/cad/klayout/files/patch-src-lay-lay-laySystemPaths.cc b/cad/klayout/files/patch-src-lay-lay-laySystemPaths.cc
new file mode 100644
index 000000000000..c384b67442d0
--- /dev/null
+++ b/cad/klayout/files/patch-src-lay-lay-laySystemPaths.cc
@@ -0,0 +1,19 @@
+--- src/lay/lay/laySystemPaths.cc.orig 2021-08-28 18:02:22 UTC
++++ src/lay/lay/laySystemPaths.cc
+@@ -26,6 +26,8 @@
+ #include "tlString.h"
+ #include "tlEnv.h"
+
++#include "laySystemPathsDefaults.h"
++
+ #include <QDir>
+ #include <QFileInfo>
+ #include <QCoreApplication>
+@@ -109,6 +111,7 @@ get_klayout_path ()
+ } else {
+ klayout_path.push_back (tl::get_inst_path ());
+ }
++ split_path (PLUGINS_BASEDIR, klayout_path);
+
+ return klayout_path;
+
diff --git a/cad/klayout/files/patch-src-lay-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-lay-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..147575b042fd
--- /dev/null
+++ b/cad/klayout/files/patch-src-lay-unit_tests-unit_tests.pro
@@ -0,0 +1,9 @@
+--- src/lay/unit_tests/unit_tests.pro.orig 2021-08-28 17:29:41 UTC
++++ src/lay/unit_tests/unit_tests.pro
+@@ -13,5 +13,5 @@ SOURCES = \
+ INCLUDEPATH += $$LAY_INC $$TL_INC $$LAYBASIC_INC $$DB_INC $$GSI_INC $$ANT_INC $$IMG_INC $$RDB_INC
+ DEPENDPATH += $$LAY_INC $$TL_INC $$LAYBASIC_INC $$DB_INC $$GSI_INC $$ANT_INC $$IMG_INC $$RDB_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_lay -lklayout_laybasic -lklayout_db -lklayout_tl -lklayout_gsi -lklayout_ant -lklayout_img -lklayout_rdb
++LIBS += $$DESTDIR_UT/libklayout_lay.so $$DESTDIR_UT/libklayout_laybasic.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so $$DESTDIR_UT/libklayout_ant.so $$DESTDIR_UT/libklayout_img.so $$DESTDIR_UT/libklayout_rdb.so
+
diff --git a/cad/klayout/files/patch-src-laybasic-laybasic-layBrowserDialog.h b/cad/klayout/files/patch-src-laybasic-laybasic-layBrowserDialog.h
deleted file mode 100644
index 48713b4f5d4c..000000000000
--- a/cad/klayout/files/patch-src-laybasic-laybasic-layBrowserDialog.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/laybasic/laybasic/layBrowserDialog.h.orig 2019-02-23 17:34:47 UTC
-+++ src/laybasic/laybasic/layBrowserDialog.h
-@@ -26,6 +26,7 @@
-
- #include "tlTypeTraits.h"
-
-+#include "laybasicCommon.h"
- #include "ui_BrowserDialog.h"
-
- #include "gsi.h"
diff --git a/cad/klayout/files/patch-src-laybasic-laybasic-laybasic.pro b/cad/klayout/files/patch-src-laybasic-laybasic-laybasic.pro
index afba8f16b594..b5bb0d8be095 100644
--- a/cad/klayout/files/patch-src-laybasic-laybasic-laybasic.pro
+++ b/cad/klayout/files/patch-src-laybasic-laybasic-laybasic.pro
@@ -1,20 +1,21 @@
---- src/laybasic/laybasic/laybasic.pro.orig 2019-02-23 17:34:47 UTC
+--- src/laybasic/laybasic/laybasic.pro.orig 2021-08-28 16:13:49 UTC
+++ src/laybasic/laybasic/laybasic.pro
-@@ -6,6 +6,8 @@ include($$PWD/../../lib.pri)
+@@ -303,15 +303,15 @@ HEADERS = \
- DEFINES += MAKE_LAYBASIC_LIBRARY
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LYM_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LYM_INC
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db -lklayout_rdb -lklayout_lym
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_db.so $$DESTDIR/libklayout_rdb.so $$DESTDIR/libklayout_lym.so
-+QT += widgets gui
-+
- FORMS = \
- AlignCellOptionsDialog.ui \
- BookmarkManagementForm.ui \
-@@ -273,7 +275,7 @@ HEADERS = \
- laybasicConfig.h \
- layBackgroundAwareTreeStyle.h
+ INCLUDEPATH += $$QTBASIC_INC
+ DEPENDPATH += $$QTBASIC_INC
--INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC
-+INCLUDEPATH += . $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC
- DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC
- LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db -lklayout_rdb
+ equals(HAVE_QTBINDINGS, "1") {
+- LIBS += -lklayout_qtbasic -lklayout_QtGui -lklayout_QtCore
++ LIBS += $$DESTDIR/libklayout_qtbasic.so $$DESTDIR/libklayout_QtGui.so $$DESTDIR/libklayout_QtCore.so
+ equals(HAVE_QT5, "1") {
+- LIBS += -lklayout_QtWidgets
++ LIBS += $$DESTDIR/libklayout_QtWidgets.so
+ }
+ }
diff --git a/cad/klayout/files/patch-src-laybasic-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-laybasic-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..17a936216de6
--- /dev/null
+++ b/cad/klayout/files/patch-src-laybasic-unit_tests-unit_tests.pro
@@ -0,0 +1,9 @@
+--- src/laybasic/unit_tests/unit_tests.pro.orig 2021-08-28 16:14:42 UTC
++++ src/laybasic/unit_tests/unit_tests.pro
+@@ -21,5 +21,5 @@ SOURCES = \
+ INCLUDEPATH += $$TL_INC $$LAYBASIC_INC $$DB_INC $$GSI_INC $$OUT_PWD/../laybasic
+ DEPENDPATH += $$TL_INC $$LAYBASIC_INC $$DB_INC $$GSI_INC $$OUT_PWD/../laybasic
+
+-LIBS += -L$$DESTDIR_UT -lklayout_laybasic -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_laybasic.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-lib-lib-lib.pro b/cad/klayout/files/patch-src-lib-lib-lib.pro
new file mode 100644
index 000000000000..056cbc0144b6
--- /dev/null
+++ b/cad/klayout/files/patch-src-lib-lib-lib.pro
@@ -0,0 +1,9 @@
+--- src/lib/lib/lib.pro.orig 2021-08-28 17:04:07 UTC
++++ src/lib/lib/lib.pro
+@@ -36,5 +36,5 @@ RESOURCES = \
+
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC
+-LIBS += -L$$DESTDIR -lklayout_gsi -lklayout_tl -lklayout_db
++LIBS += $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_db.so
+
diff --git a/cad/klayout/files/patch-src-lib-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-lib-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..bf4347112220
--- /dev/null
+++ b/cad/klayout/files/patch-src-lib-unit_tests-unit_tests.pro
@@ -0,0 +1,9 @@
+--- src/lib/unit_tests/unit_tests.pro.orig 2021-08-28 17:04:53 UTC
++++ src/lib/unit_tests/unit_tests.pro
+@@ -12,5 +12,5 @@ SOURCES = \
+ INCLUDEPATH += $$LIB_INC $$TL_INC $$DB_INC $$GSI_INC
+ DEPENDPATH += $$LIB_INC $$TL_INC $$DB_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_lib -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_lib.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-lib.pri b/cad/klayout/files/patch-src-lib.pri
new file mode 100644
index 000000000000..51aa1a1acfb9
--- /dev/null
+++ b/cad/klayout/files/patch-src-lib.pri
@@ -0,0 +1,11 @@
+--- src/lib.pri.orig 2021-08-27 07:30:53 UTC
++++ src/lib.pri
+@@ -14,7 +14,7 @@ win32 {
+
+ } else {
+
+- target.path = $$PREFIX
++ target.path = $$shell_path($(INSTALLROOT)$$PREFIX/lib/klayout)
+ INSTALLS += target
+
+ }
diff --git a/cad/klayout/files/patch-src-lvs-lvs-lvs.pro b/cad/klayout/files/patch-src-lvs-lvs-lvs.pro
new file mode 100644
index 000000000000..81d8527fdc4e
--- /dev/null
+++ b/cad/klayout/files/patch-src-lvs-lvs-lvs.pro
@@ -0,0 +1,9 @@
+--- src/lvs/lvs/lvs.pro.orig 2021-08-28 16:57:38 UTC
++++ src/lvs/lvs/lvs.pro
+@@ -18,5 +18,5 @@ RESOURCES = \
+
+ INCLUDEPATH += $$TL_INC $$DB_INC $$GSI_INC $$LYM_INC $$RDB_INC
+ DEPENDPATH += $$TL_INC $$DB_INC $$GSI_INC $$LYM_INC $$RDB_INC
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_db -lklayout_gsi -lklayout_lym -lklayout_rdb -lklayout_drc
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_db.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_lym.so $$DESTDIR/libklayout_rdb.so $$DESTDIR/libklayout_drc.so
+
diff --git a/cad/klayout/files/patch-src-lvs-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-lvs-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..bf1a2f6c9da9
--- /dev/null
+++ b/cad/klayout/files/patch-src-lvs-unit_tests-unit_tests.pro
@@ -0,0 +1,9 @@
+--- src/lvs/unit_tests/unit_tests.pro.orig 2021-08-28 16:53:25 UTC
++++ src/lvs/unit_tests/unit_tests.pro
+@@ -14,4 +14,5 @@ SOURCES = \
+ INCLUDEPATH += $$DRC_INC $$TL_INC $$RDB_INC $$DB_INC $$GSI_INC $$LYM_INC
+ DEPENDPATH += $$DRC_INC $$TL_INC $$RDB_INC $$DB_INC $$GSI_INC $$LYM_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_lvs -lklayout_drc -lklayout_rdb -lklayout_db -lklayout_tl -lklayout_gsi -lklayout_lym
++LIBS += $$DESTDIR_UT/libklayout_lvs.so $$DESTDIR_UT/libklayout_drc.so $$DESTDIR_UT/libklayout_rdb.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so $$DESTDIR_UT/libklayout_lym.so
++
diff --git a/cad/klayout/files/patch-src-lym-lym-lym.pro b/cad/klayout/files/patch-src-lym-lym-lym.pro
new file mode 100644
index 000000000000..65ec2c48f2bc
--- /dev/null
+++ b/cad/klayout/files/patch-src-lym-lym-lym.pro
@@ -0,0 +1,30 @@
+--- src/lym/lym/lym.pro.orig 2021-08-28 16:46:14 UTC
++++ src/lym/lym/lym.pro
+@@ -20,22 +20,22 @@ HEADERS = \
+ INCLUDEPATH += $$TL_INC $$GSI_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so
+
+ INCLUDEPATH += $$RBA_INC
+ DEPENDPATH += $$RBA_INC
+
+ equals(HAVE_RUBY, "1") {
+- LIBS += -lklayout_rba
++ LIBS += $$DESTDIR/libklayout_rba.so
+ } else {
+- LIBS += -lklayout_rbastub
++ LIBS += $$DESTDIR/libklayout_rbastub.so
+ }
+
+ INCLUDEPATH += $$PYA_INC
+ DEPENDPATH += $$PYA_INC
+
+ equals(HAVE_PYTHON, "1") {
+- LIBS += -lklayout_pya
++ LIBS += $$DESTDIR/libklayout_pya.so
+ } else {
+- LIBS += -lklayout_pyastub
++ LIBS += $$DESTDIR/libklayout_pyastub.so
+ }
diff --git a/cad/klayout/files/patch-src-lym-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-lym-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..641526ad49b9
--- /dev/null
+++ b/cad/klayout/files/patch-src-lym-unit_tests-unit_tests.pro
@@ -0,0 +1,25 @@
+--- src/lym/unit_tests/unit_tests.pro.orig 2021-08-28 16:47:48 UTC
++++ src/lym/unit_tests/unit_tests.pro
+@@ -12,17 +12,17 @@ SOURCES = \
+ INCLUDEPATH += $$RBA_INC $$PYA_INC $$LYM_INC $$TL_INC $$GSI_INC
+ DEPENDPATH += $$RBA_INC $$PYA_INC $$LYM_INC $$TL_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_lym -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_lym.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
+ equals(HAVE_RUBY, "1") {
+- LIBS += -lklayout_rba
++ LIBS += $$DESTDIR_UT/libklayout_rba.so
+ } else {
+- LIBS += -lklayout_rbastub
++ LIBS += $$DESTDIR_UT/libklayout_rbastub.so
+ }
+
+ equals(HAVE_PYTHON, "1") {
+- LIBS += -lklayout_pya
++ LIBS += $$DESTDIR_UT/libklayout_pya.so
+ } else {
+- LIBS += -lklayout_pyastub
++ LIBS += $$DESTDIR_UT/libklayout_pyastub.so
+ }
+
diff --git a/cad/klayout/files/patch-src-plugins-db_plugin.pri b/cad/klayout/files/patch-src-plugins-db_plugin.pri
new file mode 100644
index 000000000000..2ff9d850c3bd
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-db_plugin.pri
@@ -0,0 +1,27 @@
+--- src/plugins/db_plugin.pri.orig 2021-07-23 08:00:26 UTC
++++ src/plugins/db_plugin.pri
+@@ -5,7 +5,7 @@ TEMPLATE = lib
+
+ INCLUDEPATH += $$DB_INC $$TL_INC $$GSI_INC $$PWD/common
+ DEPENDPATH += $$DB_INC $$TL_INC $$GSI_INC $$PWD/common
+-LIBS += -L$$DESTDIR/.. -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR/../libklayout_db.so $$DESTDIR/../libklayout_tl.so $$DESTDIR/../libklayout_gsi.so
+
+ DEFINES += MAKE_DB_PLUGIN_LIBRARY
+
+@@ -14,13 +14,13 @@ win32 {
+ dlltarget.path = $$PREFIX/db_plugins
+ INSTALLS += dlltarget
+
+- # to avoid the major version being appended to the dll name - in this case -lxyz won't link it again
++ # to avoid the major version being appended to the dll name - in this case $$DESTDIR/../libxyz won't link it again
+ # because the library is called xyx0.dll.
+ CONFIG += skip_target_version_ext
+
+ } else {
+
+- target.path = $$PREFIX/db_plugins
++ target.path = $$shell_path($(INSTALLROOT)$$PREFIX/lib/klayout/db_plugins)
+ INSTALLS += target
+
+ }
diff --git a/cad/klayout/files/patch-src-plugins-lay_plugin.pri b/cad/klayout/files/patch-src-plugins-lay_plugin.pri
new file mode 100644
index 000000000000..1dc4392035b2
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-lay_plugin.pri
@@ -0,0 +1,27 @@
+--- src/plugins/lay_plugin.pri.orig 2021-07-23 08:00:26 UTC
++++ src/plugins/lay_plugin.pri
+@@ -5,7 +5,7 @@ TEMPLATE = lib
+
+ INCLUDEPATH += $$DB_INC $$TL_INC $$GSI_INC $$LAYBASIC_INC $$LAY_INC $$PWD/common
+ DEPENDPATH += $$DB_INC $$TL_INC $$GSI_INC $$LAYBASIC_INC $$LAY_INC $$PWD/common
+-LIBS += -L$$DESTDIR/.. -lklayout_db -lklayout_tl -lklayout_gsi -lklayout_laybasic -lklayout_lay
++LIBS += $$DESTDIR/../libklayout_db.so $$DESTDIR/../libklayout_tl.so $$DESTDIR/../libklayout_gsi.so $$DESTDIR/../libklayout_laybasic.so $$DESTDIR/../libklayout_lay.so
+
+ DEFINES += MAKE_LAY_PLUGIN_LIBRARY
+
+@@ -14,13 +14,13 @@ win32 {
+ dlltarget.path = $$PREFIX/lay_plugins
+ INSTALLS += dlltarget
+
+- # to avoid the major version being appended to the dll name - in this case -lxyz won't link it again
++ # to avoid the major version being appended to the dll name - in this case $$DESTDIR/../libxyz won't link it again
+ # because the library is called xyx0.dll.
+ CONFIG += skip_target_version_ext
+
+ } else {
+
+- target.path = $$PREFIX/lay_plugins
++ target.path = $(INSTALLROOT)$$PREFIX/lay_plugins
+ INSTALLS += target
+
+ }
diff --git a/cad/klayout/files/patch-src-plugins-plugins.pro b/cad/klayout/files/patch-src-plugins-plugins.pro
new file mode 100644
index 000000000000..60cb2ec65676
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-plugins.pro
@@ -0,0 +1,10 @@
+--- src/plugins/plugins.pro.orig 2021-08-27 22:02:52 UTC
++++ src/plugins/plugins.pro
+@@ -2,6 +2,7 @@ TEMPLATE = subdirs
+
+ # Automatically include all sub-folders, but not the .pro file
+ SUBDIR_LIST = $$files($$PWD/*)
++SUBDIR_LIST -= $$files($$PWD/*.orig)
+ SUBDIR_LIST -= $$PWD/plugins.pro
+ SUBDIR_LIST -= $$PWD/db_plugin.pri
+ SUBDIR_LIST -= $$PWD/lay_plugin.pri
diff --git a/cad/klayout/files/patch-src-plugins-streamers-cif-lay_plugin-lay_plugin.pro b/cad/klayout/files/patch-src-plugins-streamers-cif-lay_plugin-lay_plugin.pro
new file mode 100644
index 000000000000..163266f7bd37
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-cif-lay_plugin-lay_plugin.pro
@@ -0,0 +1,11 @@
+--- src/plugins/streamers/cif/lay_plugin/lay_plugin.pro.orig 2021-08-28 17:30:42 UTC
++++ src/plugins/streamers/cif/lay_plugin/lay_plugin.pro
+@@ -6,7 +6,7 @@ include($$PWD/../../../lay_plugin.pri)
+
+ INCLUDEPATH += $$PWD/../db_plugin
+ DEPENDPATH += $$PWD/../db_plugin
+-LIBS += -L$$DESTDIR/../db_plugins -lcif
++LIBS += $$DESTDIR/../db_plugins/libcif.so
+
+ !isEmpty(RPATH) {
+ QMAKE_RPATHDIR += $$RPATH/db_plugins
diff --git a/cad/klayout/files/patch-src-plugins-streamers-cif-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-plugins-streamers-cif-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..785da94d2160
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-cif-unit_tests-unit_tests.pro
@@ -0,0 +1,14 @@
+--- src/plugins/streamers/cif/unit_tests/unit_tests.pro.orig 2021-08-28 17:09:50 UTC
++++ src/plugins/streamers/cif/unit_tests/unit_tests.pro
+@@ -11,9 +11,9 @@ SOURCES = \
+ INCLUDEPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+ DEPENDPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+
+-LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
+ PLUGINPATH = $$OUT_PWD/../../../../db_plugins
+ QMAKE_RPATHDIR += $$PLUGINPATH
+
+-LIBS += -L$$PLUGINPATH -lcif
++LIBS += $$PLUGINPATH/libcif.so
diff --git a/cad/klayout/files/patch-src-plugins-streamers-dxf-lay_plugin-lay_plugin.pro b/cad/klayout/files/patch-src-plugins-streamers-dxf-lay_plugin-lay_plugin.pro
new file mode 100644
index 000000000000..ca778ecbf919
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-dxf-lay_plugin-lay_plugin.pro
@@ -0,0 +1,11 @@
+--- src/plugins/streamers/dxf/lay_plugin/lay_plugin.pro.orig 2021-08-28 17:32:49 UTC
++++ src/plugins/streamers/dxf/lay_plugin/lay_plugin.pro
+@@ -6,7 +6,7 @@ include($$PWD/../../../lay_plugin.pri)
+
+ INCLUDEPATH += $$PWD/../db_plugin
+ DEPENDPATH += $$PWD/../db_plugin
+-LIBS += -L$$DESTDIR/../db_plugins -ldxf
++LIBS += $$DESTDIR/../db_plugins/libdxf.so
+
+ !isEmpty(RPATH) {
+ QMAKE_RPATHDIR += $$RPATH/db_plugins
diff --git a/cad/klayout/files/patch-src-plugins-streamers-dxf-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-plugins-streamers-dxf-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..cc8582618a2f
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-dxf-unit_tests-unit_tests.pro
@@ -0,0 +1,14 @@
+--- src/plugins/streamers/dxf/unit_tests/unit_tests.pro.orig 2021-08-28 17:08:02 UTC
++++ src/plugins/streamers/dxf/unit_tests/unit_tests.pro
+@@ -11,9 +11,9 @@ SOURCES = \
+ INCLUDEPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+ DEPENDPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+
+-LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
+ PLUGINPATH = $$OUT_PWD/../../../../db_plugins
+ QMAKE_RPATHDIR += $$PLUGINPATH
+
+-LIBS += -L$$PLUGINPATH -ldxf
++LIBS += $$PLUGINPATH/libdxf.so
diff --git a/cad/klayout/files/patch-src-plugins-streamers-gds2-lay_plugin-lay_plugin.pro b/cad/klayout/files/patch-src-plugins-streamers-gds2-lay_plugin-lay_plugin.pro
new file mode 100644
index 000000000000..ac3cee9abc20
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-gds2-lay_plugin-lay_plugin.pro
@@ -0,0 +1,11 @@
+--- src/plugins/streamers/gds2/lay_plugin/lay_plugin.pro.orig 2021-08-28 17:33:25 UTC
++++ src/plugins/streamers/gds2/lay_plugin/lay_plugin.pro
+@@ -6,7 +6,7 @@ include($$PWD/../../../lay_plugin.pri)
+
+ INCLUDEPATH += $$PWD/../db_plugin
+ DEPENDPATH += $$PWD/../db_plugin
+-LIBS += -L$$DESTDIR/../db_plugins -lgds2
++LIBS += $$DESTDIR/../db_plugins/libgds2.so
+
+ !isEmpty(RPATH) {
+ QMAKE_RPATHDIR += $$RPATH/db_plugins
diff --git a/cad/klayout/files/patch-src-plugins-streamers-gds2-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-plugins-streamers-gds2-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..46448c5e3c31
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-gds2-unit_tests-unit_tests.pro
@@ -0,0 +1,14 @@
+--- src/plugins/streamers/gds2/unit_tests/unit_tests.pro.orig 2021-08-28 17:12:08 UTC
++++ src/plugins/streamers/gds2/unit_tests/unit_tests.pro
+@@ -12,9 +12,9 @@ SOURCES = \
+ INCLUDEPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+ DEPENDPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+
+-LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
+ PLUGINPATH = $$OUT_PWD/../../../../db_plugins
+ QMAKE_RPATHDIR += $$PLUGINPATH
+
+-LIBS += -L$$PLUGINPATH -lgds2
++LIBS += $$PLUGINPATH/libgds2.so
diff --git a/cad/klayout/files/patch-src-plugins-streamers-lefdef-lay_plugin-lay_plugin.pro b/cad/klayout/files/patch-src-plugins-streamers-lefdef-lay_plugin-lay_plugin.pro
new file mode 100644
index 000000000000..7c7509ab28fa
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-lefdef-lay_plugin-lay_plugin.pro
@@ -0,0 +1,11 @@
+--- src/plugins/streamers/lefdef/lay_plugin/lay_plugin.pro.orig 2021-08-28 17:34:08 UTC
++++ src/plugins/streamers/lefdef/lay_plugin/lay_plugin.pro
+@@ -6,7 +6,7 @@ include($$PWD/../../../lay_plugin.pri)
+
+ INCLUDEPATH += $$PWD/../db_plugin
+ DEPENDPATH += $$PWD/../db_plugin
+-LIBS += -L$$DESTDIR/../db_plugins -llefdef
++LIBS += $$DESTDIR/../db_plugins/liblefdef.so
+
+ !isEmpty(RPATH) {
+ QMAKE_RPATHDIR += $$RPATH/db_plugins
diff --git a/cad/klayout/files/patch-src-plugins-streamers-lefdef-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-plugins-streamers-lefdef-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..f4311200b91a
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-lefdef-unit_tests-unit_tests.pro
@@ -0,0 +1,14 @@
+--- src/plugins/streamers/lefdef/unit_tests/unit_tests.pro.orig 2021-08-28 17:11:17 UTC
++++ src/plugins/streamers/lefdef/unit_tests/unit_tests.pro
+@@ -12,9 +12,9 @@ SOURCES = \
+ INCLUDEPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+ DEPENDPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+
+-LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
+ PLUGINPATH = $$OUT_PWD/../../../../db_plugins
+ QMAKE_RPATHDIR += $$PLUGINPATH
+
+-LIBS += -L$$PLUGINPATH -llefdef
++LIBS += $$PLUGINPATH/liblefdef.so
diff --git a/cad/klayout/files/patch-src-plugins-streamers-magic-lay_plugin-lay_plugin.pro b/cad/klayout/files/patch-src-plugins-streamers-magic-lay_plugin-lay_plugin.pro
new file mode 100644
index 000000000000..f9e5b2e0ea31
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-magic-lay_plugin-lay_plugin.pro
@@ -0,0 +1,11 @@
+--- src/plugins/streamers/magic/lay_plugin/lay_plugin.pro.orig 2021-08-28 17:34:34 UTC
++++ src/plugins/streamers/magic/lay_plugin/lay_plugin.pro
+@@ -6,7 +6,7 @@ include($$PWD/../../../lay_plugin.pri)
+
+ INCLUDEPATH += $$PWD/../db_plugin
+ DEPENDPATH += $$PWD/../db_plugin
+-LIBS += -L$$DESTDIR/../db_plugins -lmag
++LIBS += $$DESTDIR/../db_plugins/libmag.so
+
+ !isEmpty(RPATH) {
+ QMAKE_RPATHDIR += $$RPATH/db_plugins
diff --git a/cad/klayout/files/patch-src-plugins-streamers-magic-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-plugins-streamers-magic-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..d625a2f81652
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-magic-unit_tests-unit_tests.pro
@@ -0,0 +1,14 @@
+--- src/plugins/streamers/magic/unit_tests/unit_tests.pro.orig 2021-08-28 17:05:43 UTC
++++ src/plugins/streamers/magic/unit_tests/unit_tests.pro
+@@ -11,9 +11,9 @@ SOURCES = \
+ INCLUDEPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+ DEPENDPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+
+-LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
+ PLUGINPATH = $$OUT_PWD/../../../../db_plugins
+ QMAKE_RPATHDIR += $$PLUGINPATH
+
+-LIBS += -L$$PLUGINPATH -lmag
++LIBS += $$PLUGINPATH/libmag.so
diff --git a/cad/klayout/files/patch-src-plugins-streamers-oasis-lay_plugin-lay_plugin.pro b/cad/klayout/files/patch-src-plugins-streamers-oasis-lay_plugin-lay_plugin.pro
new file mode 100644
index 000000000000..ac53f3928bf0
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-oasis-lay_plugin-lay_plugin.pro
@@ -0,0 +1,11 @@
+--- src/plugins/streamers/oasis/lay_plugin/lay_plugin.pro.orig 2021-08-28 17:35:02 UTC
++++ src/plugins/streamers/oasis/lay_plugin/lay_plugin.pro
+@@ -6,7 +6,7 @@ include($$PWD/../../../lay_plugin.pri)
+
+ INCLUDEPATH += $$PWD/../db_plugin
+ DEPENDPATH += $$PWD/../db_plugin
+-LIBS += -L$$DESTDIR/../db_plugins -loasis
++LIBS += $$DESTDIR/../db_plugins/liboasis.so
+
+ !isEmpty(RPATH) {
+ QMAKE_RPATHDIR += $$RPATH/db_plugins
diff --git a/cad/klayout/files/patch-src-plugins-streamers-oasis-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-plugins-streamers-oasis-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..01305a7a6dd1
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-oasis-unit_tests-unit_tests.pro
@@ -0,0 +1,14 @@
+--- src/plugins/streamers/oasis/unit_tests/unit_tests.pro.orig 2021-08-28 17:08:56 UTC
++++ src/plugins/streamers/oasis/unit_tests/unit_tests.pro
+@@ -13,9 +13,9 @@ SOURCES = \
+ INCLUDEPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+ DEPENDPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+
+-LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
+ PLUGINPATH = $$OUT_PWD/../../../../db_plugins
+ QMAKE_RPATHDIR += $$PLUGINPATH
+
+-LIBS += -L$$PLUGINPATH -loasis
++LIBS += $$PLUGINPATH/liboasis.so
diff --git a/cad/klayout/files/patch-src-plugins-streamers-pcb-lay_plugin-lay_plugin.pro b/cad/klayout/files/patch-src-plugins-streamers-pcb-lay_plugin-lay_plugin.pro
new file mode 100644
index 000000000000..e0444edc803b
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-pcb-lay_plugin-lay_plugin.pro
@@ -0,0 +1,11 @@
+--- src/plugins/streamers/pcb/lay_plugin/lay_plugin.pro.orig 2021-08-28 17:35:38 UTC
++++ src/plugins/streamers/pcb/lay_plugin/lay_plugin.pro
+@@ -6,7 +6,7 @@ include($$PWD/../../../lay_plugin.pri)
+
+ INCLUDEPATH += $$PWD/../db_plugin
+ DEPENDPATH += $$PWD/../db_plugin
+-LIBS += -L$$DESTDIR/../db_plugins -lpcb
++LIBS += $$DESTDIR/../db_plugins/libpcb.so
+
+ !isEmpty(RPATH) {
+ QMAKE_RPATHDIR += $$RPATH/db_plugins
diff --git a/cad/klayout/files/patch-src-plugins-streamers-pcb-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-plugins-streamers-pcb-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..2bf6f93430c6
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-streamers-pcb-unit_tests-unit_tests.pro
@@ -0,0 +1,14 @@
+--- src/plugins/streamers/pcb/unit_tests/unit_tests.pro.orig 2021-08-28 17:10:35 UTC
++++ src/plugins/streamers/pcb/unit_tests/unit_tests.pro
+@@ -11,9 +11,9 @@ SOURCES = \
+ INCLUDEPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+ DEPENDPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+
+-LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
+ PLUGINPATH = $$OUT_PWD/../../../../db_plugins
+ QMAKE_RPATHDIR += $$PLUGINPATH
+
+-LIBS += -L$$PLUGINPATH -lpcb
++LIBS += $$PLUGINPATH/libpcb.so
diff --git a/cad/klayout/files/patch-src-plugins-tools-diff-lay_plugin-lay_plugin.pro b/cad/klayout/files/patch-src-plugins-tools-diff-lay_plugin-lay_plugin.pro
new file mode 100644
index 000000000000..47fef30b315b
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-tools-diff-lay_plugin-lay_plugin.pro
@@ -0,0 +1,11 @@
+--- src/plugins/tools/diff/lay_plugin/lay_plugin.pro.orig 2021-07-23 08:00:26 UTC
++++ src/plugins/tools/diff/lay_plugin/lay_plugin.pro
+@@ -6,7 +6,7 @@ include($$PWD/../../../lay_plugin.pri)
+
+ INCLUDEPATH += $$RDB_INC $$ANT_INC
+ DEPENDPATH += $$RDB_INC $$ANT_INC
+-LIBS += -L$$DESTDIR/.. -lklayout_rdb -lklayout_ant
++LIBS += $$DESTDIR/../libklayout_rdb.so $$DESTDIR/../libklayout_ant.so
+
+ HEADERS = \
+ layDiffToolDialog.h
diff --git a/cad/klayout/files/patch-src-plugins-tools-net_tracer-lay_plugin-lay_plugin.pro b/cad/klayout/files/patch-src-plugins-tools-net_tracer-lay_plugin-lay_plugin.pro
new file mode 100644
index 000000000000..10aa9e06e115
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-tools-net_tracer-lay_plugin-lay_plugin.pro
@@ -0,0 +1,11 @@
+--- src/plugins/tools/net_tracer/lay_plugin/lay_plugin.pro.orig 2021-08-28 17:36:21 UTC
++++ src/plugins/tools/net_tracer/lay_plugin/lay_plugin.pro
+@@ -6,7 +6,7 @@ include($$PWD/../../../lay_plugin.pri)
+
+ INCLUDEPATH += $$PWD/../db_plugin
+ DEPENDPATH += $$PWD/../db_plugin
+-LIBS += -L$$DESTDIR/../db_plugins -lnet_tracer
++LIBS += $$DESTDIR/../db_plugins/libnet_tracer.so
+
+ !isEmpty(RPATH) {
+ QMAKE_RPATHDIR += $$RPATH/db_plugins
diff --git a/cad/klayout/files/patch-src-plugins-tools-net_tracer-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-plugins-tools-net_tracer-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..d16b0c359103
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-tools-net_tracer-unit_tests-unit_tests.pro
@@ -0,0 +1,15 @@
+--- src/plugins/tools/net_tracer/unit_tests/unit_tests.pro.orig 2021-08-28 17:13:55 UTC
++++ src/plugins/tools/net_tracer/unit_tests/unit_tests.pro
+@@ -12,10 +12,10 @@ SOURCES = \
+ INCLUDEPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+ DEPENDPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../db_plugin $$PWD/../../../common
+
+-LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
+ # This makes the test pull the mebes library for testing (not installed)
+ PLUGINPATH = $$OUT_PWD/../../../../db_plugins
+ QMAKE_RPATHDIR += $$PLUGINPATH
+
+-LIBS += -L$$PLUGINPATH -lnet_tracer
++LIBS += $$PLUGINPATH/libnet_tracer.so
diff --git a/cad/klayout/files/patch-src-plugins-tools-view_25d-lay_plugin-lay_plugin.pro b/cad/klayout/files/patch-src-plugins-tools-view_25d-lay_plugin-lay_plugin.pro
new file mode 100644
index 000000000000..3063c73daa29
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-tools-view_25d-lay_plugin-lay_plugin.pro
@@ -0,0 +1,11 @@
+--- src/plugins/tools/view_25d/lay_plugin/lay_plugin.pro.orig 2021-08-28 17:16:57 UTC
++++ src/plugins/tools/view_25d/lay_plugin/lay_plugin.pro
+@@ -6,7 +6,7 @@ include($$PWD/../../../lay_plugin.pri)
+
+ INCLUDEPATH += $$RDB_INC $$ANT_INC
+ DEPENDPATH += $$RDB_INC $$ANT_INC
+-LIBS += -L$$DESTDIR/.. -lklayout_rdb -lklayout_ant
++LIBS += $$DESTDIR/../libklayout_rdb.so $$DESTDIR/../libklayout_ant.so
+
+ HEADERS = \
+ layD25View.h \
diff --git a/cad/klayout/files/patch-src-plugins-tools-view_25d-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-plugins-tools-view_25d-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..9961390079b6
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-tools-view_25d-unit_tests-unit_tests.pro
@@ -0,0 +1,14 @@
+--- src/plugins/tools/view_25d/unit_tests/unit_tests.pro.orig 2021-08-28 17:15:44 UTC
++++ src/plugins/tools/view_25d/unit_tests/unit_tests.pro
+@@ -13,9 +13,9 @@ SOURCES = \
+ INCLUDEPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../lay_plugin $$PWD/../../../common
+ DEPENDPATH += $$LAY_INC $$TL_INC $$DB_INC $$GSI_INC $$PWD/../lay_plugin $$PWD/../../../common
+
+-LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
+ PLUGINPATH = $$OUT_PWD/../../../../lay_plugins
+ QMAKE_RPATHDIR += $$PLUGINPATH
+
+-LIBS += -L$$PLUGINPATH -ld25_ui
++LIBS += $$PLUGINPATH/libd25_ui.so
diff --git a/cad/klayout/files/patch-src-plugins-tools-xor-lay_plugin-lay_plugin.pro b/cad/klayout/files/patch-src-plugins-tools-xor-lay_plugin-lay_plugin.pro
new file mode 100644
index 000000000000..d8bcd08d88ca
--- /dev/null
+++ b/cad/klayout/files/patch-src-plugins-tools-xor-lay_plugin-lay_plugin.pro
@@ -0,0 +1,11 @@
+--- src/plugins/tools/xor/lay_plugin/lay_plugin.pro.orig 2021-08-28 17:14:52 UTC
++++ src/plugins/tools/xor/lay_plugin/lay_plugin.pro
+@@ -6,7 +6,7 @@ include($$PWD/../../../lay_plugin.pri)
+
+ INCLUDEPATH += $$RDB_INC $$ANT_INC
+ DEPENDPATH += $$RDB_INC $$ANT_INC
+-LIBS += -L$$DESTDIR/.. -lklayout_rdb -lklayout_ant
++LIBS += $$DESTDIR/../libklayout_rdb.so $$DESTDIR/../libklayout_ant.so
+
+ HEADERS = \
+ layXORToolDialog.h \
diff --git a/cad/klayout/files/patch-src-pya-pya-pya.pro b/cad/klayout/files/patch-src-pya-pya-pya.pro
new file mode 100644
index 000000000000..c0e4de65c1c0
--- /dev/null
+++ b/cad/klayout/files/patch-src-pya-pya-pya.pro
@@ -0,0 +1,11 @@
+--- src/pya/pya/pya.pro.orig 2021-08-28 17:01:08 UTC
++++ src/pya/pya/pya.pro
+@@ -35,7 +35,7 @@ HEADERS += \
+
+ INCLUDEPATH += "$$PYTHONINCLUDE" $$TL_INC $$GSI_INC
+ DEPENDPATH += "$$PYTHONINCLUDE" $$TL_INC $$GSI_INC
+-LIBS += "$$PYTHONLIBFILE" -L$$DESTDIR -lklayout_tl -lklayout_gsi
++LIBS += "$$PYTHONLIBFILE" $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so
+
+ !msvc {
+ # Python is somewhat sloppy and relies on the compiler initializing fields
diff --git a/cad/klayout/files/patch-src-pya-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-pya-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..a89e5f29b919
--- /dev/null
+++ b/cad/klayout/files/patch-src-pya-unit_tests-unit_tests.pro
@@ -0,0 +1,9 @@
+--- src/pya/unit_tests/unit_tests.pro.orig 2021-08-28 17:00:21 UTC
++++ src/pya/unit_tests/unit_tests.pro
+@@ -12,5 +12,5 @@ SOURCES = \
+ INCLUDEPATH += $$PYA_INC $$DB_INC $$TL_INC $$GSI_INC
+ DEPENDPATH += $$PYA_INC $$DB_INC $$TL_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_pya -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_pya.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-pyastub-pyastub.pro b/cad/klayout/files/patch-src-pyastub-pyastub.pro
new file mode 100644
index 000000000000..aaa46834b199
--- /dev/null
+++ b/cad/klayout/files/patch-src-pyastub-pyastub.pro
@@ -0,0 +1,11 @@
+--- src/pyastub/pyastub.pro.orig 2021-08-28 16:58:33 UTC
++++ src/pyastub/pyastub.pro
+@@ -10,7 +10,7 @@ SOURCES = pya.cc
+
+ INCLUDEPATH += $$TL_INC $$GSI_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so
+
+ HEADERS += \
+ pyaCommon.h \
diff --git a/cad/klayout/files/patch-src-pymod-QtCore-QtCore.pro b/cad/klayout/files/patch-src-pymod-QtCore-QtCore.pro
new file mode 100644
index 000000000000..672594500471
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-QtCore-QtCore.pro
@@ -0,0 +1,13 @@
+--- src/pymod/QtCore/QtCore.pro.orig 2021-08-28 19:54:37 UTC
++++ src/pymod/QtCore/QtCore.pro
+@@ -8,8 +8,8 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_QtCore -lklayout_QtGui
++LIBS += $$LIBDIR/libklayout_QtCore.so $$LIBDIR/libklayout_QtGui.so
+
+ equals(HAVE_QT5, "1") {
+- LIBS += -lklayout_QtWidgets
++ LIBS += $$LIBDIR/libklayout_QtWidgets.so
+ }
diff --git a/cad/klayout/files/patch-src-pymod-QtDesigner-QtDesigner.pro b/cad/klayout/files/patch-src-pymod-QtDesigner-QtDesigner.pro
new file mode 100644
index 000000000000..1dd0df4f8d8b
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-QtDesigner-QtDesigner.pro
@@ -0,0 +1,8 @@
+--- src/pymod/QtDesigner/QtDesigner.pro.orig 2021-08-28 19:56:24 UTC
++++ src/pymod/QtDesigner/QtDesigner.pro
+@@ -8,4 +8,4 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_QtDesigner
++LIBS += $$LIBDIR/libklayout_QtDesigner.so
diff --git a/cad/klayout/files/patch-src-pymod-QtGui-QtGui.pro b/cad/klayout/files/patch-src-pymod-QtGui-QtGui.pro
new file mode 100644
index 000000000000..3e1b4e3784e2
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-QtGui-QtGui.pro
@@ -0,0 +1,14 @@
+--- src/pymod/QtGui/QtGui.pro.orig 2021-07-23 08:00:26 UTC
++++ src/pymod/QtGui/QtGui.pro
+@@ -8,9 +8,9 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_QtGui -lklayout_QtCore
++LIBS += $$LIBDIR/libklayout_QtGui.so $$LIBDIR/libklayout_QtCore.so
+
+ equals(HAVE_QT5, "1") {
+- LIBS += -lklayout_QtWidgets
++ LIBS += $$LIBDIR/libklayout_QtWidgets.so
+ }
+
diff --git a/cad/klayout/files/patch-src-pymod-QtMultimedia-QtMultimedia.pro b/cad/klayout/files/patch-src-pymod-QtMultimedia-QtMultimedia.pro
new file mode 100644
index 000000000000..3dd77faff448
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-QtMultimedia-QtMultimedia.pro
@@ -0,0 +1,8 @@
+--- src/pymod/QtMultimedia/QtMultimedia.pro.orig 2021-08-28 19:57:41 UTC
++++ src/pymod/QtMultimedia/QtMultimedia.pro
+@@ -8,4 +8,4 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_QtMultimedia -lklayout_QtNetwork
++LIBS += $$LIBDIR/libklayout_QtMultimedia.so $$LIBDIR/libklayout_QtNetwork.so
diff --git a/cad/klayout/files/patch-src-pymod-QtNetwork-QtNetwork.pro b/cad/klayout/files/patch-src-pymod-QtNetwork-QtNetwork.pro
new file mode 100644
index 000000000000..570ad21d8f88
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-QtNetwork-QtNetwork.pro
@@ -0,0 +1,8 @@
+--- src/pymod/QtNetwork/QtNetwork.pro.orig 2021-08-28 19:58:14 UTC
++++ src/pymod/QtNetwork/QtNetwork.pro
+@@ -8,4 +8,4 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_QtNetwork
++LIBS += $$LIBDIR/libklayout_QtNetwork.so
diff --git a/cad/klayout/files/patch-src-pymod-QtPrintSupport-QtPrintSupport.pro b/cad/klayout/files/patch-src-pymod-QtPrintSupport-QtPrintSupport.pro
new file mode 100644
index 000000000000..5bfabd2c33d3
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-QtPrintSupport-QtPrintSupport.pro
@@ -0,0 +1,8 @@
+--- src/pymod/QtPrintSupport/QtPrintSupport.pro.orig 2021-08-28 19:59:00 UTC
++++ src/pymod/QtPrintSupport/QtPrintSupport.pro
+@@ -8,4 +8,4 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_QtPrintSupport
++LIBS += $$LIBDIR/libklayout_QtPrintSupport.so
diff --git a/cad/klayout/files/patch-src-pymod-QtSql-QtSql.pro b/cad/klayout/files/patch-src-pymod-QtSql-QtSql.pro
new file mode 100644
index 000000000000..99b21d612b4d
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-QtSql-QtSql.pro
@@ -0,0 +1,8 @@
+--- src/pymod/QtSql/QtSql.pro.orig 2021-08-28 19:58:35 UTC
++++ src/pymod/QtSql/QtSql.pro
+@@ -8,4 +8,4 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_QtSql
++LIBS += $$LIBDIR/libklayout_QtSql.so
diff --git a/cad/klayout/files/patch-src-pymod-QtSvg-QtSvg.pro b/cad/klayout/files/patch-src-pymod-QtSvg-QtSvg.pro
new file mode 100644
index 000000000000..fef9db258e60
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-QtSvg-QtSvg.pro
@@ -0,0 +1,8 @@
+--- src/pymod/QtSvg/QtSvg.pro.orig 2021-08-28 19:59:24 UTC
++++ src/pymod/QtSvg/QtSvg.pro
+@@ -8,4 +8,4 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_QtSvg
++LIBS += $$LIBDIR/libklayout_QtSvg.so
diff --git a/cad/klayout/files/patch-src-pymod-QtUiTools-QtUiTools.pro b/cad/klayout/files/patch-src-pymod-QtUiTools-QtUiTools.pro
new file mode 100644
index 000000000000..6e2fff6af033
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-QtUiTools-QtUiTools.pro
@@ -0,0 +1,11 @@
+--- src/pymod/QtUiTools/QtUiTools.pro.orig 2021-08-28 19:59:47 UTC
++++ src/pymod/QtUiTools/QtUiTools.pro
+@@ -8,6 +8,6 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_QtUiTools
+-LIBS += -lklayout_QtCore
++LIBS += $$LIBDIR/libklayout_QtUiTools.so
++LIBS += $$LIBDIR/libklayout_QtCore.so
+
diff --git a/cad/klayout/files/patch-src-pymod-QtWidgets-QtWidgets.pro b/cad/klayout/files/patch-src-pymod-QtWidgets-QtWidgets.pro
new file mode 100644
index 000000000000..5fc6e368d396
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-QtWidgets-QtWidgets.pro
@@ -0,0 +1,8 @@
+--- src/pymod/QtWidgets/QtWidgets.pro.orig 2021-08-28 20:00:23 UTC
++++ src/pymod/QtWidgets/QtWidgets.pro
+@@ -8,4 +8,4 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_QtWidgets
++LIBS += $$LIBDIR/libklayout_QtWidgets.so
diff --git a/cad/klayout/files/patch-src-pymod-QtXml-QtXml.pro b/cad/klayout/files/patch-src-pymod-QtXml-QtXml.pro
new file mode 100644
index 000000000000..d10ea20e80a1
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-QtXml-QtXml.pro
@@ -0,0 +1,17 @@
+--- src/pymod/QtXml/QtXml.pro.orig 2021-08-28 20:00:46 UTC
++++ src/pymod/QtXml/QtXml.pro
+@@ -8,11 +8,11 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_QtCore -lklayout_QtXml
++LIBS += $$LIBDIR/libklayout_QtCore.so $$LIBDIR/libklayout_QtXml.so
+
+ # Because of stupid dependency of QtCore on QtGui and this on QtWidgets:
+-LIBS += -lklayout_QtGui
++LIBS += $$LIBDIR/libklayout_QtGui.so
+
+ equals(HAVE_QT5, "1") {
+- LIBS += -lklayout_QtWidgets
++ LIBS += $$LIBDIR/libklayout_QtWidgets.so
+ }
diff --git a/cad/klayout/files/patch-src-pymod-QtXmlPatterns-QtXmlPatterns.pro b/cad/klayout/files/patch-src-pymod-QtXmlPatterns-QtXmlPatterns.pro
new file mode 100644
index 000000000000..91dbb660b561
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-QtXmlPatterns-QtXmlPatterns.pro
@@ -0,0 +1,8 @@
+--- src/pymod/QtXmlPatterns/QtXmlPatterns.pro.orig 2021-08-28 20:01:33 UTC
++++ src/pymod/QtXmlPatterns/QtXmlPatterns.pro
+@@ -8,4 +8,4 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_QtXmlPatterns -lklayout_QtNetwork
++LIBS += $$LIBDIR/libklayout_QtXmlPatterns.so $$LIBDIR/libklayout_QtNetwork.so
diff --git a/cad/klayout/files/patch-src-pymod-bridge_sample-bridge_sample.pro b/cad/klayout/files/patch-src-pymod-bridge_sample-bridge_sample.pro
new file mode 100644
index 000000000000..f5602f68888f
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-bridge_sample-bridge_sample.pro
@@ -0,0 +1,17 @@
+--- src/pymod/bridge_sample/bridge_sample.pro.orig 2021-08-28 20:02:06 UTC
++++ src/pymod/bridge_sample/bridge_sample.pro
+@@ -62,12 +62,12 @@ equals(HAVE_QT, "0") {
+ }
+ INCLUDEPATH += "$$PYTHONINCLUDE" $$INC/tl/tl $$INC/pya/pya $$INC/gsi/gsi
+ DEPENDPATH += "$$PYTHONINCLUDE" $$INC/tl/tl $$INC/pya/pya $$INC/gsi/gsi
+-LIBS += "$$PYTHONLIBFILE" -L$$LIBDIR -lklayout_tl -lklayout_pya -lklayout_gsi
++LIBS += "$$PYTHONLIBFILE" $$LIBDIR/libklayout_tl.so $$LIBDIR/libklayout_pya.so $$LIBDIR/libklayout_gsi.so
+
+ # Also include DB as this is our sample
+ INCLUDEPATH += $$INC/db/db
+ DEPENDPATH += $$INC/db/db
+-LIBS += -L$$LIBDIR -lklayout_db
++LIBS += $$LIBDIR/libklayout_db.so
+
+ # Pull in RPATH
+ !isEmpty(RPATH) {
diff --git a/cad/klayout/files/patch-src-pymod-db-db.pro b/cad/klayout/files/patch-src-pymod-db-db.pro
new file mode 100644
index 000000000000..309a5f5fc6d0
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-db-db.pro
@@ -0,0 +1,9 @@
+--- src/pymod/db/db.pro.orig 2021-08-28 20:04:23 UTC
++++ src/pymod/db/db.pro
+@@ -9,5 +9,5 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_db
++LIBS += $$LIBDIR/libklayout_db.so
+
diff --git a/cad/klayout/files/patch-src-pymod-lay-lay.pro b/cad/klayout/files/patch-src-pymod-lay-lay.pro
new file mode 100644
index 000000000000..75dc4cb0d5de
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-lay-lay.pro
@@ -0,0 +1,9 @@
+--- src/pymod/lay/lay.pro.orig 2021-08-28 20:04:46 UTC
++++ src/pymod/lay/lay.pro
+@@ -8,5 +8,5 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_lay
++LIBS += $$LIBDIR/libklayout_lay.so
+
diff --git a/cad/klayout/files/patch-src-pymod-pymod.pri b/cad/klayout/files/patch-src-pymod-pymod.pri
new file mode 100644
index 000000000000..3c0614680505
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-pymod.pri
@@ -0,0 +1,45 @@
+--- src/pymod/pymod.pri.orig 2021-07-23 08:00:26 UTC
++++ src/pymod/pymod.pri
+@@ -9,7 +9,7 @@ include($$PWD/../klayout.pri)
+
+ INCLUDEPATH += "$$PYTHONINCLUDE" $$TL_INC $$GSI_INC $$PYA_INC
+ DEPENDPATH += "$$PYTHONINCLUDE" $$TL_INC $$GSI_INC $$PYA_INC
+-LIBS += "$$PYTHONLIBFILE" -L$$LIBDIR -lklayout_tl -lklayout_gsi -lklayout_pya
++LIBS += "$$PYTHONLIBFILE" $$LIBDIR/libklayout_tl.so $$LIBDIR/libklayout_gsi.so $$LIBDIR/libklayout_pya.so
+
+ !msvc {
+ # Python is somewhat sloppy and relies on the compiler initializing fields
+@@ -38,14 +38,14 @@ win32 {
+
+ }
+
+-lib_target.path = $$PREFIX/pymod/klayout
++lib_target.path = $$shell_path($(INSTALLROOT)$(PYTHON_SITELIBDIR)/klayout)
+ # This would be nice:
+ # lib_target.files += $$DESTDIR_PYMOD/$${TARGET}$${PYTHONEXTSUFFIX}
+ # but some Qt versions need this explicitly:
+ msvc {
+ lib_target.extra = $(INSTALL_PROGRAM) $$shell_path($$DESTDIR_PYMOD/$${TARGET}$${PYTHONEXTSUFFIX}) $$shell_path($(INSTALLROOT)$$PREFIX/pymod/klayout)
+ } else {
+- lib_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/$${TARGET}$${PYTHONEXTSUFFIX} $(INSTALLROOT)$$PREFIX/pymod/klayout
++ lib_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/$${TARGET}$${PYTHONEXTSUFFIX} $$shell_path($(INSTALLROOT)$(PYTHON_SITELIBDIR)/klayout)
+ }
+ INSTALLS = lib_target
+
+@@ -58,14 +58,14 @@ INSTALLS = lib_target
+ }
+
+ # INSTALLS needs to be inside a lib or app templates.
+- modsrc_target.path = $$PREFIX/pymod/klayout/$$REALMODULE
++ modsrc_target.path = $$shell_path($(INSTALLROOT)$(PYTHON_SITELIBDIR)/klayout/$$REALMODULE)
+ # This would be nice:
+ # init_target.files += $$DESTDIR_PYMOD/$$REALMODULE/*
+ # but some Qt versions need this explicitly:
+ msvc {
+ modsrc_target.extra = $(INSTALL_PROGRAM) $$shell_path($$DESTDIR_PYMOD/$$REALMODULE/*.py) $$shell_path($(INSTALLROOT)$$PREFIX/pymod/klayout/$$REALMODULE)
+ } else {
+- modsrc_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/$$REALMODULE/*.py $(INSTALLROOT)$$PREFIX/pymod/klayout/$$REALMODULE
++ modsrc_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/$$REALMODULE/*.py $$shell_path($(INSTALLROOT)$(PYTHON_SITELIBDIR)/klayout/$$REALMODULE)
+ }
+ INSTALLS += modsrc_target
+
diff --git a/cad/klayout/files/patch-src-pymod-rdb-rdb.pro b/cad/klayout/files/patch-src-pymod-rdb-rdb.pro
new file mode 100644
index 000000000000..b311b65662a3
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-rdb-rdb.pro
@@ -0,0 +1,8 @@
+--- src/pymod/rdb/rdb.pro.orig 2021-08-28 20:05:07 UTC
++++ src/pymod/rdb/rdb.pro
+@@ -9,4 +9,4 @@ SOURCES = \
+
+ HEADERS += \
+
+-LIBS += -lklayout_rdb
++LIBS += $$LIBDIR/libklayout_rdb.so
diff --git a/cad/klayout/files/patch-src-pymod-tl-tl.pro b/cad/klayout/files/patch-src-pymod-tl-tl.pro
new file mode 100644
index 000000000000..626f54bad7d8
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-tl-tl.pro
@@ -0,0 +1,35 @@
+--- src/pymod/tl/tl.pro.orig 2021-07-23 08:00:26 UTC
++++ src/pymod/tl/tl.pro
+@@ -32,14 +32,14 @@ msvc {
+ }
+
+ # INSTALLS needs to be inside a lib or app templates.
+-init_target.path = $$PREFIX/pymod/klayout
++init_target.path = $$shell_path($(INSTALLROOT)$(PYTHON_SITELIBDIR)/klayout)
+ # This would be nice:
+ # init_target.files += $$DESTDIR_PYMOD/__init__.py
+ # but some Qt versions need this explicitly:
+ msvc {
+ init_target.extra = $(INSTALL_PROGRAM) $$shell_path($$DESTDIR_PYMOD/__init__.py) $$shell_path($(INSTALLROOT)$$PREFIX/pymod/klayout)
+ } else {
+- init_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/__init__.py $(INSTALLROOT)$$PREFIX/pymod/klayout
++ init_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/__init__.py $$shell_path($(INSTALLROOT)$(PYTHON_SITELIBDIR)/klayout)
+ }
+ INSTALLS += init_target
+
+@@ -52,13 +52,13 @@ msvc {
+ }
+
+ # INSTALLS needs to be inside a lib or app templates.
+-modpyasrc_target.path = $$PREFIX/pymod/pya
++modpyasrc_target.path = $$shell_path($(INSTALLROOT)$(PYTHON_SITELIBDIR)/klayout/pya)
+ # This would be nice:
+ # init_target.files += $$DESTDIR_PYMOD/pya/*
+ # but some Qt versions need this explicitly:
+ msvc {
+ modpyasrc_target.extra = $(INSTALL_PROGRAM) $$shell_path($$DESTDIR_PYMOD/../pya/*.py) $$shell_path($(INSTALLROOT)$$PREFIX/pymod/pya)
+ } else {
+- modpyasrc_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/../pya/*.py $(INSTALLROOT)$$PREFIX/pymod/pya
++ modpyasrc_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/../pya/*.py $$shell_path($(INSTALLROOT)$(PYTHON_SITELIBDIR)/klayout/pya)
+ }
+ INSTALLS += modpyasrc_target
diff --git a/cad/klayout/files/patch-src-pymod-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-pymod-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..8b547d4b9596
--- /dev/null
+++ b/cad/klayout/files/patch-src-pymod-unit_tests-unit_tests.pro
@@ -0,0 +1,8 @@
+--- src/pymod/unit_tests/unit_tests.pro.orig 2021-08-28 20:05:32 UTC
++++ src/pymod/unit_tests/unit_tests.pro
+@@ -34,4 +34,4 @@ msvc {
+ INCLUDEPATH += $$DB_INC $$TL_INC $$GSI_INC
+ DEPENDPATH += $$DB_INC $$TL_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
diff --git a/cad/klayout/files/patch-src-rba-rba-rba.pro b/cad/klayout/files/patch-src-rba-rba-rba.pro
new file mode 100644
index 000000000000..d44dd3168004
--- /dev/null
+++ b/cad/klayout/files/patch-src-rba-rba-rba.pro
@@ -0,0 +1,9 @@
+--- src/rba/rba/rba.pro.orig 2021-08-28 16:13:08 UTC
++++ src/rba/rba/rba.pro
+@@ -25,5 +25,5 @@ HEADERS += \
+ # NOTE: ../common needs to be before RUBYINCLUDE since there is a config.h too.
+ INCLUDEPATH += ../common "$$RUBYINCLUDE" "$$RUBYINCLUDE2" $$TL_INC $$GSI_INC
+ DEPENDPATH += ../common "$$RUBYINCLUDE" "$$RUBYINCLUDE2" $$TL_INC $$GSI_INC
+-LIBS += "$$RUBYLIBFILE" -L$$DESTDIR -lklayout_tl -lklayout_gsi
++LIBS += "$$RUBYLIBFILE" $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-rba-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-rba-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..a5acb1bc557f
--- /dev/null
+++ b/cad/klayout/files/patch-src-rba-unit_tests-unit_tests.pro
@@ -0,0 +1,11 @@
+--- src/rba/unit_tests/unit_tests.pro.orig 2021-07-23 08:00:26 UTC
++++ src/rba/unit_tests/unit_tests.pro
+@@ -12,6 +12,6 @@ SOURCES = \
+ INCLUDEPATH += $$RBA_INC $$TL_INC $$DB_INC $$GSI_INC
+ DEPENDPATH += $$RBA_INC $$TL_INC $$DB_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_rba -lklayout_tl -lklayout_db -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_rba.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_gsi.so
+
+-RESOURCES = unit_tests.qrc \
++RESOURCES = unit_tests.qrc
diff --git a/cad/klayout/files/patch-src-rbastub-rbastub.pro b/cad/klayout/files/patch-src-rbastub-rbastub.pro
new file mode 100644
index 000000000000..cb1eeef49fe1
--- /dev/null
+++ b/cad/klayout/files/patch-src-rbastub-rbastub.pro
@@ -0,0 +1,9 @@
+--- src/rbastub/rbastub.pro.orig 2021-08-28 16:09:14 UTC
++++ src/rbastub/rbastub.pro
+@@ -12,5 +12,5 @@ SOURCES = rba.cc
+
+ INCLUDEPATH += $$TL_INC $$GSI_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-rdb-rdb-rdb.pro b/cad/klayout/files/patch-src-rdb-rdb-rdb.pro
new file mode 100644
index 000000000000..e50233d4822e
--- /dev/null
+++ b/cad/klayout/files/patch-src-rdb-rdb-rdb.pro
@@ -0,0 +1,9 @@
+--- src/rdb/rdb/rdb.pro.orig 2021-08-28 16:07:29 UTC
++++ src/rdb/rdb/rdb.pro
+@@ -30,5 +30,5 @@ HEADERS = \
+
+ INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC
+ DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC
+-LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db
++LIBS += $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_db.so
+
diff --git a/cad/klayout/files/patch-src-rdb-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-rdb-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..dae99b0952bc
--- /dev/null
+++ b/cad/klayout/files/patch-src-rdb-unit_tests-unit_tests.pro
@@ -0,0 +1,9 @@
+--- src/rdb/unit_tests/unit_tests.pro.orig 2021-08-28 16:08:37 UTC
++++ src/rdb/unit_tests/unit_tests.pro
+@@ -13,5 +13,5 @@ SOURCES = \
+ INCLUDEPATH += $$RDB_INC $$TL_INC $$DB_INC $$GSI_INC
+ DEPENDPATH += $$RDB_INC $$TL_INC $$DB_INC $$GSI_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_rdb -lklayout_db -lklayout_tl -lklayout_gsi
++LIBS += $$DESTDIR_UT/libklayout_rdb.so $$DESTDIR_UT/libklayout_db.so $$DESTDIR_UT/libklayout_tl.so $$DESTDIR_UT/libklayout_gsi.so
+
diff --git a/cad/klayout/files/patch-src-tl-tl-tlStream.cc b/cad/klayout/files/patch-src-tl-tl-tlStream.cc
deleted file mode 100644
index c5d9b81f9b36..000000000000
--- a/cad/klayout/files/patch-src-tl-tl-tlStream.cc
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/tl/tl/tlStream.cc.orig 2019-02-23 17:34:47 UTC
-+++ src/tl/tl/tlStream.cc
-@@ -30,6 +30,8 @@
- #include <errno.h>
- #ifdef _WIN32
- # include <io.h>
-+#else
-+# include <unistd.h>
- #endif
-
- #include "tlStream.h"
-@@ -1089,7 +1091,7 @@ OutputFile::~OutputFile ()
- #if defined(_WIN32)
- _close (m_fd);
- #else
-- close (m_fd);
-+ ::close (m_fd);
- #endif
- m_fd = -1;
- }
diff --git a/cad/klayout/files/patch-src-tl-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-tl-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..b96af3780da7
--- /dev/null
+++ b/cad/klayout/files/patch-src-tl-unit_tests-unit_tests.pro
@@ -0,0 +1,9 @@
+--- src/tl/unit_tests/unit_tests.pro.orig 2021-08-28 16:09:42 UTC
++++ src/tl/unit_tests/unit_tests.pro
+@@ -54,5 +54,5 @@ SOURCES = \
+ INCLUDEPATH += $$TL_INC
+ DEPENDPATH += $$TL_INC
+
+-LIBS += -L$$DESTDIR_UT -lklayout_tl
++LIBS += $$DESTDIR_UT/libklayout_tl.so
+
diff --git a/cad/klayout/files/patch-src-unit_tests-unit_tests.pro b/cad/klayout/files/patch-src-unit_tests-unit_tests.pro
new file mode 100644
index 000000000000..963dafd10498
--- /dev/null
+++ b/cad/klayout/files/patch-src-unit_tests-unit_tests.pro
@@ -0,0 +1,28 @@
+--- src/unit_tests/unit_tests.pro.orig 2021-07-23 08:00:26 UTC
++++ src/unit_tests/unit_tests.pro
+@@ -23,10 +23,10 @@ HEADERS += \
+ !win32 {
+ LIBS += -ldl
+ } else {
+- LIBS += -lshell32
++ LIBS += $$DESTDIR/libshell32.so
+ }
+
+-LIBS += -lklayout_gsi_test
++LIBS += $$DESTDIR/libklayout_gsi_test.so
+
+ !equals(HAVE_QT, "0") {
+
+@@ -35,10 +35,10 @@ LIBS += -lklayout_gsi_test
+
+ equals(HAVE_QTBINDINGS, "1") {
+ !equals(HAVE_QT_XML, "0") {
+- LIBS += -lklayout_QtXml
++ LIBS += $$DESTDIR/libklayout_QtXml.so
+ }
+ equals(HAVE_QT5, "1") {
+- LIBS += -lklayout_QtWidgets
++ LIBS += $$DESTDIR/libklayout_QtWidgets.so
+ }
+ }
+
diff --git a/cad/klayout/files/patch-src-with_all_libs.pri b/cad/klayout/files/patch-src-with_all_libs.pri
new file mode 100644
index 000000000000..93b34f5ca064
--- /dev/null
+++ b/cad/klayout/files/patch-src-with_all_libs.pri
@@ -0,0 +1,55 @@
+--- src/with_all_libs.pri.orig 2021-07-23 08:00:26 UTC
++++ src/with_all_libs.pri
+@@ -2,14 +2,14 @@
+ INCLUDEPATH += $$RBA_INC $$PYA_INC $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LYM_INC $$LAYBASIC_INC $$LAY_INC $$ANT_INC $$IMG_INC $$EDT_INC $$LIB_INC $$VERSION_INC
+ DEPENDPATH += $$RBA_INC $$PYA_INC $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LYM_INC $$LAYBASIC_INC $$LAY_INC $$ANT_INC $$IMG_INC $$EDT_INC $$LIB_INC $$VERSION_INC
+
+-LIBS += "$$PYTHONLIBFILE" "$$RUBYLIBFILE" -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db -lklayout_rdb -lklayout_lib
++LIBS += "$$PYTHONLIBFILE" "$$RUBYLIBFILE" $$DESTDIR/libklayout_tl.so $$DESTDIR/libklayout_gsi.so $$DESTDIR/libklayout_db.so $$DESTDIR/libklayout_rdb.so $$DESTDIR/libklayout_lib.so
+
+ !equals(HAVE_QT, "0") {
+
+ INCLUDEPATH += $$LYM_INC $$LAYBASIC_INC $$LAY_INC $$ANT_INC $$IMG_INC $$EDT_INC
+ DEPENDPATH += $$LYM_INC $$LAYBASIC_INC $$LAY_INC $$ANT_INC $$IMG_INC $$EDT_INC
+
+- LIBS += -L$$DESTDIR -lklayout_lym -lklayout_laybasic -lklayout_lay -lklayout_ant -lklayout_img -lklayout_edt
++ LIBS += $$DESTDIR/libklayout_lym.so $$DESTDIR/libklayout_laybasic.so $$DESTDIR/libklayout_lay.so $$DESTDIR/libklayout_ant.so $$DESTDIR/libklayout_img.so $$DESTDIR/libklayout_edt.so
+
+ # Note: this accounts for UI-generated headers placed into the output folders in
+ # shadow builds:
+@@ -17,21 +17,21 @@ LIBS += "$$PYTHONLIBFILE" "$$RUBYLIBFILE" -L$$DESTDIR
+ DEPENDPATH += $$DESTDIR/laybasic $$DESTDIR/lay $$DESTDIR/ext
+
+ equals(HAVE_QTBINDINGS, "1") {
+- LIBS += -lklayout_qtbasic -lklayout_QtGui -lklayout_QtCore
++ LIBS += $$DESTDIR/libklayout_qtbasic.so $$DESTDIR/libklayout_QtGui.so $$DESTDIR/libklayout_QtCore.so
+ }
+
+ }
+
+ equals(HAVE_RUBY, "1") {
+- LIBS += -lklayout_rba
++ LIBS += $$DESTDIR/libklayout_rba.so
+ } else {
+- LIBS += -lklayout_rbastub
++ LIBS += $$DESTDIR/libklayout_rbastub.so
+ }
+
+ equals(HAVE_PYTHON, "1") {
+- LIBS += -lklayout_pya
++ LIBS += $$DESTDIR/libklayout_pya.so
+ } else {
+- LIBS += -lklayout_pyastub
++ LIBS += $$DESTDIR/libklayout_pyastub.so
+ }
+
+ !equals(HAVE_QT, "0") {
+@@ -39,7 +39,7 @@ equals(HAVE_PYTHON, "1") {
+ # DRC is only available with Ruby
+ INCLUDEPATH += $$DRC_INC $$LVS_INC
+ DEPENDPATH += $$DRC_INC $$LVS_INC
+- LIBS += -lklayout_drc -lklayout_lvs
++ LIBS += $$DESTDIR/libklayout_drc.so $$DESTDIR/libklayout_lvs.so
+ }
+ }
+
diff --git a/cad/klayout/pkg-plist b/cad/klayout/pkg-plist
index 27ec862549f5..8f76a2e55465 100644
--- a/cad/klayout/pkg-plist
+++ b/cad/klayout/pkg-plist
@@ -3,77 +3,306 @@ bin/strm2cif
bin/strm2dxf
bin/strm2gds
bin/strm2gdstxt
+bin/strm2mag
bin/strm2oas
bin/strm2txt
bin/strmclip
bin/strmcmp
bin/strmrun
bin/strmxor
-lib/libklayout_ant.so
-lib/libklayout_ant.so.0
-lib/libklayout_ant.so.0.25
-lib/libklayout_ant.so.0.25.8
-lib/libklayout_bd.so
-lib/libklayout_bd.so.0
-lib/libklayout_bd.so.0.25
-lib/libklayout_bd.so.0.25.8
-lib/libklayout_db.so
-lib/libklayout_db.so.0
-lib/libklayout_db.so.0.25
-lib/libklayout_db.so.0.25.8
-lib/libklayout_drc.so
-lib/libklayout_drc.so.0
-lib/libklayout_drc.so.0.25
-lib/libklayout_drc.so.0.25.8
-lib/libklayout_edt.so
-lib/libklayout_edt.so.0
-lib/libklayout_edt.so.0.25
-lib/libklayout_edt.so.0.25.8
-lib/libklayout_ext.so
-lib/libklayout_ext.so.0
-lib/libklayout_ext.so.0.25
-lib/libklayout_ext.so.0.25.8
-lib/libklayout_gsi.so
-lib/libklayout_gsi.so.0
-lib/libklayout_gsi.so.0.25
-lib/libklayout_gsi.so.0.25.8
-lib/libklayout_gsiqt.so
-lib/libklayout_gsiqt.so.0
-lib/libklayout_gsiqt.so.0.25
-lib/libklayout_gsiqt.so.0.25.8
-lib/libklayout_img.so
-lib/libklayout_img.so.0
-lib/libklayout_img.so.0.25
-lib/libklayout_img.so.0.25.8
-lib/libklayout_lay.so
-lib/libklayout_lay.so.0
-lib/libklayout_lay.so.0.25
-lib/libklayout_lay.so.0.25.8
-lib/libklayout_laybasic.so
-lib/libklayout_laybasic.so.0
-lib/libklayout_laybasic.so.0.25
-lib/libklayout_laybasic.so.0.25.8
-lib/libklayout_lib.so
-lib/libklayout_lib.so.0
-lib/libklayout_lib.so.0.25
-lib/libklayout_lib.so.0.25.8
-lib/libklayout_lym.so
-lib/libklayout_lym.so.0
-lib/libklayout_lym.so.0.25
-lib/libklayout_lym.so.0.25.8
-lib/libklayout_pya.so
-lib/libklayout_pya.so.0
-lib/libklayout_pya.so.0.25
-lib/libklayout_pya.so.0.25.8
-lib/libklayout_rba.so
-lib/libklayout_rba.so.0
-lib/libklayout_rba.so.0.25
-lib/libklayout_rba.so.0.25.8
-lib/libklayout_rdb.so
-lib/libklayout_rdb.so.0
-lib/libklayout_rdb.so.0.25
-lib/libklayout_rdb.so.0.25.8
-lib/libklayout_tl.so
-lib/libklayout_tl.so.0
-lib/libklayout_tl.so.0.25
-lib/libklayout_tl.so.0.25.8
+lib/klayout/db_plugins/libcif.so
+lib/klayout/db_plugins/libcif.so.0
+lib/klayout/db_plugins/libcif.so.0.27
+lib/klayout/db_plugins/libcif.so.0.27.3
+lib/klayout/db_plugins/libdxf.so
+lib/klayout/db_plugins/libdxf.so.0
+lib/klayout/db_plugins/libdxf.so.0.27
+lib/klayout/db_plugins/libdxf.so.0.27.3
+lib/klayout/db_plugins/libgds2.so
+lib/klayout/db_plugins/libgds2.so.0
+lib/klayout/db_plugins/libgds2.so.0.27
+lib/klayout/db_plugins/libgds2.so.0.27.3
+lib/klayout/db_plugins/liblefdef.so
+lib/klayout/db_plugins/liblefdef.so.0
+lib/klayout/db_plugins/liblefdef.so.0.27
+lib/klayout/db_plugins/liblefdef.so.0.27.3
+lib/klayout/db_plugins/libmag.so
+lib/klayout/db_plugins/libmag.so.0
+lib/klayout/db_plugins/libmag.so.0.27
+lib/klayout/db_plugins/libmag.so.0.27.3
+lib/klayout/db_plugins/libnet_tracer.so
+lib/klayout/db_plugins/libnet_tracer.so.0
+lib/klayout/db_plugins/libnet_tracer.so.0.27
+lib/klayout/db_plugins/libnet_tracer.so.0.27.3
+lib/klayout/db_plugins/liboasis.so
+lib/klayout/db_plugins/liboasis.so.0
+lib/klayout/db_plugins/liboasis.so.0.27
+lib/klayout/db_plugins/liboasis.so.0.27.3
+lib/klayout/db_plugins/libpcb.so
+lib/klayout/db_plugins/libpcb.so.0
+lib/klayout/db_plugins/libpcb.so.0.27
+lib/klayout/db_plugins/libpcb.so.0.27.3
+lib/klayout/lay_plugins/libbool_ui.so
+lib/klayout/lay_plugins/libbool_ui.so.0
+lib/klayout/lay_plugins/libbool_ui.so.0.27
+lib/klayout/lay_plugins/libbool_ui.so.0.27.3
+lib/klayout/lay_plugins/libcif_ui.so
+lib/klayout/lay_plugins/libcif_ui.so.0
+lib/klayout/lay_plugins/libcif_ui.so.0.27
+lib/klayout/lay_plugins/libcif_ui.so.0.27.3
+lib/klayout/lay_plugins/libcommon_ui.so
+lib/klayout/lay_plugins/libcommon_ui.so.0
+lib/klayout/lay_plugins/libcommon_ui.so.0.27
+lib/klayout/lay_plugins/libcommon_ui.so.0.27.3
+lib/klayout/lay_plugins/libd25_ui.so
+lib/klayout/lay_plugins/libd25_ui.so.0
+lib/klayout/lay_plugins/libd25_ui.so.0.27
+lib/klayout/lay_plugins/libd25_ui.so.0.27.3
+lib/klayout/lay_plugins/libdiff_ui.so
+lib/klayout/lay_plugins/libdiff_ui.so.0
+lib/klayout/lay_plugins/libdiff_ui.so.0.27
+lib/klayout/lay_plugins/libdiff_ui.so.0.27.3
+lib/klayout/lay_plugins/libdxf_ui.so
+lib/klayout/lay_plugins/libdxf_ui.so.0
+lib/klayout/lay_plugins/libdxf_ui.so.0.27
+lib/klayout/lay_plugins/libdxf_ui.so.0.27.3
+lib/klayout/lay_plugins/libgds2_ui.so
+lib/klayout/lay_plugins/libgds2_ui.so.0
+lib/klayout/lay_plugins/libgds2_ui.so.0.27
+lib/klayout/lay_plugins/libgds2_ui.so.0.27.3
+lib/klayout/lay_plugins/libimport_ui.so
+lib/klayout/lay_plugins/libimport_ui.so.0
+lib/klayout/lay_plugins/libimport_ui.so.0.27
+lib/klayout/lay_plugins/libimport_ui.so.0.27.3
+lib/klayout/lay_plugins/liblefdef_ui.so
+lib/klayout/lay_plugins/liblefdef_ui.so.0
+lib/klayout/lay_plugins/liblefdef_ui.so.0.27
+lib/klayout/lay_plugins/liblefdef_ui.so.0.27.3
+lib/klayout/lay_plugins/libmag_ui.so
+lib/klayout/lay_plugins/libmag_ui.so.0
+lib/klayout/lay_plugins/libmag_ui.so.0.27
+lib/klayout/lay_plugins/libmag_ui.so.0.27.3
+lib/klayout/lay_plugins/libnet_tracer_ui.so
+lib/klayout/lay_plugins/libnet_tracer_ui.so.0
+lib/klayout/lay_plugins/libnet_tracer_ui.so.0.27
+lib/klayout/lay_plugins/libnet_tracer_ui.so.0.27.3
+lib/klayout/lay_plugins/liboasis_ui.so
+lib/klayout/lay_plugins/liboasis_ui.so.0
+lib/klayout/lay_plugins/liboasis_ui.so.0.27
+lib/klayout/lay_plugins/liboasis_ui.so.0.27.3
+lib/klayout/lay_plugins/libpcb_ui.so
+lib/klayout/lay_plugins/libpcb_ui.so.0
+lib/klayout/lay_plugins/libpcb_ui.so.0.27
+lib/klayout/lay_plugins/libpcb_ui.so.0.27.3
+lib/klayout/lay_plugins/libxor_ui.so
+lib/klayout/lay_plugins/libxor_ui.so.0
+lib/klayout/lay_plugins/libxor_ui.so.0.27
+lib/klayout/lay_plugins/libxor_ui.so.0.27.3
+@dir lib/klayout/lay_plugins
+lib/klayout/libbridge_mod.so
+lib/klayout/libbridge_mod.so.1
+lib/klayout/libbridge_mod.so.1.0
+lib/klayout/libbridge_mod.so.1.0.0
+lib/klayout/libdbcore.so
+lib/klayout/libdbcore.so.0
+lib/klayout/libdbcore.so.0.27
+lib/klayout/libdbcore.so.0.27.3
+lib/klayout/libklayout_ant.so
+lib/klayout/libklayout_ant.so.0
+lib/klayout/libklayout_ant.so.0.27
+lib/klayout/libklayout_ant.so.0.27.3
+lib/klayout/libklayout_bd.so
+lib/klayout/libklayout_bd.so.0
+lib/klayout/libklayout_bd.so.0.27
+lib/klayout/libklayout_bd.so.0.27.3
+lib/klayout/libklayout_db.so
+lib/klayout/libklayout_db.so.0
+lib/klayout/libklayout_db.so.0.27
+lib/klayout/libklayout_db.so.0.27.3
+lib/klayout/libklayout_drc.so
+lib/klayout/libklayout_drc.so.0
+lib/klayout/libklayout_drc.so.0.27
+lib/klayout/libklayout_drc.so.0.27.3
+lib/klayout/libklayout_edt.so
+lib/klayout/libklayout_edt.so.0
+lib/klayout/libklayout_edt.so.0.27
+lib/klayout/libklayout_edt.so.0.27.3
+lib/klayout/libklayout_gsi_test.so
+lib/klayout/libklayout_gsi_test.so.0
+lib/klayout/libklayout_gsi_test.so.0.27
+lib/klayout/libklayout_gsi_test.so.0.27.3
+lib/klayout/libklayout_gsi.so
+lib/klayout/libklayout_gsi.so.0
+lib/klayout/libklayout_gsi.so.0.27
+lib/klayout/libklayout_gsi.so.0.27.3
+lib/klayout/libklayout_img.so
+lib/klayout/libklayout_img.so.0
+lib/klayout/libklayout_img.so.0.27
+lib/klayout/libklayout_img.so.0.27.3
+lib/klayout/libklayout_lay.so
+lib/klayout/libklayout_lay.so.0
+lib/klayout/libklayout_lay.so.0.27
+lib/klayout/libklayout_lay.so.0.27.3
+lib/klayout/libklayout_laybasic.so
+lib/klayout/libklayout_laybasic.so.0
+lib/klayout/libklayout_laybasic.so.0.27
+lib/klayout/libklayout_laybasic.so.0.27.3
+lib/klayout/libklayout_lib.so
+lib/klayout/libklayout_lib.so.0
+lib/klayout/libklayout_lib.so.0.27
+lib/klayout/libklayout_lib.so.0.27.3
+lib/klayout/libklayout_lvs.so
+lib/klayout/libklayout_lvs.so.0
+lib/klayout/libklayout_lvs.so.0.27
+lib/klayout/libklayout_lvs.so.0.27.3
+lib/klayout/libklayout_lym.so
+lib/klayout/libklayout_lym.so.0
+lib/klayout/libklayout_lym.so.0.27
+lib/klayout/libklayout_lym.so.0.27.3
+lib/klayout/libklayout_pya.so
+lib/klayout/libklayout_pya.so.0
+lib/klayout/libklayout_pya.so.0.27
+lib/klayout/libklayout_pya.so.0.27.3
+lib/klayout/libklayout_qtbasic.so
+lib/klayout/libklayout_qtbasic.so.0
+lib/klayout/libklayout_qtbasic.so.0.27
+lib/klayout/libklayout_qtbasic.so.0.27.3
+lib/klayout/libklayout_QtCore.so
+lib/klayout/libklayout_QtCore.so.0
+lib/klayout/libklayout_QtCore.so.0.27
+lib/klayout/libklayout_QtCore.so.0.27.3
+lib/klayout/libklayout_QtDesigner.so
+lib/klayout/libklayout_QtDesigner.so.0
+lib/klayout/libklayout_QtDesigner.so.0.27
+lib/klayout/libklayout_QtDesigner.so.0.27.3
+lib/klayout/libklayout_QtGui.so
+lib/klayout/libklayout_QtGui.so.0
+lib/klayout/libklayout_QtGui.so.0.27
+lib/klayout/libklayout_QtGui.so.0.27.3
+lib/klayout/libklayout_QtMultimedia.so
+lib/klayout/libklayout_QtMultimedia.so.0
+lib/klayout/libklayout_QtMultimedia.so.0.27
+lib/klayout/libklayout_QtMultimedia.so.0.27.3
+lib/klayout/libklayout_QtNetwork.so
+lib/klayout/libklayout_QtNetwork.so.0
+lib/klayout/libklayout_QtNetwork.so.0.27
+lib/klayout/libklayout_QtNetwork.so.0.27.3
+lib/klayout/libklayout_QtPrintSupport.so
+lib/klayout/libklayout_QtPrintSupport.so.0
+lib/klayout/libklayout_QtPrintSupport.so.0.27
+lib/klayout/libklayout_QtPrintSupport.so.0.27.3
+lib/klayout/libklayout_QtSql.so
+lib/klayout/libklayout_QtSql.so.0
+lib/klayout/libklayout_QtSql.so.0.27
+lib/klayout/libklayout_QtSql.so.0.27.3
+lib/klayout/libklayout_QtSvg.so
+lib/klayout/libklayout_QtSvg.so.0
+lib/klayout/libklayout_QtSvg.so.0.27
+lib/klayout/libklayout_QtSvg.so.0.27.3
+lib/klayout/libklayout_QtWidgets.so
+lib/klayout/libklayout_QtWidgets.so.0
+lib/klayout/libklayout_QtWidgets.so.0.27
+lib/klayout/libklayout_QtWidgets.so.0.27.3
+lib/klayout/libklayout_QtXml.so
+lib/klayout/libklayout_QtXml.so.0
+lib/klayout/libklayout_QtXml.so.0.27
+lib/klayout/libklayout_QtXml.so.0.27.3
+lib/klayout/libklayout_QtXmlPatterns.so
+lib/klayout/libklayout_QtXmlPatterns.so.0
+lib/klayout/libklayout_QtXmlPatterns.so.0.27
+lib/klayout/libklayout_QtXmlPatterns.so.0.27.3
+lib/klayout/libklayout_rba.so
+lib/klayout/libklayout_rba.so.0
+lib/klayout/libklayout_rba.so.0.27
+lib/klayout/libklayout_rba.so.0.27.3
+lib/klayout/libklayout_rdb.so
+lib/klayout/libklayout_rdb.so.0
+lib/klayout/libklayout_rdb.so.0.27
+lib/klayout/libklayout_rdb.so.0.27.3
+lib/klayout/libklayout_tl.so
+lib/klayout/libklayout_tl.so.0
+lib/klayout/libklayout_tl.so.0.27
+lib/klayout/libklayout_tl.so.0.27.3
+lib/klayout/liblay.so
+lib/klayout/liblay.so.0
+lib/klayout/liblay.so.0.27
+lib/klayout/liblay.so.0.27.3
+lib/klayout/liblibcore.so
+lib/klayout/liblibcore.so.0
+lib/klayout/liblibcore.so.0.27
+lib/klayout/liblibcore.so.0.27.3
+lib/klayout/libQtCore.so
+lib/klayout/libQtCore.so.0
+lib/klayout/libQtCore.so.0.27
+lib/klayout/libQtCore.so.0.27.3
+lib/klayout/libQtDesigner.so
+lib/klayout/libQtDesigner.so.0
+lib/klayout/libQtDesigner.so.0.27
+lib/klayout/libQtDesigner.so.0.27.3
+lib/klayout/libQtGui.so
+lib/klayout/libQtGui.so.0
+lib/klayout/libQtGui.so.0.27
+lib/klayout/libQtGui.so.0.27.3
+lib/klayout/libQtMultimedia.so
+lib/klayout/libQtMultimedia.so.0
+lib/klayout/libQtMultimedia.so.0.27
+lib/klayout/libQtMultimedia.so.0.27.3
+lib/klayout/libQtNetwork.so
+lib/klayout/libQtNetwork.so.0
+lib/klayout/libQtNetwork.so.0.27
+lib/klayout/libQtNetwork.so.0.27.3
+lib/klayout/libQtPrintSupport.so
+lib/klayout/libQtPrintSupport.so.0
+lib/klayout/libQtPrintSupport.so.0.27
+lib/klayout/libQtPrintSupport.so.0.27.3
+lib/klayout/libQtSql.so
+lib/klayout/libQtSql.so.0
+lib/klayout/libQtSql.so.0.27
+lib/klayout/libQtSql.so.0.27.3
+lib/klayout/libQtSvg.so
+lib/klayout/libQtSvg.so.0
+lib/klayout/libQtSvg.so.0.27
+lib/klayout/libQtSvg.so.0.27.3
+lib/klayout/libQtWidgets.so
+lib/klayout/libQtWidgets.so.0
+lib/klayout/libQtWidgets.so.0.27
+lib/klayout/libQtWidgets.so.0.27.3
+lib/klayout/libQtXml.so
+lib/klayout/libQtXml.so.0
+lib/klayout/libQtXml.so.0.27
+lib/klayout/libQtXml.so.0.27.3
+lib/klayout/libQtXmlPatterns.so
+lib/klayout/libQtXmlPatterns.so.0
+lib/klayout/libQtXmlPatterns.so.0.27
+lib/klayout/libQtXmlPatterns.so.0.27.3
+lib/klayout/librdbcore.so
+lib/klayout/librdbcore.so.0
+lib/klayout/librdbcore.so.0.27
+lib/klayout/librdbcore.so.0.27.3
+lib/klayout/libtlcore.so
+lib/klayout/libtlcore.so.0
+lib/klayout/libtlcore.so.0.27
+lib/klayout/libtlcore.so.0.27.3
+%%PYTHON_SITELIBDIR%%/klayout/__init__.py
+%%PYTHON_SITELIBDIR%%/klayout/db/__init__.py
+%%PYTHON_SITELIBDIR%%/klayout/db/pcell_declaration_helper.py
+%%PYTHON_SITELIBDIR%%/klayout/dbcore%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/lay%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/lib/__init__.py
+%%PYTHON_SITELIBDIR%%/klayout/libcore%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/pya/__init__.py
+%%PYTHON_SITELIBDIR%%/klayout/QtCore%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/QtDesigner%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/QtGui%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/QtMultimedia%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/QtNetwork%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/QtPrintSupport%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/QtSql%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/QtSvg%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/QtWidgets%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/QtXml%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/QtXmlPatterns%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/rdb/__init__.py
+%%PYTHON_SITELIBDIR%%/klayout/rdbcore%%PYTHON_EXT_SUFFIX%%.so
+%%PYTHON_SITELIBDIR%%/klayout/tl/__init__.py
+%%PYTHON_SITELIBDIR%%/klayout/tlcore%%PYTHON_EXT_SUFFIX%%.so