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.17.0/src/tiled/tiled.pro
===================================================================
--- tiled-qt-0.17.0.orig/src/tiled/tiled.pro
+++ tiled-qt-0.17.0/src/tiled/tiled.pro
@@ -59,7 +59,7 @@ macx {
 
 # Make sure the Tiled executable can find libtiled
 !win32:!macx:!cygwin: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.17.0/src/plugins/plugin.pri
===================================================================
--- tiled-qt-0.17.0.orig/src/plugins/plugin.pri
+++ tiled-qt-0.17.0/src/plugins/plugin.pri
@@ -28,7 +28,7 @@ macx {
 
 # Set rpath so that the plugin will resolve libtiled correctly
 !win32:!macx:!cygwin: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.17.0/src/tmxviewer/tmxviewer.pro
===================================================================
--- tiled-qt-0.17.0.orig/src/tmxviewer/tmxviewer.pro
+++ tiled-qt-0.17.0/src/tmxviewer/tmxviewer.pro
@@ -24,7 +24,7 @@ macx {
 
 # Make sure the executable can find libtiled
 !win32:!macx:!cygwin: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.17.0/src/automappingconverter/automappingconverter.pro
===================================================================
--- tiled-qt-0.17.0.orig/src/automappingconverter/automappingconverter.pro
+++ tiled-qt-0.17.0/src/automappingconverter/automappingconverter.pro
@@ -17,7 +17,7 @@ macx {
 
 # Make sure the executable can find libtiled
 !win32:!macx:!cygwin: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.17.0/src/tmxrasterizer/tmxrasterizer.pro
===================================================================
--- tiled-qt-0.17.0.orig/src/tmxrasterizer/tmxrasterizer.pro
+++ tiled-qt-0.17.0/src/tmxrasterizer/tmxrasterizer.pro
@@ -24,7 +24,7 @@ macx {
 
 # Make sure the executable can find libtiled
 !win32:!macx:!cygwin: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.17.0/src/terraingenerator/terraingenerator.pro
===================================================================
--- tiled-qt-0.17.0.orig/src/terraingenerator/terraingenerator.pro
+++ tiled-qt-0.17.0/src/terraingenerator/terraingenerator.pro
@@ -23,7 +23,7 @@ macx {
 
 # Make sure the executable can find libtiled
 !win32:!macx:!cygwin: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, ":")\'
