[146365] trunk/dports/science/plplot
takeshi at macports.org
takeshi at macports.org
Sun Mar 6 04:50:06 PST 2016
Revision: 146365
https://trac.macports.org/changeset/146365
Author: takeshi at macports.org
Date: 2016-03-06 04:50:06 -0800 (Sun, 06 Mar 2016)
Log Message:
-----------
plplot: add support for OCaml binding
Modified Paths:
--------------
trunk/dports/science/plplot/Portfile
Added Paths:
-----------
trunk/dports/science/plplot/files/patch-bindings-ocaml-CMakeLists.txt.diff
trunk/dports/science/plplot/files/patch-bindings-ocaml-plplot_core.idl.diff
Modified: trunk/dports/science/plplot/Portfile
===================================================================
--- trunk/dports/science/plplot/Portfile 2016-03-06 12:47:13 UTC (rev 146364)
+++ trunk/dports/science/plplot/Portfile 2016-03-06 12:50:06 UTC (rev 146365)
@@ -69,8 +69,6 @@
-DFREETYPE_INCLUDE_DIR_ft2build=${prefix}/include/freetype2 \
-DFREETYPE_LIBRARIES=${prefix}/lib/libfreetype.dylib \
-DPL_FREETYPE_FONT_PATH=${prefix}/share/fonts/freefont-ttf \
- -DLTDL_INCLUDE_DIR=${prefix}/include \
- -DLTDL_LIBRARY_DIR=${prefix}/lib \
-DWITH_FREETYPE=ON \
-DQHULL_INCLUDE_DIR=${prefix}/include \
-DQHULL_LIBRARIES=${prefix}/lib/libqhull.dylib \
@@ -211,6 +209,15 @@
configure.args-append -DENABLE_java=ON
}
+variant ocaml description {Add support for OCaml} {
+ patchfiles-append patch-bindings-ocaml-plplot_core.idl.diff \
+ patch-bindings-ocaml-CMakeLists.txt.diff
+ depends_lib-append port:ocaml \
+ port:swig-ocaml
+ configure.args-delete -DENABLE_ocaml=OFF
+ configure.args-append -DENABLE_ocaml=ON
+}
+
variant python26 conflicts python27 description {Add support for python26} {
depends_lib-append port:python26 \
port:py26-numpy \
Added: trunk/dports/science/plplot/files/patch-bindings-ocaml-CMakeLists.txt.diff
===================================================================
--- trunk/dports/science/plplot/files/patch-bindings-ocaml-CMakeLists.txt.diff (rev 0)
+++ trunk/dports/science/plplot/files/patch-bindings-ocaml-CMakeLists.txt.diff 2016-03-06 12:50:06 UTC (rev 146365)
@@ -0,0 +1,11 @@
+--- bindings/ocaml/CMakeLists.txt.orig 2015-08-13 02:35:27.000000000 +0900
++++ bindings/ocaml/CMakeLists.txt 2016-03-05 23:29:15.000000000 +0900
+@@ -99,7 +99,7 @@
+ ${CMAKE_CURRENT_BINARY_DIR}/libplplot_stubs.a
+ COMMAND ${OCAMLC} -ccopt -I${CAMLIDL_LIB_DIR} -c ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c
+ COMMAND ${OCAMLC} -ccopt -I${CMAKE_SOURCE_DIR}/include -ccopt -I${CMAKE_BINARY_DIR}/include -ccopt -I${CMAKE_SOURCE_DIR}/lib/qsastime -ccopt -I${CMAKE_BINARY_DIR} -ccopt -I${CAMLIDL_LIB_DIR} -ccopt -DPLPLOT_HAVE_CONFIG_H -c ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c
+- COMMAND ${OCAMLMKLIB} -o plplot_stubs -L${CAMLIDL_LIB_DIR} -lcamlidl -L${CMAKE_BINARY_DIR}/src -lplplot ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o ${ocaml_STATIC_FLAGS}
++ COMMAND ${OCAMLMKLIB} -o plplot_stubs -L${CAMLIDL_LIB_DIR} -lcamlidl -L${CMAKE_BINARY_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.o ${CMAKE_CURRENT_BINARY_DIR}/plplot_impl.o ${ocaml_STATIC_FLAGS}
+ DEPENDS
+ ${CMAKE_CURRENT_BINARY_DIR}/plplot_core_stubs.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/plplot_impl.c
Added: trunk/dports/science/plplot/files/patch-bindings-ocaml-plplot_core.idl.diff
===================================================================
--- trunk/dports/science/plplot/files/patch-bindings-ocaml-plplot_core.idl.diff (rev 0)
+++ trunk/dports/science/plplot/files/patch-bindings-ocaml-plplot_core.idl.diff 2016-03-06 12:50:06 UTC (rev 146365)
@@ -0,0 +1,25 @@
+--- bindings/ocaml/plplot_core.idl.orig 2015-08-13 02:35:27.000000000 +0900
++++ bindings/ocaml/plplot_core.idl 2016-03-05 22:08:31.000000000 +0900
+@@ -204,9 +204,6 @@
+ PLFLT plgwidth(void);
+ PLFLT plgchrht(void);
+
+-#define QUOTEME(x) #x
+-#define RAW_ML(x) quote(mlmli, QUOTEME(x));
+-
+ // plstripc function
+ quote(mlmli,
+ "external plstripc : string -> string -> float -> float -> float -> float -> \
+@@ -327,8 +324,8 @@
+ ml_plsexit ()");
+ quote(mli, "val plunset_exit : unit -> unit");
+
+-RAW_ML(external plgriddata : float array -> float array -> float array -> float array -> float array -> plplot_grid_method_type -> float -> float array array = "ml_plgriddata_bytecode" "ml_plgriddata")
+-RAW_ML(external plparseopts : string array -> plplot_parse_method_type list -> unit = "ml_plparseopts")
+-RAW_ML(external pllegend : plplot_legend_opt -> plplot_position_opt -> float -> float -> float -> int -> int -> int -> int -> int -> plplot_legend_opt array -> float -> float -> float -> float -> int array -> string array -> int array -> int array -> float array -> float array -> int array -> int array -> float array -> int array -> float array -> int array -> string array -> float * float = "ml_pllegend_byte" "ml_pllegend")
+-RAW_ML(external plcolorbar : plplot_colorbar_opt -> plplot_position_opt -> float -> float -> float -> float -> int -> int -> int -> float -> float -> int -> float -> plplot_colorbar_opt array -> string array -> string array -> float array -> int array -> float array array -> float * float = "ml_plcolorbar_byte" "ml_plcolorbar")
++quote(mlmli, "external plgriddata : float array -> float array -> float array -> float array -> float array -> plplot_grid_method_type -> float -> float array array = \"ml_plgriddata_bytecode\" \"ml_plgriddata\"")
++quote(mlmli, "external plparseopts : string array -> plplot_parse_method_type list -> unit = \"ml_plparseopts\"")
++quote(mlmli, "external pllegend : plplot_legend_opt -> plplot_position_opt -> float -> float -> float -> int -> int -> int -> int -> int -> plplot_legend_opt array -> float -> float -> float -> float -> int array -> string array -> int array -> int array -> float array -> float array -> int array -> int array -> float array -> int array -> float array -> int array -> string array -> float * float = \"ml_pllegend_byte\" \"ml_pllegend\"")
++quote(mlmli, "external plcolorbar : plplot_colorbar_opt -> plplot_position_opt -> float -> float -> float -> float -> int -> int -> int -> float -> float -> int -> float -> plplot_colorbar_opt array -> string array -> string array -> float array -> int array -> float array array -> float * float = \"ml_plcolorbar_byte\" \"ml_plcolorbar\"")
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160306/392ccfbb/attachment-0001.html>
More information about the macports-changes
mailing list