[82006] trunk/dports/graphics/ogre

mmoll at macports.org mmoll at macports.org
Sat Aug 6 12:47:48 PDT 2011


Revision: 82006
          http://trac.macports.org/changeset/82006
Author:   mmoll at macports.org
Date:     2011-08-06 12:47:48 -0700 (Sat, 06 Aug 2011)
Log Message:
-----------
graphics/ogre: patch rpath, install missing plugin

Modified Paths:
--------------
    trunk/dports/graphics/ogre/Portfile

Added Paths:
-----------
    trunk/dports/graphics/ogre/files/patch-OgreMain_src_OSX_macUtils.cpp.diff
    trunk/dports/graphics/ogre/files/patch-rpaths.diff

Modified: trunk/dports/graphics/ogre/Portfile
===================================================================
--- trunk/dports/graphics/ogre/Portfile	2011-08-06 19:46:58 UTC (rev 82005)
+++ trunk/dports/graphics/ogre/Portfile	2011-08-06 19:47:48 UTC (rev 82006)
@@ -6,7 +6,7 @@
 
 name                ogre
 version             1.7.3
-revision            1
+revision            2
 set branch          [join [lrange [split ${version} .] 0 1] .]
 license             MIT
 categories          graphics
@@ -21,7 +21,9 @@
                     sha1    41acccfbbf7297c91cda78a0ce8a053e56505f04
 distname            ${name}_src_v[strsed ${version} {g/\./-/}]
 use_bzip2           yes
-patchfiles          patch-Tools_XMLConverter_CMakeLists.txt.diff
+patchfiles          patch-Tools_XMLConverter_CMakeLists.txt.diff \
+                    patch-rpaths.diff \
+                    patch-OgreMain_src_OSX_macUtils.cpp.diff
 depends_lib         port:libzzip port:zlib port:freeimage port:freetype \
                     port:boost
 xcode.configuration Release
@@ -29,6 +31,22 @@
 use_configure       yes
 configure.args-append -GXcode -DCMAKE_INSTALL_PREFIX=${worksrcpath}/tmp
 
+post-patch {
+    reinplace "s|@@PREFIX@@|${prefix}|g" \
+    ${worksrcpath}/Components/Paging/CMakeLists.txt \
+    ${worksrcpath}/Components/Property/CMakeLists.txt \
+    ${worksrcpath}/Components/RTShaderSystem/CMakeLists.txt \
+    ${worksrcpath}/Components/Terrain/CMakeLists.txt \
+    ${worksrcpath}/OgreMain/CMakeLists.txt \
+    ${worksrcpath}/Plugins/BSPSceneManager/CMakeLists.txt \
+    ${worksrcpath}/Plugins/CgProgramManager/CMakeLists.txt \
+    ${worksrcpath}/Plugins/OctreeSceneManager/CMakeLists.txt \
+    ${worksrcpath}/Plugins/OctreeZone/CMakeLists.txt \
+    ${worksrcpath}/Plugins/PCZSceneManager/CMakeLists.txt \
+    ${worksrcpath}/Plugins/ParticleFX/CMakeLists.txt \
+    ${worksrcpath}/RenderSystems/GL/CMakeLists.txt \
+    ${worksrcpath}/OgreMain/src/OSX/macUtils.cpp
+}
 destroot {
     eval xinstall -m 640 [glob ${worksrcpath}/tmp/bin/*] \
           ${destroot}${prefix}/bin
@@ -39,6 +57,8 @@
     eval xinstall -m 640 [glob ${worksrcpath}/tmp/lib/lib*] \
           ${destroot}${prefix}/lib
     xinstall -d ${destroot}${prefix}/lib/OGRE
+    xinstall ${worksrcpath}/tmp/lib/RenderSystem_GL.dylib \
+          ${destroot}${prefix}/lib/OGRE
     eval xinstall -m 640 [glob ${worksrcpath}/tmp/lib/Plugin*] \
           ${destroot}${prefix}/lib/OGRE    
     eval xinstall -m 640 [glob ${worksrcpath}/tmp/lib/pkgconfig/*] \

Added: trunk/dports/graphics/ogre/files/patch-OgreMain_src_OSX_macUtils.cpp.diff
===================================================================
--- trunk/dports/graphics/ogre/files/patch-OgreMain_src_OSX_macUtils.cpp.diff	                        (rev 0)
+++ trunk/dports/graphics/ogre/files/patch-OgreMain_src_OSX_macUtils.cpp.diff	2011-08-06 19:47:48 UTC (rev 82006)
@@ -0,0 +1,10 @@
+--- OgreMain/src/OSX/macUtils.cpp.orig	2011-08-05 17:56:28.000000000 -0500
++++ OgreMain/src/OSX/macUtils.cpp	2011-08-05 17:57:18.000000000 -0500
+@@ -124,6 +124,6 @@
+     
+     std::string macPluginPath()
+ 	{
+-		return macBundlePath() + "/Contents/Plugins/";
++		return "@@PREFIX@@/lib/OGRE/";
+ 	}
+ }

Added: trunk/dports/graphics/ogre/files/patch-rpaths.diff
===================================================================
--- trunk/dports/graphics/ogre/files/patch-rpaths.diff	                        (rev 0)
+++ trunk/dports/graphics/ogre/files/patch-rpaths.diff	2011-08-06 19:47:48 UTC (rev 82006)
@@ -0,0 +1,144 @@
+diff -rubw ../ogre_src_v1-7-3.orig/Components/Paging/CMakeLists.txt ./Components/Paging/CMakeLists.txt
+--- ../ogre_src_v1-7-3.orig/Components/Paging/CMakeLists.txt	2011-05-08 13:28:04.000000000 -0500
++++ ./Components/Paging/CMakeLists.txt	2011-08-05 16:15:41.000000000 -0500
+@@ -67,7 +67,7 @@
+     # Set the INSTALL_PATH so that Components can be installed in the application package
+     set_target_properties(OgrePaging
+        PROPERTIES BUILD_WITH_INSTALL_RPATH 1
+-       INSTALL_NAME_DIR "@executable_path/../Components"
++       INSTALL_NAME_DIR "@@PREFIX@@/lib/"
+     )
+ 
+ 	# Copy headers into the main Ogre framework
+diff -rubw ../ogre_src_v1-7-3.orig/Components/Property/CMakeLists.txt ./Components/Property/CMakeLists.txt
+--- ../ogre_src_v1-7-3.orig/Components/Property/CMakeLists.txt	2011-05-08 13:28:04.000000000 -0500
++++ ./Components/Property/CMakeLists.txt	2011-08-05 16:15:41.000000000 -0500
+@@ -47,7 +47,7 @@
+     # Set the INSTALL_PATH so that Components can be installed in the application package
+     set_target_properties(OgreProperty
+        PROPERTIES BUILD_WITH_INSTALL_RPATH 1
+-       INSTALL_NAME_DIR "@executable_path/../Components"
++       INSTALL_NAME_DIR "@@PREFIX@@/lib/"
+     )
+ 
+ 	# Copy headers into the main Ogre framework
+diff -rubw ../ogre_src_v1-7-3.orig/Components/RTShaderSystem/CMakeLists.txt ./Components/RTShaderSystem/CMakeLists.txt
+--- ../ogre_src_v1-7-3.orig/Components/RTShaderSystem/CMakeLists.txt	2011-05-08 13:28:04.000000000 -0500
++++ ./Components/RTShaderSystem/CMakeLists.txt	2011-08-05 16:15:41.000000000 -0500
+@@ -90,7 +90,7 @@
+     # Set the INSTALL_PATH so that Components can be installed in the application package
+     set_target_properties(OgreRTShaderSystem
+        PROPERTIES BUILD_WITH_INSTALL_RPATH 1
+-       INSTALL_NAME_DIR "@executable_path/../Components"
++       INSTALL_NAME_DIR "@@PREFIX@@/lib/"
+     )
+ 
+ 	# Copy headers into the main Ogre framework
+diff -rubw ../ogre_src_v1-7-3.orig/Components/Terrain/CMakeLists.txt ./Components/Terrain/CMakeLists.txt
+--- ../ogre_src_v1-7-3.orig/Components/Terrain/CMakeLists.txt	2011-05-08 13:28:04.000000000 -0500
++++ ./Components/Terrain/CMakeLists.txt	2011-08-05 16:15:41.000000000 -0500
+@@ -72,7 +72,7 @@
+     # Set the INSTALL_PATH so that Components can be installed in the application package
+     set_target_properties(OgreTerrain
+        PROPERTIES BUILD_WITH_INSTALL_RPATH 1
+-       INSTALL_NAME_DIR "@executable_path/../Components"
++       INSTALL_NAME_DIR "@@PREFIX@@/lib/"
+     )
+ 
+ 	# Copy headers into the main Ogre framework
+diff -rubw ../ogre_src_v1-7-3.orig/OgreMain/CMakeLists.txt ./OgreMain/CMakeLists.txt
+--- ../ogre_src_v1-7-3.orig/OgreMain/CMakeLists.txt	2011-05-08 13:28:04.000000000 -0500
++++ ./OgreMain/CMakeLists.txt	2011-08-05 16:16:04.000000000 -0500
+@@ -661,7 +661,7 @@
+     # Set the INSTALL_PATH so that Frameworks can be local
+     set_target_properties(OgreMain
+        PROPERTIES BUILD_WITH_INSTALL_RPATH 1
+-       INSTALL_NAME_DIR "@executable_path/../Frameworks"
++       INSTALL_NAME_DIR "@@PREFIX@@/lib/"
+     )
+     set_target_properties(OgreMain PROPERTIES PUBLIC_HEADER "${HEADER_FILES}")
+ 	set_target_properties(OgreMain PROPERTIES RESOURCE "${RESOURCE_FILES}")
+diff -rubw ../ogre_src_v1-7-3.orig/PlugIns/BSPSceneManager/CMakeLists.txt ./PlugIns/BSPSceneManager/CMakeLists.txt
+--- ../ogre_src_v1-7-3.orig/PlugIns/BSPSceneManager/CMakeLists.txt	2011-05-08 13:28:04.000000000 -0500
++++ ./PlugIns/BSPSceneManager/CMakeLists.txt	2011-08-05 16:18:11.000000000 -0500
+@@ -51,7 +51,7 @@
+     # Set the INSTALL_PATH so that Plugins can be installed in the application package
+     set_target_properties(Plugin_BSPSceneManager
+        PROPERTIES BUILD_WITH_INSTALL_RPATH 1
+-       INSTALL_NAME_DIR "@executable_path/../Plugins"
++       INSTALL_NAME_DIR "@@PREFIX@@/lib/OGRE"
+     )
+ 
+ 	# Copy headers into the main Ogre framework
+diff -rubw ../ogre_src_v1-7-3.orig/PlugIns/CgProgramManager/CMakeLists.txt ./PlugIns/CgProgramManager/CMakeLists.txt
+--- ../ogre_src_v1-7-3.orig/PlugIns/CgProgramManager/CMakeLists.txt	2011-05-08 13:28:04.000000000 -0500
++++ ./PlugIns/CgProgramManager/CMakeLists.txt	2011-08-05 16:18:11.000000000 -0500
+@@ -40,7 +40,7 @@
+     # Set the INSTALL_PATH so that Plugins can be installed in the application package
+     set_target_properties(Plugin_CgProgramManager
+        PROPERTIES BUILD_WITH_INSTALL_RPATH 1
+-       INSTALL_NAME_DIR "@executable_path/../Plugins"
++       INSTALL_NAME_DIR "@@PREFIX@@/lib/OGRE"
+     )
+ 
+ 	# Copy headers into the main Ogre framework
+diff -rubw ../ogre_src_v1-7-3.orig/PlugIns/OctreeSceneManager/CMakeLists.txt ./PlugIns/OctreeSceneManager/CMakeLists.txt
+--- ../ogre_src_v1-7-3.orig/PlugIns/OctreeSceneManager/CMakeLists.txt	2011-05-08 13:28:04.000000000 -0500
++++ ./PlugIns/OctreeSceneManager/CMakeLists.txt	2011-08-05 16:18:11.000000000 -0500
+@@ -56,7 +56,7 @@
+     # Set the INSTALL_PATH so that Plugins can be installed in the application package
+     set_target_properties(Plugin_OctreeSceneManager
+        PROPERTIES BUILD_WITH_INSTALL_RPATH 1
+-       INSTALL_NAME_DIR "@executable_path/../Plugins"
++       INSTALL_NAME_DIR "@@PREFIX@@/lib/OGRE"
+     )
+ 
+ 	# Copy headers into the main Ogre framework
+diff -rubw ../ogre_src_v1-7-3.orig/PlugIns/OctreeZone/CMakeLists.txt ./PlugIns/OctreeZone/CMakeLists.txt
+--- ../ogre_src_v1-7-3.orig/PlugIns/OctreeZone/CMakeLists.txt	2011-05-08 13:28:04.000000000 -0500
++++ ./PlugIns/OctreeZone/CMakeLists.txt	2011-08-05 16:18:11.000000000 -0500
+@@ -59,7 +59,7 @@
+     # Set the INSTALL_PATH so that Plugins can be installed in the application package
+     set_target_properties(Plugin_OctreeZone
+        PROPERTIES BUILD_WITH_INSTALL_RPATH 1
+-       INSTALL_NAME_DIR "@executable_path/../Plugins"
++       INSTALL_NAME_DIR "@@PREFIX@@/lib/OGRE"
+     )
+ 
+ 	# Copy headers into the main Ogre framework
+diff -rubw ../ogre_src_v1-7-3.orig/PlugIns/PCZSceneManager/CMakeLists.txt ./PlugIns/PCZSceneManager/CMakeLists.txt
+--- ../ogre_src_v1-7-3.orig/PlugIns/PCZSceneManager/CMakeLists.txt	2011-05-08 13:28:04.000000000 -0500
++++ ./PlugIns/PCZSceneManager/CMakeLists.txt	2011-08-05 16:18:11.000000000 -0500
+@@ -64,7 +64,7 @@
+     # Set the INSTALL_PATH so that Plugins can be installed in the application package
+     set_target_properties(Plugin_PCZSceneManager
+        PROPERTIES BUILD_WITH_INSTALL_RPATH 1
+-       INSTALL_NAME_DIR "@executable_path/../Plugins"
++       INSTALL_NAME_DIR "@@PREFIX@@/lib/OGRE"
+     )
+ 
+ 	# Copy headers into the main Ogre framework
+diff -rubw ../ogre_src_v1-7-3.orig/PlugIns/ParticleFX/CMakeLists.txt ./PlugIns/ParticleFX/CMakeLists.txt
+--- ../ogre_src_v1-7-3.orig/PlugIns/ParticleFX/CMakeLists.txt	2011-05-08 13:28:04.000000000 -0500
++++ ./PlugIns/ParticleFX/CMakeLists.txt	2011-08-05 16:18:11.000000000 -0500
+@@ -82,7 +82,7 @@
+     # Set the INSTALL_PATH so that Plugins can be installed in the application package
+     set_target_properties(Plugin_ParticleFX
+        PROPERTIES BUILD_WITH_INSTALL_RPATH 1
+-       INSTALL_NAME_DIR "@executable_path/../Plugins"
++       INSTALL_NAME_DIR "@@PREFIX@@/lib/OGRE"
+     )
+ 
+ 	# Copy headers into the main Ogre framework
+diff -rubw ../ogre_src_v1-7-3.orig/RenderSystems/GL/CMakeLists.txt ./RenderSystems/GL/CMakeLists.txt
+--- ../ogre_src_v1-7-3.orig/RenderSystems/GL/CMakeLists.txt	2011-05-08 13:28:04.000000000 -0500
++++ ./RenderSystems/GL/CMakeLists.txt	2011-08-05 16:18:11.000000000 -0500
+@@ -233,7 +233,7 @@
+     # Set the INSTALL_PATH so that Plugins can be installed in the application package
+     set_target_properties(RenderSystem_GL
+        PROPERTIES BUILD_WITH_INSTALL_RPATH 1
+-       INSTALL_NAME_DIR "@executable_path/../Plugins"
++       INSTALL_NAME_DIR "@@PREFIX@@/lib/OGRE"
+     )
+ endif()
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110806/255241e8/attachment.html>


More information about the macports-changes mailing list