[87842] trunk/dports/graphics/ogre

mmoll at macports.org mmoll at macports.org
Thu Dec 8 08:52:52 PST 2011


Revision: 87842
          http://trac.macports.org/changeset/87842
Author:   mmoll at macports.org
Date:     2011-12-08 08:52:49 -0800 (Thu, 08 Dec 2011)
Log Message:
-----------
graphics/ogre: don't use /opt/local in patches

Modified Paths:
--------------
    trunk/dports/graphics/ogre/Portfile
    trunk/dports/graphics/ogre/files/patch-CMakeLists.txt.diff
    trunk/dports/graphics/ogre/files/patch-README_and_Tutorials_files.diff

Modified: trunk/dports/graphics/ogre/Portfile
===================================================================
--- trunk/dports/graphics/ogre/Portfile	2011-12-08 16:28:11 UTC (rev 87841)
+++ trunk/dports/graphics/ogre/Portfile	2011-12-08 16:52:49 UTC (rev 87842)
@@ -6,7 +6,7 @@
 
 name                ogre
 version             1.7.3
-revision            3
+revision            4
 set branch          [join [lrange [split ${version} .] 0 1] .]
 license             MIT
 categories          graphics
@@ -55,12 +55,18 @@
                     patch-Samples_Browser_include_SampleBrowser_OSX.h.diff \
                     patch-Samples_Media_CMakeLists.txt.diff \
                     patch-Tools_CMakeLists.txt.diff
-
+                    
+post-patch {
+    reinplace "s|@PREFIX@|${prefix}|g" \
+        ${worksrcpath}/CMakeLists.txt \
+        ${worksrcpath}/Tutorials/CMakeLists.txt
+    reinplace "s|@FRAMEWORKS_DIR@|${frameworks_dir}|g" \
+        ${worksrcpath}/Tutorials/CMakeLists.txt
+}
 depends_lib         port:libzzip port:zlib port:bzip2 port:freeimage \
                     port:freetype port:boost port:ois port:doxygen
 
 configure.args-append -DMACPORTS=TRUE \
-                    -DMACPORTS_DOC_DIR=${prefix}/share/doc \
                     -DOGRE_BUILD_TOOLS=TRUE \
                     -DOGRE_COPY_DEPENDENICES=FALSE \
                     -DOGRE_INSTALL_DEPENDENCIES=FALSE \
@@ -73,23 +79,19 @@
 
 post-destroot {
     # Move the SampleBrowser.app to a more visible place
-    xinstall -d -m 755 ${destroot}${applications_dir}/OGRE/SDKSamples/bin
+    xinstall -d -m 755 ${destroot}${prefix}/share/doc/OGRE/SDKSamples/bin
     file rename ${destroot}${prefix}/bin/SampleBrowser.app \
-        ${destroot}${applications_dir}/OGRE/SDKSamples/bin
+        ${destroot}${prefix}/share/doc/OGRE/SDKSamples/bin
 
     xinstall -m 644 -W ${worksrcpath} \
         AUTHORS BUGS COPYING README READ_ME_FIRST_OGRE_MACPORTS.txt \
-        ${destroot}${applications_dir}/OGRE
+        ${destroot}${prefix}/share/doc/OGRE
 
-    # Support any kind of MacPorts prefix in the Tutorial code
-    reinplace "s|/opt/local|${prefix}|g" \
-        ${worksrcpath}/Tutorials/CMakeLists.txt
-
     # Install the tutorial files
-    xinstall -d -m 755 ${destroot}${applications_dir}/OGRE/Tutorials
+    xinstall -d -m 755 ${destroot}${prefix}/share/doc/OGRE/Tutorials
     
     eval xinstall -m 644 [glob ${worksrcpath}/Tutorials/*] \
-        ${destroot}${applications_dir}/OGRE/Tutorials
+        ${destroot}${prefix}/share/doc/OGRE/Tutorials
 }
 
 livecheck.type      regex

Modified: trunk/dports/graphics/ogre/files/patch-CMakeLists.txt.diff
===================================================================
--- trunk/dports/graphics/ogre/files/patch-CMakeLists.txt.diff	2011-12-08 16:28:11 UTC (rev 87841)
+++ trunk/dports/graphics/ogre/files/patch-CMakeLists.txt.diff	2011-12-08 16:52:49 UTC (rev 87842)
@@ -9,7 +9,7 @@
 +####################
 +
 +set(MACPORTS FALSE CACHE BOOL "Build OGRE for MacPorts")
-+set(MACPORTS_DOC_DIR "/opt/local/share/doc" CACHE STRING
++set(MACPORTS_DOC_DIR "@PREFIX@/share/doc" CACHE STRING
 +  "The MacPorts documentation directory")
 +set(MACPORTS_OGRE_DOC_DIR "${MACPORTS_DOC_DIR}/OGRE" CACHE STRING
 +  "The OGRE directory in MacPorts documentation directory")

Modified: trunk/dports/graphics/ogre/files/patch-README_and_Tutorials_files.diff
===================================================================
--- trunk/dports/graphics/ogre/files/patch-README_and_Tutorials_files.diff	2011-12-08 16:28:11 UTC (rev 87841)
+++ trunk/dports/graphics/ogre/files/patch-README_and_Tutorials_files.diff	2011-12-08 16:52:49 UTC (rev 87842)
@@ -710,13 +710,12 @@
 +#endif // #ifndef __BaseApplication_h_
 --- /dev/null	2011-11-28 03:33:22.000000000 +0100
 +++ Tutorials/CMakeLists.txt	2011-11-26 23:57:01.000000000 +0100
-@@ -0,0 +1,45 @@
+@@ -0,0 +1,44 @@
 +CMAKE_MINIMUM_REQUIRED (VERSION 2.6.3)
 +
 +IF(APPLE)
-+  LIST(APPEND CMAKE_PREFIX_PATH "/opt/local")
-+  LIST(APPEND CMAKE_MODULE_PATH "/opt/local/share/cmake/modules")
-+  LIST(APPEND CMAKE_FRAMEWORK_PATH "/opt/local/Library/Frameworks")
++  LIST(APPEND CMAKE_PREFIX_PATH "@PREFIX@")
++  LIST(APPEND CMAKE_FRAMEWORK_PATH "@FRAMEWORKS_DIR@")
 +ENDIF(APPLE)
 +
 +ADD_DEFINITIONS(-O3)
@@ -756,7 +755,6 @@
 +CONFIGURE_FILE(${OGRE_MEDIA_DIR}/../resources.cfg
 +  ${CMAKE_CURRENT_BINARY_DIR}/resources.cfg
 +  @ONLY)
-\ No newline at end of file
 --- /dev/null	2011-11-28 03:33:22.000000000 +0100
 +++ Tutorials/README.txt	2011-11-27 00:03:24.000000000 +0100
 @@ -0,0 +1,13 @@
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111208/b2547002/attachment.html>


More information about the macports-changes mailing list