[148005] trunk/dports/science/plplot

takeshi at macports.org takeshi at macports.org
Sun Apr 24 06:26:58 PDT 2016


Revision: 148005
          https://trac.macports.org/changeset/148005
Author:   takeshi at macports.org
Date:     2016-04-24 06:26:58 -0700 (Sun, 24 Apr 2016)
Log Message:
-----------
plplot: make gdc variant obsolete add dmd variant. See #34639

Modified Paths:
--------------
    trunk/dports/science/plplot/Portfile

Added Paths:
-----------
    trunk/dports/science/plplot/files/patch-cmake-modules-language_support-cmake-CMakeTestDCompiler.cmake.diff
    trunk/dports/science/plplot/files/patch-cmake-modules-language_support-cmake-Platform-Darwin-dmd.cmake.diff

Modified: trunk/dports/science/plplot/Portfile
===================================================================
--- trunk/dports/science/plplot/Portfile	2016-04-24 11:25:46 UTC (rev 148004)
+++ trunk/dports/science/plplot/Portfile	2016-04-24 13:26:58 UTC (rev 148005)
@@ -244,10 +244,16 @@
     configure.args-append   -DENABLE_pyqt4=ON
 }
 
-variant gdc description {Add support for D} {
-    depends_lib-append      port:gdc
+variant gdc description {Use dmd variant instead} {
+}
+
+variant dmd description {Add support for D} {
+    depends_lib-append      port:dmd
+    patchfiles-append       patch-cmake-modules-language_support-cmake-CMakeTestDCompiler.cmake.diff \
+                            patch-cmake-modules-language_support-cmake-Platform-Darwin-dmd.cmake.diff
     configure.args-delete   -DENABLE_d=OFF
     configure.args-append   -DENABLE_d=ON
+    configure.env-append    D_PATH=${prefix}
 }
 
 variant lua description {Add support for Lua} {

Added: trunk/dports/science/plplot/files/patch-cmake-modules-language_support-cmake-CMakeTestDCompiler.cmake.diff
===================================================================
--- trunk/dports/science/plplot/files/patch-cmake-modules-language_support-cmake-CMakeTestDCompiler.cmake.diff	                        (rev 0)
+++ trunk/dports/science/plplot/files/patch-cmake-modules-language_support-cmake-CMakeTestDCompiler.cmake.diff	2016-04-24 13:26:58 UTC (rev 148005)
@@ -0,0 +1,24 @@
+--- cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake.orig	2015-08-13 02:35:27.000000000 +0900
++++ cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake	2016-04-24 19:29:08.000000000 +0900
+@@ -97,8 +97,8 @@
+ 	OUTPUT_VARIABLE OUTPUT) 
+     ELSE(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+       TRY_COMPILE(CMAKE_D_PHOBOS_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testDCompiler.d
+-	CMAKE_FLAGS "-DLINK_LIBRARIES=${D_PATH}/lib/libphobos.a"
+-	COMPILE_DEFINITIONS "-I${D_PATH}/include -I${D_PATH}/import"
++	CMAKE_FLAGS "-DLINK_LIBRARIES=${D_PATH}/lib/libphobos2.a"
++	COMPILE_DEFINITIONS "-I${D_PATH}/include/phobos -I${D_PATH}/include/druntime/import"
+ 	OUTPUT_VARIABLE OUTPUT) 
+     ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+   ENDIF(CMAKE_COMPILER_IS_GDC)
+@@ -137,8 +137,8 @@
+ 	OUTPUT_VARIABLE OUTPUT) 
+     ELSE(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+       TRY_COMPILE(CMAKE_D_TANGO_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testDCompiler.d
+-	CMAKE_FLAGS "-DLINK_LIBRARIES=${D_PATH}/lib/libtango.a;${D_PATH}/lib/libphobos.a"
+-	COMPILE_DEFINITIONS "-I${D_PATH}/include -I${D_PATH}/import"
++	CMAKE_FLAGS "-DLINK_LIBRARIES=${D_PATH}/lib/libtango.a;${D_PATH}/lib/libphobos2.a"
++	COMPILE_DEFINITIONS "-I${D_PATH}/include/phobos -I${D_PATH}/include/druntime/import"
+ 	OUTPUT_VARIABLE OUTPUT) 
+     ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+   ENDIF(CMAKE_COMPILER_IS_GDC)

Added: trunk/dports/science/plplot/files/patch-cmake-modules-language_support-cmake-Platform-Darwin-dmd.cmake.diff
===================================================================
--- trunk/dports/science/plplot/files/patch-cmake-modules-language_support-cmake-Platform-Darwin-dmd.cmake.diff	                        (rev 0)
+++ trunk/dports/science/plplot/files/patch-cmake-modules-language_support-cmake-Platform-Darwin-dmd.cmake.diff	2016-04-24 13:26:58 UTC (rev 148005)
@@ -0,0 +1,11 @@
+--- cmake/modules/language_support/cmake/Platform/Darwin-dmd.cmake.orig	2015-08-13 02:35:27.000000000 +0900
++++ cmake/modules/language_support/cmake/Platform/Darwin-dmd.cmake	2010-03-25 06:00:17.000000000 +0900
+@@ -25,7 +25,7 @@
+ 	#ENDFOREACH(item)
+ ENDIF(CMAKE_D_BUILD_DOCS)
+ 
+-SET (CMAKE_D_FLAGS_INIT "-version=Posix ${DSTDLIB_FLAGS} -I$ENV{D_PATH}/include -I$ENV{D_PATH}/import")
++SET (CMAKE_D_FLAGS_INIT "-version=${CMAKE_BUILD_TYPE}Build ${DSTDLIB_FLAGS} ${DSTDLIB_TYPE} -I$ENV{D_PATH}/include/phobos -I$ENV{D_PATH}/include/druntime/import -I${PROJECT_SOURCE_DIR}")
+ SET (CMAKE_D_FLAGS_DEBUG_INIT "-g ${DDOC_FLAGS}")
+ #  SET (CMAKE_D_FLAGS_MINSIZEREL_INIT "-Os ${DDOC_FLAGS}")
+ SET (CMAKE_D_FLAGS_RELEASE_INIT "-O -release -inline ${DDOC_FLAGS}")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160424/d575835b/attachment.html>


More information about the macports-changes mailing list