Description: Change rpath and library path
 libtmw doesn't have correct rpath. We add rpath for it.
 Also we want to install libraries to /usr/lib/tiled so we made some changes
 to the libpath.
Author: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Last-Update: 2013-02-07
---
Index: tiled-qt-0.9.0/src/tiled/tiled.pro
===================================================================
--- tiled-qt-0.9.0.orig/src/tiled/tiled.pro	2013-01-28 06:35:01.000000000 +0800
+++ tiled-qt-0.9.0/src/tiled/tiled.pro	2013-02-07 01:29:48.242216656 +0800
@@ -30,7 +30,7 @@
 
 # Make sure the Tiled executable can find libtiled
 !win32:!macx:contains(RPATH, yes) {
-    QMAKE_RPATHDIR += \$\$ORIGIN/../lib
+    QMAKE_RPATHDIR += \$\$ORIGIN/../lib/tiled
 
     # It is not possible to use ORIGIN in QMAKE_RPATHDIR, so a bit manually
     QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$$join(QMAKE_RPATHDIR, ":")\'
Index: tiled-qt-0.9.0/src/plugins/plugin.pri
===================================================================
--- tiled-qt-0.9.0.orig/src/plugins/plugin.pri	2013-01-28 06:35:01.000000000 +0800
+++ tiled-qt-0.9.0/src/plugins/plugin.pri	2013-02-07 01:30:22.113671651 +0800
@@ -28,7 +28,7 @@
 
 # Set rpath so that the plugin will resolve libtiled correctly
 !win32:!macx:contains(RPATH, yes) {
-    QMAKE_RPATHDIR += \$\$ORIGIN/../..
+    QMAKE_RPATHDIR += \$\$ORIGIN/..
 
     # It is not possible to use ORIGIN in QMAKE_RPATHDIR, so a bit manually
     QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$$join(QMAKE_RPATHDIR, ":")\'
Index: tiled-qt-0.9.0/src/tmxviewer/tmxviewer.pro
===================================================================
--- tiled-qt-0.9.0.orig/src/tmxviewer/tmxviewer.pro	2013-01-28 06:35:01.000000000 +0800
+++ tiled-qt-0.9.0/src/tmxviewer/tmxviewer.pro	2013-02-07 01:31:32.656534607 +0800
@@ -27,7 +27,7 @@
 
 # Make sure the executable can find libtiled
 !win32:!macx:contains(RPATH, yes) {
-    QMAKE_RPATHDIR += \$\$ORIGIN/../lib
+    QMAKE_RPATHDIR += \$\$ORIGIN/../lib/tiled
 
     # It is not possible to use ORIGIN in QMAKE_RPATHDIR, so a bit manually
     QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$$join(QMAKE_RPATHDIR, ":")\'
Index: tiled-qt-0.9.0/src/automappingconverter/automappingconverter.pro
===================================================================
--- tiled-qt-0.9.0.orig/src/automappingconverter/automappingconverter.pro	2013-01-28 06:35:01.000000000 +0800
+++ tiled-qt-0.9.0/src/automappingconverter/automappingconverter.pro	2013-02-07 01:33:32.342599454 +0800
@@ -17,7 +17,7 @@
 
 # Make sure the executable can find libtiled
 !win32:!macx:contains(RPATH, yes) {
-    QMAKE_RPATHDIR += \$\$ORIGIN/../lib
+    QMAKE_RPATHDIR += \$\$ORIGIN/../lib/tiled
 
     # It is not possible to use ORIGIN in QMAKE_RPATHDIR, so a bit manually
     QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$$join(QMAKE_RPATHDIR, ":")\'
Index: tiled-qt-0.9.0/src/tmxrasterizer/tmxrasterizer.pro
===================================================================
--- tiled-qt-0.9.0.orig/src/tmxrasterizer/tmxrasterizer.pro	2013-01-28 06:35:01.000000000 +0800
+++ tiled-qt-0.9.0/src/tmxrasterizer/tmxrasterizer.pro	2013-02-07 01:34:03.438095470 +0800
@@ -27,7 +27,7 @@
 
 # Make sure the executable can find libtiled
 !win32:!macx:contains(RPATH, yes) {
-    QMAKE_RPATHDIR += \$\$ORIGIN/../lib
+    QMAKE_RPATHDIR += \$\$ORIGIN/../lib/tiled
 
     # It is not possible to use ORIGIN in QMAKE_RPATHDIR, so a bit manually
     QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$$join(QMAKE_RPATHDIR, ":")\'
