[154289] trunk/dports/graphics/glfw

michaelld at macports.org michaelld at macports.org
Wed Oct 26 18:23:55 CEST 2016


Revision: 154289
          https://trac.macports.org/changeset/154289
Author:   michaelld at macports.org
Date:     2016-10-26 18:23:55 +0200 (Wed, 26 Oct 2016)
Log Message:
-----------
glfw:
+ add support for Mac OS X 10.6 and prior, via using commit a94a84b5 (latest to suppose those OS versions);
+ update devel to 8d6f2654 (20161019).

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

Added Paths:
-----------
    trunk/dports/graphics/glfw/files/patch-CMakeLists.txt.legacy.diff

Modified: trunk/dports/graphics/glfw/Portfile
===================================================================
--- trunk/dports/graphics/glfw/Portfile	2016-10-26 16:16:27 UTC (rev 154288)
+++ trunk/dports/graphics/glfw/Portfile	2016-10-26 16:23:55 UTC (rev 154289)
@@ -12,47 +12,72 @@
 license             zlib
 platforms           darwin macosx
 
-subport glfw-devel {}
+platform darwin {
+    if {${os.major} < 11} {
 
-if {${subport} eq ${name}} {
+        # Mac OS X 10.6 and prior: latest commit supporting
 
-    # release
+        github.setup    glfw glfw a94a84b507b0d6d11e8a3f257cb21f4bd6553516
+        checksums       rmd160 1c07a75a88f272653ca246aa1212a208a83ecb30 \
+                        sha256 ff4745264f92b740c50ecc90370f102c86c439f2b6108f1495bd60c87e5d6a83
 
-    github.setup    glfw glfw 3.2.1
-    checksums       rmd160 5fb5988736a0a2812426907ab8d64b94eeacc010 \
-                    sha256 34bc25f8111501eec35a52fd39fa50336a0c2e812d4a14454c7c946458ab015c
+        # bump the epoch because I moved the version from 20151012 to 3.1.2
 
-    # bump the epoch because I moved the version from 20151012 to 3.1.2
+        epoch           1
 
-    epoch           1
+        long_description ${description}. This version of GLFW is the latest to provide support for Mac OS X 10.6 and prior, and is will not be updated. It is provided in the hope that it allows ports depending on GLFW to build on these older Mac OS X installs.
 
-    conflicts       glfw-devel
-    long_description ${description}: \
-        This port follows the release version of GLFW, which is typically updated every 6 months. If for some reason this port does not build or function as desired, try the ${name}-devel port.
+        # patch to fix install directory for cmake files and docs
 
-} else {
+        patchfiles-append patch-CMakeLists.txt.legacy.diff
 
-    # devel
+    } else {
 
-    github.setup    glfw glfw aa10ec6e455a4c767c5feed83e2e8623adb3e775
-    version         20161010
-    checksums       rmd160 5235fb6db8d7882a51b18b841b30050b3f691dea \
-                    sha256 df2898ee8b58e02f0f240254429cc87f1af52e4d1add4a9f3fba9eeaede0b7e5
+        # Mac OS X 10.7 and newer: release and devel
 
-    conflicts       glfw
-    long_description ${description}: \
-    This port follows the GIT master version of GLFW, which is typically updated every few days to weeks.
+        subport glfw-devel {}
 
-}
+        if {${subport} eq ${name}} {
 
-# patch to fix install name of library
+            # release
 
-patchfiles-append   patch-src_CMakeLists.txt.diff
+            github.setup    glfw glfw 3.2.1
+            checksums       rmd160 5fb5988736a0a2812426907ab8d64b94eeacc010 \
+                            sha256 34bc25f8111501eec35a52fd39fa50336a0c2e812d4a14454c7c946458ab015c
 
-# patch to fix install directory for cmake files and docs
+            # bump the epoch because I moved the version from 20151012 to 3.1.2
 
-patchfiles-append patch-CMakeLists.txt.diff
+            epoch           1
 
+            conflicts       glfw-devel
+            long_description ${description}: \
+                This port follows the release version of GLFW, which is typically updated every 6 months. If for some reason this port does not build or function as desired, try the ${name}-devel port.
+
+        } else {
+
+            # devel
+
+            github.setup    glfw glfw 8d6f265441959d0eff2d3fd97edfb99b98ce2777
+            version         20161019
+            checksums       rmd160 43b59ba3be7d03b23536db3628021f4dda8d3147 \
+                            sha256 6a9cc3d0f8effac9978613523fd5c5f1b81c8577ed13f206fa177678619cb445
+
+            conflicts       glfw
+            long_description ${description}: \
+                This port follows the GIT master version of GLFW, which is typically updated every few days to weeks.
+        }
+
+        # patch to fix install name of library
+
+        patchfiles-append patch-src_CMakeLists.txt.diff
+
+        # patch to fix install directory for cmake files and docs
+
+        patchfiles-append patch-CMakeLists.txt.diff
+
+    }
+}
+
 # use the real home page, not github's
 
 homepage            http://www.glfw.org/
@@ -84,16 +109,3 @@
 } else {
     configure.args-append -DDOXYGEN_EXECUTABLE=
 }
-
-# error out if trying to build on OSX 10.6 or earlier; not supported
-
-platform darwin {
-    if {${os.major} < 11} {
-        set os_note "${name} ${version} is designed for OS X 10.7 Lion and newer."
-        notes-append "\n\n${os_note}"
-        pre-fetch {
-            ui_error ${os_note}
-            error "unsupported platform"
-        }
-    }
-}

Added: trunk/dports/graphics/glfw/files/patch-CMakeLists.txt.legacy.diff
===================================================================
--- trunk/dports/graphics/glfw/files/patch-CMakeLists.txt.legacy.diff	                        (rev 0)
+++ trunk/dports/graphics/glfw/files/patch-CMakeLists.txt.legacy.diff	2016-10-26 16:23:55 UTC (rev 154289)
@@ -0,0 +1,50 @@
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -391,12 +391,12 @@
+ #--------------------------------------------------------------------
+ include(CMakePackageConfigHelpers)
+ 
+-if (UNIX)
+-    set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/cmake/glfw3/")
+-else()
+-    set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/")
++if (NOT GLFW_CMAKE_CONFIG_PATH)
++  set(GLFW_CMAKE_CONFIG_PATH "lib${LIB_SUFFIX}")
+ endif()
+ 
++set(GLFW_CONFIG_PATH "${GLFW_CMAKE_CONFIG_PATH}/cmake/glfw3")
++
+ configure_package_config_file("${GLFW_SOURCE_DIR}/src/glfw3Config.cmake.in"
+                               "${GLFW_BINARY_DIR}/src/glfw3Config.cmake"
+                               INSTALL_DESTINATION "${GLFW_CONFIG_PATH}"
+@@ -433,6 +433,9 @@
+ 
+ if (DOXYGEN_FOUND AND GLFW_BUILD_DOCS)
+     add_subdirectory(docs)
++    if (NOT GLFW_DOCS_PATH)
++        set(GLFW_DOCS_PATH "share/doc/glfw3/")
++    endif()
+ endif()
+ 
+ #--------------------------------------------------------------------
+@@ -445,12 +448,18 @@
+ 
+     install(FILES "${GLFW_BINARY_DIR}/src/glfw3Config.cmake"
+                   "${GLFW_BINARY_DIR}/src/glfw3ConfigVersion.cmake"
+-            DESTINATION lib${LIB_SUFFIX}/cmake/glfw)
++            DESTINATION ${GLFW_CONFIG_PATH})
++
++    install(EXPORT glfwTargets DESTINATION ${GLFW_CONFIG_PATH})
+ 
+-    install(EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}/cmake/glfw)
+     install(FILES "${GLFW_BINARY_DIR}/src/glfw3.pc"
+             DESTINATION lib${LIB_SUFFIX}/pkgconfig)
+ 
++    if (DOXYGEN_FOUND AND GLFW_BUILD_DOCS)
++        install(FILES "${GLFW_BINARY_DIR}/docs/html"
++            DESTINATION "${GLFW_DOCS_PATH}")
++    endif()
++
+     # Only generate this target if no higher-level project already has
+     if (NOT TARGET uninstall)
+         configure_file("${GLFW_SOURCE_DIR}/cmake_uninstall.cmake.in"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-changes/attachments/20161026/624619c1/attachment-0002.html>


More information about the macports-changes mailing list