You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(33) |
Jun
|
Jul
(30) |
Aug
(2) |
Sep
|
Oct
(30) |
Nov
(136) |
Dec
(59) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(255) |
Feb
(169) |
Mar
(322) |
Apr
(185) |
May
(33) |
Jun
(89) |
Jul
(47) |
Aug
(59) |
Sep
(40) |
Oct
(31) |
Nov
(74) |
Dec
(84) |
| 2002 |
Jan
(163) |
Feb
(78) |
Mar
(23) |
Apr
(5) |
May
(22) |
Jun
(75) |
Jul
(143) |
Aug
(48) |
Sep
(111) |
Oct
(58) |
Nov
(124) |
Dec
(278) |
| 2003 |
Jan
(106) |
Feb
(276) |
Mar
(354) |
Apr
(97) |
May
(14) |
Jun
(3) |
Jul
(7) |
Aug
(21) |
Sep
(83) |
Oct
(110) |
Nov
(3) |
Dec
(119) |
| 2004 |
Jan
(318) |
Feb
(409) |
Mar
(68) |
Apr
(23) |
May
(105) |
Jun
(147) |
Jul
(69) |
Aug
(53) |
Sep
(23) |
Oct
(14) |
Nov
(15) |
Dec
(63) |
| 2005 |
Jan
(146) |
Feb
(69) |
Mar
(157) |
Apr
(127) |
May
(166) |
Jun
(8) |
Jul
(5) |
Aug
(3) |
Sep
(8) |
Oct
(17) |
Nov
(29) |
Dec
(34) |
| 2006 |
Jan
(3) |
Feb
(4) |
Mar
(1) |
Apr
(70) |
May
(241) |
Jun
(82) |
Jul
(344) |
Aug
(196) |
Sep
(87) |
Oct
(57) |
Nov
(121) |
Dec
(86) |
| 2007 |
Jan
(60) |
Feb
(67) |
Mar
(102) |
Apr
(28) |
May
(13) |
Jun
(29) |
Jul
(38) |
Aug
(56) |
Sep
(91) |
Oct
(89) |
Nov
(50) |
Dec
(68) |
| 2008 |
Jan
(87) |
Feb
(47) |
Mar
(100) |
Apr
(34) |
May
(65) |
Jun
(54) |
Jul
(98) |
Aug
(128) |
Sep
(109) |
Oct
(141) |
Nov
(40) |
Dec
(206) |
| 2009 |
Jan
(176) |
Feb
(226) |
Mar
(134) |
Apr
(84) |
May
(152) |
Jun
(85) |
Jul
(91) |
Aug
(153) |
Sep
(141) |
Oct
(59) |
Nov
(87) |
Dec
(75) |
| 2010 |
Jan
(58) |
Feb
(41) |
Mar
(51) |
Apr
(74) |
May
(81) |
Jun
(39) |
Jul
(30) |
Aug
(43) |
Sep
(76) |
Oct
(59) |
Nov
(62) |
Dec
(52) |
| 2011 |
Jan
(125) |
Feb
(41) |
Mar
(96) |
Apr
(53) |
May
(21) |
Jun
(23) |
Jul
(48) |
Aug
(71) |
Sep
(37) |
Oct
(81) |
Nov
(60) |
Dec
(32) |
| 2012 |
Jan
(51) |
Feb
(23) |
Mar
|
Apr
(8) |
May
(2) |
Jun
|
Jul
(8) |
Aug
(25) |
Sep
(4) |
Oct
(32) |
Nov
(17) |
Dec
(2) |
| 2013 |
Jan
(8) |
Feb
(2) |
Mar
(9) |
Apr
(9) |
May
(37) |
Jun
(48) |
Jul
(63) |
Aug
(42) |
Sep
(59) |
Oct
(83) |
Nov
(141) |
Dec
(133) |
| 2014 |
Jan
(57) |
Feb
(58) |
Mar
(58) |
Apr
(25) |
May
(14) |
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <and...@us...> - 2013-06-26 21:34:51
|
Revision: 12389
http://sourceforge.net/p/plplot/code/12389
Author: andrewross
Date: 2013-06-26 21:34:49 +0000 (Wed, 26 Jun 2013)
Log Message:
-----------
Update debian 5.9.9 packages so they compile on Debian unstable.
Modified Paths:
--------------
trunk/debian/changelog
trunk/debian/patches/fix-cmake-ada-support.diff
trunk/debian/patches/series
trunk/debian/rules
Added Paths:
-----------
trunk/debian/patches/fix-cmake-d-support.diff
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2013-06-26 06:03:55 UTC (rev 12388)
+++ trunk/debian/changelog 2013-06-26 21:34:49 UTC (rev 12389)
@@ -1,3 +1,13 @@
+plplot (5.9.9-7ubuntu2) UNRELEASED; urgency=low
+
+ * debian/patches/fix-cmake-ada-support.diff: Update ada support from
+ upstream to ensure plplot builds with latest Ada compiler in unstable.
+ * debian/rules: Update python library path.
+ * debian/patches/fix-cmake-d-support.diff: Add patch from upstream to
+ fix D language support.
+
+ -- Andrew Ross <and...@us...> Wed, 26 Jun 2013 22:29:59 +0100
+
plplot (5.9.9-6) unstable; urgency=low
* debian/control.in: Remove build dependency on quilt since this is
Modified: trunk/debian/patches/fix-cmake-ada-support.diff
===================================================================
--- trunk/debian/patches/fix-cmake-ada-support.diff 2013-06-26 06:03:55 UTC (rev 12388)
+++ trunk/debian/patches/fix-cmake-ada-support.diff 2013-06-26 21:34:49 UTC (rev 12389)
@@ -2,6 +2,8 @@
Author: Andrew Ross <and...@us...>
Last-Update: 2012-07-19
+Index: plplot-5.9.9/cmake/modules/language_support/cmake/CMakeAdaInformation.cmake
+===================================================================
--- plplot-5.9.9.orig/cmake/modules/language_support/cmake/CMakeAdaInformation.cmake 2011-10-13 01:43:01.000000000 +0100
+++ plplot-5.9.9/cmake/modules/language_support/cmake/CMakeAdaInformation.cmake 2012-07-19 23:03:27.835197249 +0100
@@ -29,6 +29,18 @@
@@ -23,3 +25,20 @@
IF(NOT CMAKE_SHARED_LIBRARY_Ada_FLAGS)
SET(CMAKE_SHARED_LIBRARY_Ada_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
ENDIF(NOT CMAKE_SHARED_LIBRARY_Ada_FLAGS)
+Index: plplot-5.9.9/cmake/modules/language_support/cmake/CMakeDetermineAdaCompiler.cmake
+===================================================================
+--- plplot-5.9.9.orig/cmake/modules/language_support/cmake/CMakeDetermineAdaCompiler.cmake 2011-10-13 01:43:01.000000000 +0100
++++ plplot-5.9.9/cmake/modules/language_support/cmake/CMakeDetermineAdaCompiler.cmake 2013-06-25 16:55:17.698208176 +0100
+@@ -55,8 +55,11 @@
+
+ # configure variables set in this file for fast reload later on
+ #CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeAdaCompiler.cmake.in
++#message(STATUS "DEBUG: CMAKE_BINARY_DIR = ${CMAKE_BINARY_DIR}")
++#message(STATUS "DEBUG: CMAKE_FILES_DIRECTORY = ${CMAKE_FILES_DIRECTORY}")
++#message(STATUS "DEBUG: CMAKE_PLATFORM_INFO_DIR = ${CMAKE_PLATFORM_INFO_DIR}")
+ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeAdaCompiler.cmake.in
+- "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeAdaCompiler.cmake" IMMEDIATE)
++ "${CMAKE_PLATFORM_INFO_DIR}/CMakeAdaCompiler.cmake" IMMEDIATE)
+ MARK_AS_ADVANCED(CMAKE_AR)
+
+ SET(CMAKE_Ada_COMPILER_ENV_VAR "ADA")
Added: trunk/debian/patches/fix-cmake-d-support.diff
===================================================================
--- trunk/debian/patches/fix-cmake-d-support.diff (rev 0)
+++ trunk/debian/patches/fix-cmake-d-support.diff 2013-06-26 21:34:49 UTC (rev 12389)
@@ -0,0 +1,20 @@
+Description: Fix cmake D language support
+Author: Andrew Ross <and...@us...>
+Origin: upstream
+Index: plplot-5.9.9/cmake/modules/language_support/cmake/CMakeDetermineDCompiler.cmake
+===================================================================
+--- plplot-5.9.9.orig/cmake/modules/language_support/cmake/CMakeDetermineDCompiler.cmake 2011-10-13 01:43:01.000000000 +0100
++++ plplot-5.9.9/cmake/modules/language_support/cmake/CMakeDetermineDCompiler.cmake 2013-06-26 21:52:27.309698965 +0100
+@@ -99,10 +99,10 @@
+ # a different location.
+ IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeDCompiler.cmake.in)
+ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeDCompiler.cmake.in
+- "${CMAKE_PLATFORM_ROOT_BIN}/CMakeDCompiler.cmake" IMMEDIATE)
++ "${CMAKE_PLATFORM_INFO_DIR}/CMakeDCompiler.cmake" IMMEDIATE)
+ ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeDCompiler.cmake.in)
+ CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeDCompiler.cmake.in
+- "${CMAKE_PLATFORM_ROOT_BIN}/CMakeDCompiler.cmake" IMMEDIATE)
++ "${CMAKE_PLATFORM_INFO_DIR}/CMakeDCompiler.cmake" IMMEDIATE)
+ ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/modules/language_support/cmake/CMakeDCompiler.cmake.in)
+
+ MARK_AS_ADVANCED(CMAKE_AR)
Property changes on: trunk/debian/patches/fix-cmake-d-support.diff
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series 2013-06-26 06:03:55 UTC (rev 12388)
+++ trunk/debian/patches/series 2013-06-26 21:34:49 UTC (rev 12389)
@@ -7,3 +7,4 @@
fix-boolean-operators.diff
fix-cmake-ada-support.diff
fix-lua-includes.diff
+fix-cmake-d-support.diff
Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules 2013-06-26 06:03:55 UTC (rev 12388)
+++ trunk/debian/rules 2013-06-26 21:34:49 UTC (rev 12389)
@@ -91,9 +91,9 @@
endif
config: config-stamp
-config-stamp: control
+config-stamp: control
mkdir -p $(BUILD_DIR)
- (cd $(BUILD_DIR) ; \
+ ( cd $(BUILD_DIR) ; \
PKG_CONFIG_ENV=" " F77=gfortran FC=gfortran \
JAVA_HOME=$(JAVA_HOME) DC=$(DC) \
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" FFLAGS="$(FFLAGS)" \
@@ -201,7 +201,7 @@
install-python%: build-arch-stamp
( cd $(BUILD_DIR) ; \
- cmake $(SRC_DIR) $(CONFIGURE_OPTIONS) -DPYTHON_EXECUTABLE=/usr/bin/python$* -DPYTHON_LIBRARIES=/usr/lib/python$* -DPYTHON_LIBRARY=/usr/lib/python$*/config/libpython$*.so -DPYTHON_INCLUDE_PATH="/usr/include/python$*;/usr/include/numpy;/usr/lib/pyshared/python$*/numpy/core/include/numpy" -DNUMERIC_INCLUDE_PATH=/usr/include/numpy ; \
+ cmake $(SRC_DIR) $(CONFIGURE_OPTIONS) -DPYTHON_EXECUTABLE=/usr/bin/python$* -DPYTHON_LIBRARIES=/usr/lib/python$* -DPYTHON_LIBRARY=`python-config --config-dir`/libpython$*.so -DPYTHON_INCLUDE_PATH="/usr/include/python$*;/usr/include/numpy;/usr/lib/pyshared/python$*/numpy/core/include/numpy" -DNUMERIC_INCLUDE_PATH=/usr/include/numpy ; \
for d in python qt_gui/pyqt4 ; do \
( cd bindings/$$d; \
$(MAKE) clean ; \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-26 06:03:58
|
Revision: 12388
http://sourceforge.net/p/plplot/code/12388
Author: airwin
Date: 2013-06-26 06:03:55 +0000 (Wed, 26 Jun 2013)
Log Message:
-----------
Attempted PLplot build ran into some errors for the "MinGW Makefiles"
generator for the libharu dependency of PLplot. So temporarily drop wxwidgets (to save time)
and plplot (to avoid this error) and do full test of remaining 5
builds (for libqhull, libharu, ndiff, ligagg, and shapelib) for all
combinations of generators.
Note, one of these tests was for "NMake
Makefiles JOM" for both C and C++ projects so I had to propagate
CMAKE_CXX_COMPILER (as well as the equivalent C and RC variables) for that case to work around the issues between
this generator and the MinGW suite of compilers.
All these tests were fine as measured by
grep -i warn build_all.out |grep -v "passing argument" |less
grep -i error build_all.out |grep -v "but argument is of type" |less
So this large number of tests should provide a good benchmark for when I reenable plplot again.
Tested by: Alan W. Irwin <ai...@us...> using the
"build_all" target for the "MSYS Makefiles", "MinGW Makefiles", "NMake
Makefiles JOM" (with CMAKE_CXX_COMPILER. etc., workaround), and "Ninja" generators on a wine-git version near
wine-1.6.0-rc1, and for the "Unix Makefiles" and "Ninja" generators on
Linux.
Modified Paths:
--------------
trunk/cmake/build_projects/CMakeLists.txt
Modified: trunk/cmake/build_projects/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/CMakeLists.txt 2013-06-25 19:28:34 UTC (rev 12387)
+++ trunk/cmake/build_projects/CMakeLists.txt 2013-06-26 06:03:55 UTC (rev 12388)
@@ -141,12 +141,17 @@
# Propagate the overall CMake generator and install prefix to all CMake-based
# software project builds.
set(BP_CMAKE_COMMAND ${MSYS_CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX:PATH=${MSYS_CMAKE_INSTALL_PREFIX})
- # Propagate CMAKE_C_COMPILER and CMAKE_RC_COMPILER to all CMake-based
- # software project builds. (jom currently requires this as a workaround).
+ # Propagate CMAKE_C_COMPILER, CMAKE_CXX_COMPILER, and
+ # CMAKE_RC_COMPILER to all CMake-based software project builds.
+ # (jom currently requires this as a workaround).
if(CMAKE_C_COMPILER)
determine_msys_path(MSYS_CMAKE_C_COMPILER "${CMAKE_C_COMPILER}")
list(APPEND BP_CMAKE_COMMAND -DCMAKE_C_COMPILER:FILEPATH=${MSYS_CMAKE_C_COMPILER})
endif(CMAKE_C_COMPILER)
+ if(CMAKE_CXX_COMPILER)
+ determine_msys_path(MSYS_CMAKE_CXX_COMPILER "${CMAKE_CXX_COMPILER}")
+ list(APPEND BP_CMAKE_COMMAND -DCMAKE_CXX_COMPILER:FILEPATH=${MSYS_CMAKE_CXX_COMPILER})
+ endif(CMAKE_CXX_COMPILER)
if(CMAKE_RC_COMPILER)
determine_msys_path(MSYS_CMAKE_RC_COMPILER "${CMAKE_RC_COMPILER}")
list(APPEND BP_CMAKE_COMMAND -DCMAKE_RC_COMPILER:FILEPATH=${MSYS_CMAKE_RC_COMPILER})
@@ -203,9 +208,9 @@
libharu
libqhull
ndiff
- plplot
+# plplot
shapelib
- wxwidgets
+# wxwidgets
)
foreach(build_configuration ${build_configuration_LIST})
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-25 19:28:38
|
Revision: 12387
http://sourceforge.net/p/plplot/code/12387
Author: airwin
Date: 2013-06-25 19:28:34 +0000 (Tue, 25 Jun 2013)
Log Message:
-----------
Deal properly with case where CMAKE_INSTALL_PREFIX is an empty string.
(This case is typically used to generate binary distribution tarballs.)
Modified Paths:
--------------
trunk/cmake/modules/python.cmake
Modified: trunk/cmake/modules/python.cmake
===================================================================
--- trunk/cmake/modules/python.cmake 2013-06-25 18:49:38 UTC (rev 12386)
+++ trunk/cmake/modules/python.cmake 2013-06-25 19:28:34 UTC (rev 12387)
@@ -111,11 +111,20 @@
endif(ENABLE_python AND HAVE_NUMPY)
if(ENABLE_python)
+ # if CMAKE_INSTALL_EXEC_PREFIX is an empty string, must replace
+ # it with "/" to make PYTHON_INSTALL_TEMPLATE an absolute path to be
+ # consistent with all other installation paths.
+ if(CMAKE_INSTALL_EXEC_PREFIX)
+ set(PYTHON_INSTALL_TEMPLATE "${CMAKE_INSTALL_EXEC_PREFIX}")
+ else(CMAKE_INSTALL_EXEC_PREFIX)
+ set(PYTHON_INSTALL_TEMPLATE "/")
+ endif(CMAKE_INSTALL_EXEC_PREFIX)
+
# N.B. This is a nice way to obtain all sorts of Python information
# using distutils.
execute_process(
COMMAND
- ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}')"
+ ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${PYTHON_INSTALL_TEMPLATE}')"
OUTPUT_VARIABLE PYTHON_INSTDIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-25 18:49:41
|
Revision: 12386
http://sourceforge.net/p/plplot/code/12386
Author: airwin
Date: 2013-06-25 18:49:38 +0000 (Tue, 25 Jun 2013)
Log Message:
-----------
Remove specific install of plplot_py_demos.py from the build tree since that does not
work unless BUILD_TEST is ON, and in any case this file is
installed already from the source tree as part of python_SCRIPTS.
Modified Paths:
--------------
trunk/examples/python/CMakeLists.txt
Modified: trunk/examples/python/CMakeLists.txt
===================================================================
--- trunk/examples/python/CMakeLists.txt 2013-06-21 19:18:13 UTC (rev 12385)
+++ trunk/examples/python/CMakeLists.txt 2013-06-25 18:49:38 UTC (rev 12386)
@@ -262,11 +262,6 @@
RENAME plplot_python_start.py
)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plplot_py_demos.py
- DESTINATION ${DATA_DIR}/examples/python
- PERMISSIONS ${PERM_DATA}
- )
-
install(FILES CMakeLists.txt
DESTINATION ${DATA_DIR}/examples/python
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-21 19:18:16
|
Revision: 12385
http://sourceforge.net/p/plplot/code/12385
Author: airwin
Date: 2013-06-21 19:18:13 +0000 (Fri, 21 Jun 2013)
Log Message:
-----------
Propagate CMAKE_C_COMPILER and CMAKE_RC_COMPILER to aid workaround for
"NMake Makefiles JOM" generator which requires these variables to be
set for now for any non cl compiler, e.g., MinGW gcc.
Some logic cleanup
Modified Paths:
--------------
trunk/cmake/build_projects/CMakeLists.txt
Modified: trunk/cmake/build_projects/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/CMakeLists.txt 2013-06-21 19:04:38 UTC (rev 12384)
+++ trunk/cmake/build_projects/CMakeLists.txt 2013-06-21 19:18:13 UTC (rev 12385)
@@ -133,7 +133,6 @@
# On the MSYS platform, the env command (used to set relevant
# environment variables for the commands below in the */bp.cmake
# scripts) requires all full paths be in the MSYS platform form.
- determine_msys_path(BP_CMAKE_COMMAND "${BP_CMAKE_COMMAND}")
determine_msys_path(BP_BUILD_COMMAND "${BP_BUILD_COMMAND}")
determine_msys_path(BP_MAKE_COMMAND "${BP_MAKE_COMMAND}")
determine_msys_path(BP_CTEST_COMMAND "${BP_CTEST_COMMAND}")
@@ -142,6 +141,16 @@
# Propagate the overall CMake generator and install prefix to all CMake-based
# software project builds.
set(BP_CMAKE_COMMAND ${MSYS_CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX:PATH=${MSYS_CMAKE_INSTALL_PREFIX})
+ # Propagate CMAKE_C_COMPILER and CMAKE_RC_COMPILER to all CMake-based
+ # software project builds. (jom currently requires this as a workaround).
+ if(CMAKE_C_COMPILER)
+ determine_msys_path(MSYS_CMAKE_C_COMPILER "${CMAKE_C_COMPILER}")
+ list(APPEND BP_CMAKE_COMMAND -DCMAKE_C_COMPILER:FILEPATH=${MSYS_CMAKE_C_COMPILER})
+ endif(CMAKE_C_COMPILER)
+ if(CMAKE_RC_COMPILER)
+ determine_msys_path(MSYS_CMAKE_RC_COMPILER "${CMAKE_RC_COMPILER}")
+ list(APPEND BP_CMAKE_COMMAND -DCMAKE_RC_COMPILER:FILEPATH=${MSYS_CMAKE_RC_COMPILER})
+ endif(CMAKE_RC_COMPILER)
# Propagate the install prefix to autotools-based builds
set(BP_CONFIGURE_COMMAND configure --prefix=${MSYS_CMAKE_INSTALL_PREFIX})
else(MSYS_PLATFORM)
@@ -168,7 +177,14 @@
message(STATUS "BP_CTEST_COMMAND = ${BP_CTEST_COMMAND}")
message(STATUS "BP_PARALLEL_CTEST_COMMAND = ${BP_PARALLEL_CTEST_COMMAND}")
-set(BP_ORIGINAL_NATIVE_PATH "$ENV{PATH}")
+# Put ${CMAKE_INSTALL_PREFIX}/bin on the PATH as well for those cases
+# where some executable built and installed by build_projects needs
+# to be found by another project being configured by build_projects.
+if(MSYS_PLATFORM)
+ set(BP_ORIGINAL_NATIVE_PATH "$ENV{PATH};${CMAKE_INSTALL_PREFIX}/bin")
+else(MSYS_PLATFORM)
+ set(BP_ORIGINAL_NATIVE_PATH "$ENV{PATH}:${CMAKE_INSTALL_PREFIX}/bin")
+endif(MSYS_PLATFORM)
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
# Now include the build configurations for certain targets and their
@@ -180,16 +196,21 @@
# on those individual build targets
set(build_target_LIST)
-# Configure a build of ndiff. The ndiff application is not a a PLplot
-# dependency, but still this fuzzy diff is quite useful for PLplot
-# developers.
-include(ndiff/bp.cmake)
+# List of all configurations. Order doesn't matter because multiple
+# attempts to include the same configuration (via dependencies) are ignored.
+set(build_configuration_LIST
+ libagg
+ libharu
+ libqhull
+ ndiff
+ plplot
+ shapelib
+ wxwidgets
+)
-# Configure a build of wxwidgets, a soft (optional) PLplot dependency
-include(wxwidgets/bp.cmake)
+foreach(build_configuration ${build_configuration_LIST})
+ include(${build_configuration}/bp.cmake)
+endforeach(build_configuration ${build_configuration_LIST})
-# Configure a build of PLplot and its dependencies.
-include(plplot/bp.cmake)
-
add_custom_target(build_all)
add_dependencies(build_all ${build_target_LIST})
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-21 19:04:41
|
Revision: 12384
http://sourceforge.net/p/plplot/code/12384
Author: airwin
Date: 2013-06-21 19:04:38 +0000 (Fri, 21 Jun 2013)
Log Message:
-----------
Switch to slow but reliable non-parallel builds because parallel
builds for wxwidgets have proved to be unreliable both historically
and recently (presumably due to some parallel build race conditions
for wxwidgets that intermittently produce bad results depending on who
wins the race).
Modified Paths:
--------------
trunk/cmake/build_projects/wxwidgets/bp.cmake
Modified: trunk/cmake/build_projects/wxwidgets/bp.cmake
===================================================================
--- trunk/cmake/build_projects/wxwidgets/bp.cmake 2013-06-13 03:13:53 UTC (rev 12383)
+++ trunk/cmake/build_projects/wxwidgets/bp.cmake 2013-06-21 19:04:38 UTC (rev 12384)
@@ -43,23 +43,29 @@
determine_msys_path(BP_PATH "${BP_PATH}")
# Must have all elements of env command in MSYS platform form
determine_msys_path(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}")
+ # This flag is still necessary to keep ld step from exhausting
+ # memory with MinGW. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601
+ # for discussion of this. Apparently the issue was fixed for
+ # MinGW-4.6, but it appears to be back for 4.7.2.
+ set(${BP_PACKAGE}_SET_CXXFLAGS "CXXFLAGS=-fno-keep-inline-dllexport")
else(MSYS_PLATFORM)
set(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}")
+ set(${BP_PACKAGE}_SET_CXXFLAGS)
endif(MSYS_PLATFORM)
#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
-# The fno-keep-inline-dllexport flag required to work around
-# the memory exhaustion issue discussed in
-# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601
-# Still have memory exhaustion issues if you combine that
-# with -O3 so do not use the -O3 optimization flag.
+# Got intermittent failures using ${BP_PARALLEL_MAKE} both
+# historically and recently which are likely due to a parallel make
+# race condition for wxwidgets. So I have decided to use
+# slow but sure ${BP_MAKE_COMMAND} instead.
+
ExternalProject_Add(
build_${BP_PACKAGE}
URL ${${BP_PACKAGE}_URL}
URL_MD5 ${${BP_PACKAGE}_URL_MD5}
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} CXXFLAGS=-fno-keep-inline-dllexport ${source_PATH}/${BP_CONFIGURE_COMMAND} --enable-shared --enable-unicode --enable-debug --enable-debug_gdb
- BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND}
- INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND} install
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${${BP_PACKAGE}_SET_CXXFLAGS} ${source_PATH}/${BP_CONFIGURE_COMMAND} --enable-shared --enable-unicode --enable-debug --enable-debug_gdb
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_MAKE_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_MAKE_COMMAND} install
)
list(APPEND build_target_LIST build_${BP_PACKAGE})
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-13 03:13:57
|
Revision: 12383
http://sourceforge.net/p/plplot/code/12383
Author: airwin
Date: 2013-06-13 03:13:53 +0000 (Thu, 13 Jun 2013)
Log Message:
-----------
Protect against configuring a build twice in one CMake call,
Modified Paths:
--------------
trunk/cmake/build_projects/libagg/bp.cmake
trunk/cmake/build_projects/libharu/bp.cmake
trunk/cmake/build_projects/libqhull/bp.cmake
trunk/cmake/build_projects/ndiff/bp.cmake
trunk/cmake/build_projects/plplot/bp.cmake
trunk/cmake/build_projects/shapelib/bp.cmake
trunk/cmake/build_projects/wxwidgets/bp.cmake
Modified: trunk/cmake/build_projects/libagg/bp.cmake
===================================================================
--- trunk/cmake/build_projects/libagg/bp.cmake 2013-06-13 02:53:11 UTC (rev 12382)
+++ trunk/cmake/build_projects/libagg/bp.cmake 2013-06-13 03:13:53 UTC (rev 12383)
@@ -26,6 +26,12 @@
set(BP_PACKAGE libagg)
+# Protect against configuring a build twice in one CMake call
+if(${BP_PACKAGE}_configured)
+ return()
+endif(${BP_PACKAGE}_configured)
+set(${BP_PACKAGE}_configured ON)
+
# Data that is related to downloads.
set(${BP_PACKAGE}_URL http://www.antigrain.com/agg-2.5.tar.gz)
set(${BP_PACKAGE}_URL_MD5 0229a488bc47be10a2fee6cf0b2febd6)
Modified: trunk/cmake/build_projects/libharu/bp.cmake
===================================================================
--- trunk/cmake/build_projects/libharu/bp.cmake 2013-06-13 02:53:11 UTC (rev 12382)
+++ trunk/cmake/build_projects/libharu/bp.cmake 2013-06-13 03:13:53 UTC (rev 12383)
@@ -26,6 +26,12 @@
set(BP_PACKAGE libharu)
+# Protect against configuring a build twice in one CMake call
+if(${BP_PACKAGE}_configured)
+ return()
+endif(${BP_PACKAGE}_configured)
+set(${BP_PACKAGE}_configured ON)
+
# Data that is related to downloads.
set(${BP_PACKAGE}_URL http://${BP_PACKAGE}.org/files/${BP_PACKAGE}-2.1.0.tar.gz)
set(${BP_PACKAGE}_URL_MD5 0623b8fb08ae1b28af08b2cdbd66b662)
Modified: trunk/cmake/build_projects/libqhull/bp.cmake
===================================================================
--- trunk/cmake/build_projects/libqhull/bp.cmake 2013-06-13 02:53:11 UTC (rev 12382)
+++ trunk/cmake/build_projects/libqhull/bp.cmake 2013-06-13 03:13:53 UTC (rev 12383)
@@ -26,6 +26,12 @@
set(BP_PACKAGE libqhull)
+# Protect against configuring a build twice in one CMake call
+if(${BP_PACKAGE}_configured)
+ return()
+endif(${BP_PACKAGE}_configured)
+set(${BP_PACKAGE}_configured ON)
+
# Data that is related to downloads.
set(${BP_PACKAGE}_URL http://www.qhull.org/download/qhull-2010.1-src.tgz)
set(${BP_PACKAGE}_URL_MD5 e64138470acdeb18f752a0bc2a11ceb4)
Modified: trunk/cmake/build_projects/ndiff/bp.cmake
===================================================================
--- trunk/cmake/build_projects/ndiff/bp.cmake 2013-06-13 02:53:11 UTC (rev 12382)
+++ trunk/cmake/build_projects/ndiff/bp.cmake 2013-06-13 03:13:53 UTC (rev 12383)
@@ -26,6 +26,12 @@
set(BP_PACKAGE ndiff)
+# Protect against configuring a build twice in one CMake call
+if(${BP_PACKAGE}_configured)
+ return()
+endif(${BP_PACKAGE}_configured)
+set(${BP_PACKAGE}_configured ON)
+
# Data that is related to downloads.
set(${BP_PACKAGE}_URL ftp://ftp.math.utah.edu/pub/misc/${BP_PACKAGE}-2.00.tar.gz)
Modified: trunk/cmake/build_projects/plplot/bp.cmake
===================================================================
--- trunk/cmake/build_projects/plplot/bp.cmake 2013-06-13 02:53:11 UTC (rev 12382)
+++ trunk/cmake/build_projects/plplot/bp.cmake 2013-06-13 03:13:53 UTC (rev 12383)
@@ -25,6 +25,14 @@
# operate.
# Configure build of PLplot dependencies.
+set(BP_PACKAGE plplot)
+
+# Protect against configuring a build twice in one CMake call
+if(${BP_PACKAGE}_configured)
+ return()
+endif(${BP_PACKAGE}_configured)
+set(${BP_PACKAGE}_configured ON)
+
include(shapelib/bp.cmake)
include(libqhull/bp.cmake)
include(libharu/bp.cmake)
Modified: trunk/cmake/build_projects/shapelib/bp.cmake
===================================================================
--- trunk/cmake/build_projects/shapelib/bp.cmake 2013-06-13 02:53:11 UTC (rev 12382)
+++ trunk/cmake/build_projects/shapelib/bp.cmake 2013-06-13 03:13:53 UTC (rev 12383)
@@ -26,6 +26,12 @@
set(BP_PACKAGE shapelib)
+# Protect against configuring a build twice in one CMake call
+if(${BP_PACKAGE}_configured)
+ return()
+endif(${BP_PACKAGE}_configured)
+set(${BP_PACKAGE}_configured ON)
+
# Data that is related to downloads.
set(${BP_PACKAGE}_URL http://download.osgeo.org/${BP_PACKAGE}/${BP_PACKAGE}-1.3.0.tar.gz)
set(${BP_PACKAGE}_URL_MD5 2ff7d0b21d4b7506b452524492795f77)
Modified: trunk/cmake/build_projects/wxwidgets/bp.cmake
===================================================================
--- trunk/cmake/build_projects/wxwidgets/bp.cmake 2013-06-13 02:53:11 UTC (rev 12382)
+++ trunk/cmake/build_projects/wxwidgets/bp.cmake 2013-06-13 03:13:53 UTC (rev 12383)
@@ -26,6 +26,12 @@
set(BP_PACKAGE wxwidgets)
+# Protect against configuring a build twice in one CMake call
+if(${BP_PACKAGE}_configured)
+ return()
+endif(${BP_PACKAGE}_configured)
+set(${BP_PACKAGE}_configured ON)
+
# Data that is related to downloads.
set(${BP_PACKAGE}_URL http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.12.tar.gz)
set(${BP_PACKAGE}_URL_MD5 2fa39da14bc06ea86fe902579fedc5b1)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-13 02:53:15
|
Revision: 12382
http://sourceforge.net/p/plplot/code/12382
Author: airwin
Date: 2013-06-13 02:53:11 +0000 (Thu, 13 Jun 2013)
Log Message:
-----------
Add wxwidgets build configuration.
Tested by: Alan W. Irwin <ai...@us...> using the
build_wxwidgets target for the "Ninja" CMake generator both for
Linux and Wine (git version near 1.6_rc1).
Modified Paths:
--------------
trunk/cmake/build_projects/CMakeLists.txt
Added Paths:
-----------
trunk/cmake/build_projects/wxwidgets/
trunk/cmake/build_projects/wxwidgets/bp.cmake
Modified: trunk/cmake/build_projects/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/CMakeLists.txt 2013-06-12 20:55:04 UTC (rev 12381)
+++ trunk/cmake/build_projects/CMakeLists.txt 2013-06-13 02:53:11 UTC (rev 12382)
@@ -81,6 +81,7 @@
# individual project configurations will not work unless this is
# available so might as well check it here.
bash
+ make
)
foreach(executable ${executables_LIST})
@@ -118,10 +119,14 @@
endfunction(determine_msys_path)
endif(MSYS_PLATFORM)
-# This works for at least Linux make, ninja, MinGW mingw32_make, MSYS make,
-# and jom.
+# This gives the full pathname of the associated build tool for at
+# least the "Unix Makefiles", "Ninja", "MSYS Makefiles", "MinGW
+# Makefiles", and "NMake Makefiles JOM" CMake generators.
set(BP_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}")
+# Actual make programme used for autotools builds.
+set(BP_MAKE_COMMAND ${MAKE_EXECUTABLE})
+
set(BP_CTEST_COMMAND "${CMAKE_CTEST_COMMAND}")
if(MSYS_PLATFORM)
@@ -130,31 +135,39 @@
# scripts) requires all full paths be in the MSYS platform form.
determine_msys_path(BP_CMAKE_COMMAND "${BP_CMAKE_COMMAND}")
determine_msys_path(BP_BUILD_COMMAND "${BP_BUILD_COMMAND}")
+ determine_msys_path(BP_MAKE_COMMAND "${BP_MAKE_COMMAND}")
determine_msys_path(BP_CTEST_COMMAND "${BP_CTEST_COMMAND}")
determine_msys_path(MSYS_CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
determine_msys_path(MSYS_CMAKE_COMMAND "${CMAKE_COMMAND}")
# Propagate the overall CMake generator and install prefix to all CMake-based
# software project builds.
set(BP_CMAKE_COMMAND ${MSYS_CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX:PATH=${MSYS_CMAKE_INSTALL_PREFIX})
+ # Propagate the install prefix to autotools-based builds
+ set(BP_CONFIGURE_COMMAND configure --prefix=${MSYS_CMAKE_INSTALL_PREFIX})
else(MSYS_PLATFORM)
# Propagate the overall CMake generator and install prefix to all CMake-based
# software project builds.
set(BP_CMAKE_COMMAND ${CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX})
+ # Propagate the install prefix to autotools-based builds
+ set(BP_CONFIGURE_COMMAND configure --prefix=${CMAKE_INSTALL_PREFIX})
endif(MSYS_PLATFORM)
-
# The parallel versions are for software packages that
# do not have race conditions for parallel builds or tests.
set(BP_PARALLEL_BUILD_COMMAND "${BP_BUILD_COMMAND}" -j4)
set(BP_PARALLEL_CTEST_COMMAND "${BP_CTEST_COMMAND}" -j4)
+# For autotools based builds.
+set(BP_PARALLEL_MAKE_COMMAND "${BP_MAKE_COMMAND}" -j4)
message(STATUS "BP_CMAKE_COMMAND = ${BP_CMAKE_COMMAND}")
+message(STATUS "BP_CONFIGURE_COMMAND = ${BP_CONFIGURE_COMMAND}")
message(STATUS "BP_BUILD_COMMAND = ${BP_BUILD_COMMAND}")
message(STATUS "BP_PARALLEL_BUILD_COMMAND = ${BP_PARALLEL_BUILD_COMMAND}")
+message(STATUS "BP_MAKE_COMMAND = ${BP_MAKE_COMMAND}")
+message(STATUS "BP_PARALLEL_MAKE_COMMAND = ${BP_PARALLEL_MAKE_COMMAND}")
message(STATUS "BP_CTEST_COMMAND = ${BP_CTEST_COMMAND}")
message(STATUS "BP_PARALLEL_CTEST_COMMAND = ${BP_PARALLEL_CTEST_COMMAND}")
-
set(BP_ORIGINAL_NATIVE_PATH "$ENV{PATH}")
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
@@ -172,8 +185,8 @@
# developers.
include(ndiff/bp.cmake)
-# Configure wxwidgets, a soft (optional) PLplot dependency
-#include(wxwidgets/bp.cmake)
+# Configure a build of wxwidgets, a soft (optional) PLplot dependency
+include(wxwidgets/bp.cmake)
# Configure a build of PLplot and its dependencies.
include(plplot/bp.cmake)
Added: trunk/cmake/build_projects/wxwidgets/bp.cmake
===================================================================
--- trunk/cmake/build_projects/wxwidgets/bp.cmake (rev 0)
+++ trunk/cmake/build_projects/wxwidgets/bp.cmake 2013-06-13 02:53:11 UTC (rev 12382)
@@ -0,0 +1,62 @@
+# wxwidgets/bp.cmake
+# This file should be included directly or indirectly from a top-level
+# CMakeLists.txt file to configure the build of wxwidgets.
+
+# Copyright (C) 2013 Alan W. Irwin
+
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# The top-level CMakeLists.txt file that includes this file should
+# have run "include(ExternalProject)" and set EP_BASE variable (and
+# corresponding directory property) as well as various BP variables
+# used below that configure how the External_Project functions
+# operate.
+
+set(BP_PACKAGE wxwidgets)
+
+# Data that is related to downloads.
+set(${BP_PACKAGE}_URL http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.12.tar.gz)
+set(${BP_PACKAGE}_URL_MD5 2fa39da14bc06ea86fe902579fedc5b1)
+
+# Data that is related to the PATH that must be used.
+if(MSYS_PLATFORM)
+ #set(BP_PATH_NODLL "${BP_PATH}")
+ #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
+ determine_msys_path(BP_PATH "${BP_PATH}")
+ # Must have all elements of env command in MSYS platform form
+ determine_msys_path(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}")
+else(MSYS_PLATFORM)
+ set(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}")
+endif(MSYS_PLATFORM)
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
+
+# The fno-keep-inline-dllexport flag required to work around
+# the memory exhaustion issue discussed in
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601
+# Still have memory exhaustion issues if you combine that
+# with -O3 so do not use the -O3 optimization flag.
+ExternalProject_Add(
+ build_${BP_PACKAGE}
+ URL ${${BP_PACKAGE}_URL}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} CXXFLAGS=-fno-keep-inline-dllexport ${source_PATH}/${BP_CONFIGURE_COMMAND} --enable-shared --enable-unicode --enable-debug --enable-debug_gdb
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND} install
+ )
+
+list(APPEND build_target_LIST build_${BP_PACKAGE})
+# Restore BP_PATH to original state.
+set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2013-06-12 20:55:07
|
Revision: 12381
http://sourceforge.net/p/plplot/code/12381
Author: andrewross
Date: 2013-06-12 20:55:04 +0000 (Wed, 12 Jun 2013)
Log Message:
-----------
Style recent changes.
Modified Paths:
--------------
trunk/bindings/f95/scstubs.c
trunk/bindings/lua/plplotluac.i
Modified: trunk/bindings/f95/scstubs.c
===================================================================
--- trunk/bindings/f95/scstubs.c 2013-06-12 20:53:18 UTC (rev 12380)
+++ trunk/bindings/f95/scstubs.c 2013-06-12 20:55:04 UTC (rev 12381)
@@ -74,16 +74,16 @@
void PLCLEAR( void );
void PLCOL0( PLINT *icol );
void PLCOL1( PLFLT *col );
-void PLCOLORBAR(PLFLT *p_colorbar_width, PLFLT *p_colorbar_height,
- PLINT *opt, PLINT *position, PLFLT *x, PLFLT *y,
- PLFLT *x_length, PLFLT *y_length,
- PLINT *bg_color, PLINT *bb_color, PLINT *bb_style,
- PLFLT *low_cap_color, PLFLT *high_cap_color,
- PLINT *cont_color, PLFLT *cont_width,
- PLINT *n_labels, const PLINT *label_opts,
- PLINT *n_axes,
- const PLFLT *ticks, const PLINT *sub_ticks,
- const PLINT *n_values, const PLFLT *values);
+void PLCOLORBAR( PLFLT *p_colorbar_width, PLFLT *p_colorbar_height,
+ PLINT *opt, PLINT *position, PLFLT *x, PLFLT *y,
+ PLFLT *x_length, PLFLT *y_length,
+ PLINT *bg_color, PLINT *bb_color, PLINT *bb_style,
+ PLFLT *low_cap_color, PLFLT *high_cap_color,
+ PLINT *cont_color, PLFLT *cont_width,
+ PLINT *n_labels, const PLINT *label_opts,
+ PLINT *n_axes,
+ const PLFLT *ticks, const PLINT *sub_ticks,
+ const PLINT *n_values, const PLFLT *values );
void PLCONFIGTIME( PLFLT *scale, PLFLT *offset1, PLFLT *offset2, PLINT *ccontrol, PLBOOL *ifbtime_offset, PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec );
void PLCPSTRM( PLINT *iplsr, PLBOOL *flags );
void PLCTIME( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT *ctime );
@@ -398,49 +398,49 @@
void
PLCOLORBAR( PLFLT *p_colorbar_width, PLFLT *p_colorbar_height,
- PLINT *opt, PLINT *position, PLFLT *x, PLFLT *y,
- PLFLT *x_length, PLFLT *y_length,
- PLINT *bg_color, PLINT *bb_color, PLINT *bb_style,
- PLFLT *low_cap_color, PLFLT *high_cap_color,
- PLINT *cont_color, PLFLT *cont_width,
- PLINT *n_labels, const PLINT *label_opts,
- PLINT *n_axes,
- const PLFLT *ticks, const PLINT *sub_ticks,
- const PLINT *n_values, const PLFLT *values )
+ PLINT *opt, PLINT *position, PLFLT *x, PLFLT *y,
+ PLFLT *x_length, PLFLT *y_length,
+ PLINT *bg_color, PLINT *bb_color, PLINT *bb_style,
+ PLFLT *low_cap_color, PLFLT *high_cap_color,
+ PLINT *cont_color, PLFLT *cont_width,
+ PLINT *n_labels, const PLINT *label_opts,
+ PLINT *n_axes,
+ const PLFLT *ticks, const PLINT *sub_ticks,
+ const PLINT *n_values, const PLFLT *values )
{
// Need to allocate 2d C array for values
PLFLT **a;
- int i,j;
-
- a = (PLFLT **) malloc( sizeof(PLFLT *) * (*n_axes) );
- for (i=0;i<*n_axes;i++)
+ int i, j;
+
+ a = (PLFLT **) malloc( sizeof ( PLFLT * ) * ( *n_axes ) );
+ for ( i = 0; i < *n_axes; i++ )
{
- a[i] = (PLFLT *) malloc( sizeof(PLFLT)*n_values[i] );
- for (j=0;j<n_values[i];j++)
- {
- a[i][j] = values[i + j * (*n_axes)];
- }
+ a[i] = (PLFLT *) malloc( sizeof ( PLFLT ) * n_values[i] );
+ for ( j = 0; j < n_values[i]; j++ )
+ {
+ a[i][j] = values[i + j * ( *n_axes )];
+ }
}
- c_plcolorbar(p_colorbar_width, p_colorbar_height,
- *opt, *position, *x, *y,
- *x_length, *y_length,
- *bg_color, *bb_color, *bb_style,
- *low_cap_color, *high_cap_color,
- *cont_color, *cont_width,
- *n_labels, label_opts, (const char * const *) plcolorbar_labels,
- *n_axes, (const char * const *) plcolorbar_axisopts,
- ticks, sub_ticks,
- n_values, (const PLFLT * const *)a);
+ c_plcolorbar( p_colorbar_width, p_colorbar_height,
+ *opt, *position, *x, *y,
+ *x_length, *y_length,
+ *bg_color, *bb_color, *bb_style,
+ *low_cap_color, *high_cap_color,
+ *cont_color, *cont_width,
+ *n_labels, label_opts, (const char * const *) plcolorbar_labels,
+ *n_axes, (const char * const *) plcolorbar_axisopts,
+ ticks, sub_ticks,
+ n_values, (const PLFLT * const *) a );
free( *plcolorbar_labels );
free( plcolorbar_labels );
free( *plcolorbar_axisopts );
free( plcolorbar_axisopts );
- for (i=0;i<*n_axes;i++)
+ for ( i = 0; i < *n_axes; i++ )
{
- free(a[i]);
+ free( a[i] );
}
- free(a);
+ free( a );
}
void
@@ -861,24 +861,25 @@
p_string[j][i + 1] = '\0';
}
- switch( *id ) {
+ switch ( *id )
+ {
case 1:
- pllegend_text = p_string;
- break;
+ pllegend_text = p_string;
+ break;
case 2:
- pllegend_symbols = p_string;
- break;
+ pllegend_symbols = p_string;
+ break;
case 3:
- plcolorbar_labels = p_string;
- break;
+ plcolorbar_labels = p_string;
+ break;
case 4:
- plcolorbar_axisopts = p_string;
- break;
+ plcolorbar_axisopts = p_string;
+ break;
default:
- // Unknown
- free(data);
- free(p_string);
- break;
+ // Unknown
+ free( data );
+ free( p_string );
+ break;
}
}
Modified: trunk/bindings/lua/plplotluac.i
===================================================================
--- trunk/bindings/lua/plplotluac.i 2013-06-12 20:53:18 UTC (rev 12380)
+++ trunk/bindings/lua/plplotluac.i 2013-06-12 20:55:04 UTC (rev 12381)
@@ -238,7 +238,7 @@
$1 = (PLINT *) LUA_get_int_num_array_var( L, $input, &temp );
if ( !$1 )
SWIG_fail;
- if (temp != Alen)
+ if ( temp != Alen )
{
lua_pushfstring( L, "Tables must be of same length." );
SWIG_fail;
@@ -247,8 +247,8 @@
Xlen = temp;
Ylen = -1;
for ( i = 0; i < Xlen; i++ )
- if ( $1[i] > Ylen ) Ylen = $1[i];
-
+ if ( $1[i] > Ylen )
+ Ylen = $1[i];
}
%typemap( freearg ) ( const PLINT * ArrayN )
{
@@ -1268,7 +1268,7 @@
%typemap( in ) ( PLINT n, const char **Array )
{
int i;
- $1 = SWIG_table_size( L, $input );
+ $1 = SWIG_table_size( L, $input );
Alen = $1;
$2 = malloc( sizeof ( char* ) * Alen );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2013-06-12 20:53:21
|
Revision: 12380
http://sourceforge.net/p/plplot/code/12380
Author: andrewross
Date: 2013-06-12 20:53:18 +0000 (Wed, 12 Jun 2013)
Log Message:
-----------
Update f95 bindings to fix plcolorbar, plscmap1_range, plgcmap1_range. Update example 16 and 33 in line with C versions.
Modified Paths:
--------------
trunk/bindings/f95/plplot_parameters.h
trunk/bindings/f95/plstubs.h
trunk/bindings/f95/scstubs.c
trunk/bindings/f95/sfstubsf95.f90
trunk/examples/f95/x16f.f90
trunk/examples/f95/x33f.f90
Modified: trunk/bindings/f95/plplot_parameters.h
===================================================================
--- trunk/bindings/f95/plplot_parameters.h 2013-06-12 19:27:26 UTC (rev 12379)
+++ trunk/bindings/f95/plplot_parameters.h 2013-06-12 20:53:18 UTC (rev 12380)
@@ -81,9 +81,16 @@
integer, parameter :: PL_COLORBAR_IMAGE = 16
integer, parameter :: PL_COLORBAR_SHADE = 32
integer, parameter :: PL_COLORBAR_GRADIENT = 64
- integer, parameter :: PL_COLORBAR_CAP_LOW = 128
- integer, parameter :: PL_COLORBAR_CAP_HIGH = 256
- integer, parameter :: PL_COLORBAR_SHADE_LABEL = 512
+ integer, parameter :: PL_COLORBAR_CAP_NONE = 128
+ integer, parameter :: PL_COLORBAR_CAP_LOW = 256
+ integer, parameter :: PL_COLORBAR_CAP_HIGH = 512
+ integer, parameter :: PL_COLORBAR_SHADE_LABEL = 1024
+ integer, parameter :: PL_COLORBAR_ORIENT_RIGHT = 2048
+ integer, parameter :: PL_COLORBAR_ORIENT_TOP = 4096
+ integer, parameter :: PL_COLORBAR_ORIENT_LEFT = 8192
+ integer, parameter :: PL_COLORBAR_ORIENT_BOTTOM = 16384
+ integer, parameter :: PL_COLORBAR_BACKGROUND = 32768
+ integer, parameter :: PL_COLORBAR_BOUNDING_BOX = 65536
integer, parameter :: PLSWIN_DEVICE = 1 ! device coordinates
integer, parameter :: PLSWIN_WORLD = 2 ! world coordinates
integer, parameter :: PL_X_AXIS = 1 ! The x-axis
Modified: trunk/bindings/f95/plstubs.h
===================================================================
--- trunk/bindings/f95/plstubs.h 2013-06-12 19:27:26 UTC (rev 12379)
+++ trunk/bindings/f95/plstubs.h 2013-06-12 20:53:18 UTC (rev 12380)
@@ -185,6 +185,8 @@
#define PLCLR FNAME( PLCLR, plclr )
#define PLCOL0 FNAME( PLCOL0, plcol0 )
#define PLCOL1 FNAME( PLCOL1, plcol1 )
+#define PLCOLORBAR_CNV_TEXT FNAME( PLCOLORBAR07_CNV_TEXT, plcolorbar07_cnv_text )
+#define PLCOLORBAR FNAME( PLCOLORBAR07, plcolorbar07 )
#define PLCONFIGTIME FNAME( PLCONFIGTIME, plconfigtime )
#define PLCON07 FNAME( PLCON07, plcon07 )
#define PLCON17 FNAME( PLCON17, plcon17 )
@@ -206,6 +208,7 @@
#define PLFONT FNAME( PLFONT, plfont )
#define PLFONTLD FNAME( PLFONTLD, plfontld )
#define PLGCHR FNAME( PLGCHR, plgchr )
+#define PLGCMAP1_RANGE FNAME( PLFCMAP1_RANGE, plgcmap1_range )
#define PLGCOL0 FNAME( PLGCOL0, plgcol0 )
#define PLGCOL0A FNAME( PLGCOL0A, plgcol0a )
#define PLGCOLBG FNAME( PLGCOLBG, plgcolbg )
@@ -290,6 +293,7 @@
#define PLSCMAP1LA FNAME( PLSCMAP1LAF77, plscmap1laf77 )
#define PLSCMAP1LA2 FNAME( PLSCMAP1LA2F77, plscmap1la2f77 )
#define PLSCMAP1N FNAME( PLSCMAP1N, plscmap1n )
+#define PLSCMAP1_RANGE FNAME( PLSCMAP1_RANGE, plscmap1_range )
#define PLSCOL0 FNAME( PLSCOL0, plscol0 )
#define PLSCOL0A FNAME( PLSCOL0A, plscol0a )
#define PLSCOLBG FNAME( PLSCOLBG, plscolbg )
Modified: trunk/bindings/f95/scstubs.c
===================================================================
--- trunk/bindings/f95/scstubs.c 2013-06-12 19:27:26 UTC (rev 12379)
+++ trunk/bindings/f95/scstubs.c 2013-06-12 20:53:18 UTC (rev 12380)
@@ -47,6 +47,8 @@
static char **pllegend_text;
static char **pllegend_symbols;
+static char **plcolorbar_labels;
+static char **plcolorbar_axisopts;
// Function prototypes
static void pltransformf2c( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer data );
@@ -72,6 +74,16 @@
void PLCLEAR( void );
void PLCOL0( PLINT *icol );
void PLCOL1( PLFLT *col );
+void PLCOLORBAR(PLFLT *p_colorbar_width, PLFLT *p_colorbar_height,
+ PLINT *opt, PLINT *position, PLFLT *x, PLFLT *y,
+ PLFLT *x_length, PLFLT *y_length,
+ PLINT *bg_color, PLINT *bb_color, PLINT *bb_style,
+ PLFLT *low_cap_color, PLFLT *high_cap_color,
+ PLINT *cont_color, PLFLT *cont_width,
+ PLINT *n_labels, const PLINT *label_opts,
+ PLINT *n_axes,
+ const PLFLT *ticks, const PLINT *sub_ticks,
+ const PLINT *n_values, const PLFLT *values);
void PLCONFIGTIME( PLFLT *scale, PLFLT *offset1, PLFLT *offset2, PLINT *ccontrol, PLBOOL *ifbtime_offset, PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec );
void PLCPSTRM( PLINT *iplsr, PLBOOL *flags );
void PLCTIME( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT *ctime );
@@ -385,6 +397,53 @@
}
void
+PLCOLORBAR( PLFLT *p_colorbar_width, PLFLT *p_colorbar_height,
+ PLINT *opt, PLINT *position, PLFLT *x, PLFLT *y,
+ PLFLT *x_length, PLFLT *y_length,
+ PLINT *bg_color, PLINT *bb_color, PLINT *bb_style,
+ PLFLT *low_cap_color, PLFLT *high_cap_color,
+ PLINT *cont_color, PLFLT *cont_width,
+ PLINT *n_labels, const PLINT *label_opts,
+ PLINT *n_axes,
+ const PLFLT *ticks, const PLINT *sub_ticks,
+ const PLINT *n_values, const PLFLT *values )
+{
+ // Need to allocate 2d C array for values
+ PLFLT **a;
+ int i,j;
+
+ a = (PLFLT **) malloc( sizeof(PLFLT *) * (*n_axes) );
+ for (i=0;i<*n_axes;i++)
+ {
+ a[i] = (PLFLT *) malloc( sizeof(PLFLT)*n_values[i] );
+ for (j=0;j<n_values[i];j++)
+ {
+ a[i][j] = values[i + j * (*n_axes)];
+ }
+ }
+
+ c_plcolorbar(p_colorbar_width, p_colorbar_height,
+ *opt, *position, *x, *y,
+ *x_length, *y_length,
+ *bg_color, *bb_color, *bb_style,
+ *low_cap_color, *high_cap_color,
+ *cont_color, *cont_width,
+ *n_labels, label_opts, (const char * const *) plcolorbar_labels,
+ *n_axes, (const char * const *) plcolorbar_axisopts,
+ ticks, sub_ticks,
+ n_values, (const PLFLT * const *)a);
+ free( *plcolorbar_labels );
+ free( plcolorbar_labels );
+ free( *plcolorbar_axisopts );
+ free( plcolorbar_axisopts );
+ for (i=0;i<*n_axes;i++)
+ {
+ free(a[i]);
+ }
+ free(a);
+}
+
+void
PLCONFIGTIME( PLFLT *scale, PLFLT *offset1, PLFLT *offset2, PLINT *ccontrol, PLBOOL *ifbtime_offset, PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec )
{
c_plconfigtime( *scale, *offset1, *offset2, *ccontrol, *ifbtime_offset, *year, *month, *day, *hour, *min, *sec );
@@ -489,6 +548,12 @@
}
void
+PLGCMAP1_RANGE( PLFLT *min_color, PLFLT *max_color )
+{
+ c_plgcmap1_range( min_color, max_color );
+}
+
+void
PLGCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b )
{
c_plgcol0( *icol0, r, g, b );
@@ -796,14 +861,25 @@
p_string[j][i + 1] = '\0';
}
- if ( *id == 1 )
- {
- pllegend_text = p_string;
+ switch( *id ) {
+ case 1:
+ pllegend_text = p_string;
+ break;
+ case 2:
+ pllegend_symbols = p_string;
+ break;
+ case 3:
+ plcolorbar_labels = p_string;
+ break;
+ case 4:
+ plcolorbar_axisopts = p_string;
+ break;
+ default:
+ // Unknown
+ free(data);
+ free(p_string);
+ break;
}
- else
- {
- pllegend_symbols = p_string;
- }
}
void PLLEGEND(
@@ -1090,6 +1166,12 @@
}
void
+PLSCMAP1_RANGE( PLFLT *min_color, PLFLT *max_color )
+{
+ c_plscmap1_range( *min_color, *max_color );
+}
+
+void
PLSCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b )
{
c_plscol0( *icol0, *r, *g, *b );
Modified: trunk/bindings/f95/sfstubsf95.f90
===================================================================
--- trunk/bindings/f95/sfstubsf95.f90 2013-06-12 19:27:26 UTC (rev 12379)
+++ trunk/bindings/f95/sfstubsf95.f90 2013-06-12 20:53:18 UTC (rev 12380)
@@ -202,6 +202,11 @@
end subroutine plcol1
end interface
+ interface plcolorbar
+ module procedure plcolorbar_1
+ module procedure plcolorbar_2
+ end interface
+
interface plcpstrm
module procedure plcpstrm
end interface
@@ -275,6 +280,13 @@
end interface
interface
+ subroutine plgcmap1_range( min_color, max_color )
+ use plplot_flt
+ real(kind=plflt) :: min_color, max_color
+ end subroutine plgcmap1_range
+ end interface
+
+ interface
subroutine plgcol0( icol, r, g, b )
integer :: icol, r, g, b
end subroutine plgcol0
@@ -618,6 +630,13 @@
end interface
interface
+ subroutine plscmap1_range( min_color, max_color )
+ use plplot_flt
+ real(kind=plflt) :: min_color, max_color
+ end subroutine plscmap1_range
+ end interface
+
+ interface
subroutine plscol0( icol, r, g, b )
integer :: icol, r, g, b
end subroutine plscol0
@@ -989,6 +1008,80 @@
call plbinf77( size(x), x, y, center )
end subroutine plbin
+ subroutine plcolorbar_1( p_colorbar_width, p_colorbar_height, &
+ opt, position, x, y, &
+ x_length, y_length, &
+ bg_color, bb_color, bb_style, &
+ low_cap_color, high_cap_color, &
+ cont_color, cont_width, &
+ n_labels, label_opts, labels, &
+ n_axes, axis_opts, ticks, sub_ticks, &
+ n_values, values)
+ real (kind=plflt) :: p_colorbar_width, p_colorbar_height
+ integer :: opt, position, bg_color, bb_color, bb_style, cont_color
+ integer :: n_labels, n_axes
+ real (kind=plflt) :: x, y, x_length, y_length, low_cap_color, high_cap_color, cont_width
+ integer, dimension(:) :: label_opts, sub_ticks, n_values
+ real (kind=plflt), dimension(:) :: ticks
+ real (kind=plflt), dimension(:,:) :: values
+ character(len=*), dimension(:) :: labels, axis_opts
+
+ !
+ ! Convert the text arrays and store the results in a convenient
+ ! albeit global location. This way we avoid all manner of complications.
+ ! (Though introducing a potentially nasty one: non-threadsafety)
+ !
+ call pllegend07_cnv_text( 3, n_labels, labels )
+ call pllegend07_cnv_text( 4, n_axes, axis_opts )
+
+ call plcolorbar07(p_colorbar_width, p_colorbar_height, &
+ opt, position, x, y, &
+ x_length, y_length, &
+ bg_color, bb_color, bb_style, &
+ low_cap_color, high_cap_color, &
+ cont_color, cont_width, &
+ n_labels, label_opts, n_axes, ticks, sub_ticks, &
+ n_values, values)
+ end subroutine plcolorbar_1
+
+ subroutine plcolorbar_2( p_colorbar_width, p_colorbar_height, &
+ opt, position, x, y, &
+ x_length, y_length, &
+ bg_color, bb_color, bb_style, &
+ low_cap_color, high_cap_color, &
+ cont_color, cont_width, &
+ label_opts, labels, axis_opts, ticks, sub_ticks, &
+ n_values, values)
+ real (kind=plflt) :: p_colorbar_width, p_colorbar_height
+ integer :: opt, position, bg_color, bb_color, bb_style, cont_color
+ real (kind=plflt) :: x, y, x_length, y_length, low_cap_color, high_cap_color, cont_width
+ integer, dimension(:) :: label_opts, sub_ticks, n_values
+ real (kind=plflt), dimension(:) :: ticks
+ real (kind=plflt), dimension(:,:) :: values
+ character(len=*), dimension(:) :: labels, axis_opts
+
+ integer :: n_labels, n_axes
+
+ n_labels = size(label_opts,1)
+ n_axes = size(axis_opts,1)
+ !
+ ! Convert the text arrays and store the results in a convenient
+ ! albeit global location. This way we avoid all manner of complications.
+ ! (Though introducing a potentially nasty one: non-threadsafety)
+ !
+ call pllegend07_cnv_text( 3, n_labels, labels )
+ call pllegend07_cnv_text( 4, n_axes, axis_opts )
+
+ call plcolorbar07(p_colorbar_width, p_colorbar_height, &
+ opt, position, x, y, &
+ x_length, y_length, &
+ bg_color, bb_color, bb_style, &
+ low_cap_color, high_cap_color, &
+ cont_color, cont_width, &
+ n_labels, label_opts, n_axes, ticks, sub_ticks, &
+ n_values, values)
+ end subroutine plcolorbar_2
+
subroutine plcpstrm( iplsr, flags )
integer :: iplsr
logical :: flags
Modified: trunk/examples/f95/x16f.f90
===================================================================
--- trunk/examples/f95/x16f.f90 2013-06-12 19:27:26 UTC (rev 12379)
+++ trunk/examples/f95/x16f.f90 2013-06-12 20:53:18 UTC (rev 12380)
@@ -35,6 +35,17 @@
px(PERIMETERPTS), py(PERIMETERPTS)
integer cont_color
real(kind=plflt) fill_width, cont_width
+ real(kind=plflt) colorbar_width, colorbar_height
+ integer NUM_AXES, NUM_LABELS
+ parameter(NUM_AXES=1, NUM_LABELS=1)
+ character(len=20) :: axis_opts(NUM_AXES)
+ integer num_values(NUM_AXES)
+ real(kind=plflt) values(NUM_AXES,NLEVEL+1)
+ real(kind=plflt) axis_ticks(NUM_AXES)
+ integer axis_subticks(NUM_AXES)
+ character(len=100) :: labels(NUM_LABELS)
+ integer label_opts(NUM_LABELS)
+
integer i, j
! dummy to fill argument list with something not currently used.
character(len=1) defined
@@ -114,11 +125,40 @@
fill_width = 2
cont_color = 0
cont_width = 0
+ axis_opts(1) = 'bcvtm'
+ axis_ticks(1) = 0.0_plflt
+ axis_subticks(1) = 0
+ label_opts(1) = PL_COLORBAR_LABEL_BOTTOM
+ labels(1) = 'Magnitude'
+
call plshades(z(:NX,:NY), defined, -1._plflt, 1._plflt, -1._plflt, &
1._plflt, &
shedge, fill_width, &
cont_color, cont_width )
+ ! Smaller text
+ call plschr( 0.0_plflt, 0.75_plflt )
+ ! Small ticks on the vertical axis
+ call plsmaj( 0.0_plflt, 0.5_plflt )
+ call plsmin( 0.0_plflt, 0.5_plflt )
+
+ num_values(1) = NLEVEL + 1;
+ values(1,:) = shedge;
+ call plcolorbar( colorbar_width, colorbar_height, &
+ ior(PL_COLORBAR_SHADE, PL_COLORBAR_SHADE_LABEL), 0, &
+ 0.005_plflt, 0.0_plflt, 0.0375_plflt, 0.875_plflt, 0, 1, 1, &
+ 0.0_plflt, 0.0_plflt, &
+ cont_color, cont_width, &
+ label_opts, labels, &
+ axis_opts, &
+ axis_ticks, axis_subticks, &
+ num_values, values )
+
+ ! Reset text and tick sizes
+ call plschr( 0.0_plflt, 1.0_plflt )
+ call plsmaj( 0.0_plflt, 1.0_plflt )
+ call plsmin( 0.0_plflt, 1.0_plflt )
+
call plcol0(1)
call plbox('bcnst', 0.0_plflt, 0, 'bcnstv', 0.0_plflt, 0)
call plcol0(2)
@@ -144,6 +184,29 @@
shedge, fill_width, &
cont_color, cont_width, xg1(:NX), yg1(:NY))
+ ! Smaller text
+ call plschr( 0.0_plflt, 0.75_plflt )
+ ! Small ticks on the vertical axis
+ call plsmaj( 0.0_plflt, 0.5_plflt )
+ call plsmin( 0.0_plflt, 0.5_plflt )
+
+ num_values(1) = NLEVEL + 1;
+ values(1,:) = shedge;
+ call plcolorbar( colorbar_width, colorbar_height, &
+ ior(PL_COLORBAR_SHADE, PL_COLORBAR_SHADE_LABEL), 0, &
+ 0.005_plflt, 0.0_plflt, 0.0375_plflt, 0.875_plflt, 0, 1, 1, &
+ 0.0_plflt, 0.0_plflt, &
+ cont_color, cont_width, &
+ label_opts, labels, &
+ axis_opts, &
+ axis_ticks, axis_subticks, &
+ num_values, values )
+
+ ! Reset text and tick sizes
+ call plschr( 0.0_plflt, 1.0_plflt )
+ call plsmaj( 0.0_plflt, 1.0_plflt )
+ call plsmin( 0.0_plflt, 1.0_plflt )
+
call plcol0(1)
call plbox('bcnst', 0.0_plflt, 0, 'bcnstv', 0.0_plflt, 0)
call plcol0(2)
@@ -169,6 +232,29 @@
shedge, fill_width, &
cont_color, cont_width, xg2(:NX,:NY), yg2(:NX,:NY) )
+ ! Smaller text
+ call plschr( 0.0_plflt, 0.75_plflt )
+ ! Small ticks on the vertical axis
+ call plsmaj( 0.0_plflt, 0.5_plflt )
+ call plsmin( 0.0_plflt, 0.5_plflt )
+
+ num_values(1) = NLEVEL + 1;
+ values(1,:) = shedge;
+ call plcolorbar( colorbar_width, colorbar_height, &
+ ior(PL_COLORBAR_SHADE, PL_COLORBAR_SHADE_LABEL), 0, &
+ 0.005_plflt, 0.0_plflt, 0.0375_plflt, 0.875_plflt, 0, 1, 1, &
+ 0.0_plflt, 0.0_plflt, &
+ cont_color, cont_width, &
+ label_opts, labels, &
+ axis_opts, &
+ axis_ticks, axis_subticks, &
+ num_values, values )
+
+ ! Reset text and tick sizes
+ call plschr( 0.0_plflt, 1.0_plflt )
+ call plsmaj( 0.0_plflt, 1.0_plflt )
+ call plsmin( 0.0_plflt, 1.0_plflt )
+
call plcol0(1)
call plbox('bcnst', 0.0_plflt, 0, 'bcnstv', 0.0_plflt, 0)
call plcol0(2)
@@ -195,6 +281,29 @@
shedge, fill_width, &
cont_color, cont_width, xg2(:NX,:NY), yg2(:NX,:NY) )
+ ! Smaller text
+ call plschr( 0.0_plflt, 0.75_plflt )
+ ! Small ticks on the vertical axis
+ call plsmaj( 0.0_plflt, 0.5_plflt )
+ call plsmin( 0.0_plflt, 0.5_plflt )
+
+ num_values(1) = NLEVEL + 1;
+ values(1,:) = shedge;
+ call plcolorbar( colorbar_width, colorbar_height, &
+ ior(PL_COLORBAR_SHADE, PL_COLORBAR_SHADE_LABEL), 0, &
+ 0.005_plflt, 0.0_plflt, 0.0375_plflt, 0.875_plflt, 0, 1, 1, &
+ 0.0_plflt, 0.0_plflt, &
+ 2, 3._plflt, &
+ label_opts, labels, &
+ axis_opts, &
+ axis_ticks, axis_subticks, &
+ num_values, values )
+
+ ! Reset text and tick sizes
+ call plschr( 0.0_plflt, 1.0_plflt )
+ call plsmaj( 0.0_plflt, 1.0_plflt )
+ call plsmin( 0.0_plflt, 1.0_plflt )
+
call plcol0(1)
call plbox('bcnst', 0.0_plflt, 0, 'bcnstv', 0.0_plflt, 0)
call plcol0(2)
@@ -237,6 +346,29 @@
shedge, fill_width, &
cont_color, cont_width, xg2(:NX,:NY), yg2(:NX,:NY) )
+ ! Smaller text
+ call plschr( 0.0_plflt, 0.75_plflt )
+ ! Small ticks on the vertical axis
+ call plsmaj( 0.0_plflt, 0.5_plflt )
+ call plsmin( 0.0_plflt, 0.5_plflt )
+
+ num_values(1) = NLEVEL + 1;
+ values(1,:) = shedge;
+ call plcolorbar( colorbar_width, colorbar_height, &
+ ior(PL_COLORBAR_SHADE, PL_COLORBAR_SHADE_LABEL), 0, &
+ 0.005_plflt, 0.0_plflt, 0.0375_plflt, 0.875_plflt, 0, 1, 1, &
+ 0.0_plflt, 0.0_plflt, &
+ cont_color, cont_width, &
+ label_opts, labels, &
+ axis_opts, &
+ axis_ticks, axis_subticks, &
+ num_values, values )
+
+ ! Reset text and tick sizes
+ call plschr( 0.0_plflt, 1.0_plflt )
+ call plsmaj( 0.0_plflt, 1.0_plflt )
+ call plsmin( 0.0_plflt, 1.0_plflt )
+
! Now we can draw the perimeter. (If do before, shade stuff may overlap.)
do i = 1, PERIMETERPTS
t = (2._plflt*PI/dble(PERIMETERPTS-1))*dble(i-1)
Modified: trunk/examples/f95/x33f.f90
===================================================================
--- trunk/examples/f95/x33f.f90 2013-06-12 19:27:26 UTC (rev 12379)
+++ trunk/examples/f95/x33f.f90 2013-06-12 20:53:18 UTC (rev 12380)
@@ -70,7 +70,22 @@
real(kind=plflt) :: values_uneven(9)
real(kind=plflt) :: values_even(9)
+ integer, parameter :: COLORBAR_KINDS = 4
+ integer :: colorbar_option_kinds(COLORBAR_KINDS)
+ character(len=100) :: colorbar_option_kind_labels(COLORBAR_KINDS)
+ integer, parameter :: COLORBAR_POSITIONS = 4
+ integer :: colorbar_position_options(COLORBAR_POSITIONS)
+ character(len=100) :: colorbar_position_option_labels(COLORBAR_POSITIONS)
+
+ integer, parameter :: COLORBAR_LABELS = 4
+ integer :: colorbar_label_options(COLORBAR_LABELS)
+ character(len=100) :: colorbar_label_option_labels(COLORBAR_LABELS)
+
+ integer, parameter :: COLORBAR_CAPS = 4
+ integer :: colorbar_cap_options(COLORBAR_CAPS)
+ character(len=100) :: colorbar_cap_option_labels(COLORBAR_CAPS)
+
! Pick 5 arbitrary UTF-8 symbols useful for plotting points (✠✚✱✪✽✺✰✴✦).
data special_symbols / &
'✰', &
@@ -79,11 +94,15 @@
'✽', &
'✦' /
- data values_small / 0.0_plflt, 1.0_plflt /
+ data values_small / -1.0e-200_plflt, 1.0e-200_plflt /
data values_uneven &
- / 0.0_plflt, 2.0_plflt, 2.6_plflt, 3.4_plflt, 6.0_plflt, 7.0_plflt, 8.0_plflt, 9.0_plflt, 10.0_plflt /
+ / -1.0e-200_plflt, 2.0e-200_plflt, 2.6e-200_plflt, 3.4e-200_plflt, &
+ 6.0e-200_plflt, 7.0e-200_plflt, 8.0e-200_plflt, 9.0e-200_plflt, &
+ 10.0e-200_plflt /
data values_even &
- / 0.0_plflt, 1.0_plflt, 2.0_plflt, 3.0_plflt, 4.0_plflt, 5.0_plflt, 6.0_plflt, 7.0_plflt, 8.0_plflt /
+ / -2.0e-200_plflt, -1.0e-200_plflt, 0.0e-200_plflt, 1.0e-200_plflt, &
+ 2.0e-200_plflt, 3.0e-200_plflt, 4.0e-200_plflt, 5.0e-200_plflt, &
+ 6.0e-200_plflt /
position_options(1) = PL_POSITION_LEFT + PL_POSITION_TOP + PL_POSITION_OUTSIDE
position_options(2) = PL_POSITION_TOP + PL_POSITION_OUTSIDE
@@ -102,6 +121,52 @@
position_options(15) = PL_POSITION_LEFT + PL_POSITION_BOTTOM + PL_POSITION_INSIDE
position_options(16) = PL_POSITION_LEFT + PL_POSITION_INSIDE
+ ! plcolorbar options
+
+ ! Colorbar type options
+ colorbar_option_kinds(1) = PL_COLORBAR_SHADE
+ colorbar_option_kinds(2) = PL_COLORBAR_SHADE + PL_COLORBAR_SHADE_LABEL
+ colorbar_option_kinds(3) = PL_COLORBAR_IMAGE
+ colorbar_option_kinds(4) = PL_COLORBAR_GRADIENT
+
+ colorbar_option_kind_labels(1) = "Shade colorbars"
+ colorbar_option_kind_labels(2) = "Shade colorbars with custom labels"
+ colorbar_option_kind_labels(3) = "Image colorbars"
+ colorbar_option_kind_labels(4) = "Gradient colorbars"
+
+ ! Which side of the page are we positioned relative to?
+ colorbar_position_options(1) = PL_POSITION_LEFT
+ colorbar_position_options(2) = PL_POSITION_RIGHT
+ colorbar_position_options(3) = PL_POSITION_TOP
+ colorbar_position_options(4) = PL_POSITION_BOTTOM
+
+ colorbar_position_option_labels(1) = "Left"
+ colorbar_position_option_labels(2) = "Right"
+ colorbar_position_option_labels(3) = "Top"
+ colorbar_position_option_labels(4) = "Bottom"
+
+ ! Colorbar label positioning options
+ colorbar_label_options(1) = PL_COLORBAR_LABEL_LEFT
+ colorbar_label_options(2) = PL_COLORBAR_LABEL_RIGHT
+ colorbar_label_options(3) = PL_COLORBAR_LABEL_TOP
+ colorbar_label_options(4) = PL_COLORBAR_LABEL_BOTTOM
+
+ colorbar_label_option_labels(1) = "Label left"
+ colorbar_label_option_labels(2) = "Label right"
+ colorbar_label_option_labels(3) = "Label top"
+ colorbar_label_option_labels(4) = "Label bottom"
+
+ ! Colorbar cap options
+ colorbar_cap_options(1) = PL_COLORBAR_CAP_NONE
+ colorbar_cap_options(2) = PL_COLORBAR_CAP_LOW
+ colorbar_cap_options(3) = PL_COLORBAR_CAP_HIGH
+ colorbar_cap_options(4) = PL_COLORBAR_CAP_LOW + PL_COLORBAR_CAP_HIGH
+
+ colorbar_cap_option_labels(1) = "No caps"
+ colorbar_cap_option_labels(2) = "Low cap"
+ colorbar_cap_option_labels(3) = "High cap"
+ colorbar_cap_option_labels(4) = "Low and high caps"
+
! Parse and process command line arguments
call plparseopts(PL_PARSE_FULL)
@@ -644,186 +709,165 @@
! Color bar examples
-!
-! Note: commented until plcolorbar is ready!
-!
-! call plcolorbar_example_1( PL_COLORBAR_IMAGE, 0.0_plflt, 0, 2,
-! & values_small, 'Image Color Bars' )
-! call plcolorbar_example_1(
-! & PL_COLORBAR_SHADE + PL_COLORBAR_SHADE_LABEL,
-! & 0.0_plflt, 0, 9, values_uneven,
-! & 'Shade Color Bars - Uneven Steps' )
-! call plcolorbar_example_2( PL_COLORBAR_SHADE, 3.0_plflt, 3, 9,
-! & values_even, 'Shade Color Bars - Even Steps' )
-! call plcolorbar_example_1( PL_COLORBAR_GRADIENT, 0.5_plflt, 5, 2,
-! & values_small, 'Gradient Color Bars' )
-! call plcolorbar_example_2( PL_COLORBAR_GRADIENT, 0.5_plflt, 5, 2,
-! & values_small, 'Gradient Color Bars' )
+ ! Use unsaturated green background colour to contrast with black caps.
+ call plscolbg( 70, 185, 70 )
+ ! Cut out the greatest and smallest bits of the color spectrum to
+ ! leave colors for the end caps.
+ call plscmap1_range( 0.01_plflt, 0.99_plflt )
+ ! We can only test image and gradient colorbars with two element arrays
+ do i = 2,COLORBAR_KINDS-1
+ call plcolorbar_example( "cmap1_blue_yellow.pal", i, 0, 0._plflt, 2, values_small )
+ enddo
+ ! Test shade colorbars with larger arrays
+ do i = 0,1
+ call plcolorbar_example( "cmap1_blue_yellow.pal", i, 4, 2._plflt, 9, values_even )
+ enddo
+ do i = 0,1
+ call plcolorbar_example( "cmap1_blue_yellow.pal", i, 0, 0._plflt, 9, values_uneven )
+ enddo
+
call plend()
-! contains
+ contains
+ subroutine plcolorbar_example_page( kind_i, label_i, cap_i, cont_color, cont_width, n_values, values )
-! Color bar routines
-!
-! subroutine plcolorbar_example_1( bar_type, ticks, sub_ticks, n,
-! & values, title )
-!
-! integer bar_type, position
-! real(kind=plflt) ticks
-! integer sub_ticks
-! integer n
-! real(kind=plflt) values(*)
-! character(*) title
-!
-!
-! FORTRAN 77: array fixed
-!
-! real(kind=plflt) colors(20)
-! real(kind=plflt) color_step
-! integer i
-! integer opt
-! character(10) axis_opts_1, axis_opts_2
-!
-! call pladv( 0 )
-!
-! Setup color palette 1
-! call plspal1( 'cmap1_blue_red.pal', 1 )
-!
-! color_step = 1.0_plflt / ( n - 1 )
-! do 110 i = 1,n
-! colors(i) = 0.0_plflt + color_step * i
-! 110 continue
-!
-! position = PL_POSITION_LEFT
-! opt = bar_type + PL_COLORBAR_LABEL_LEFT +
-! & PL_COLORBAR_CAP_HIGH
-!
-! if ( mod( bar_type, 2*PL_COLORBAR_SHADE_LABEL ) /
-! & PL_COLORBAR_SHADE_LABEL .eq. 1 ) then
-! axis_opts_1 = 'iv'
-! axis_opts_2 = 'i'
-! else
-! axis_opts_1 = 'stv'
-! axis_opts_2 = 'st'
-! else
-! axis_opts_1 = 'tv'
-! axis_opts_2 = 't'
-! endif
-! endif
-!
-! call plcolorbar( opt, 0.1_plflt, 0.1_plflt, 0.5_plflt, 0.1_plflt,
-! & ticks, sub_ticks,
-! & axis_opts_1, 'Test label - Left, High Cap',
-!
-! position = PL_POSITION_RIGHT
-! opt = bar_type + PL_COLORBAR_LABEL_RIGHT +
-! & PL_COLORBAR_CAP_LOW
-!
-! call plcolorbar( opt, 0.1_plflt, 0.4_plflt, 0.5_plflt, 0.1_plflt,
-! & ticks, sub_ticks,
-! & n, colors, values )
-!
-! position = PL_POSITION_TOP
-! opt = bar_type + PL_COLORBAR_LABEL_TOP +
-! & PL_COLORBAR_CAP_HIGH
-!
-! call plcolorbar( opt, 0.1_plflt, 0.1_plflt, 0.5_plflt, 0.1_plflt,
-! & ticks, sub_ticks,
-! & axis_opts_2, 'Test label - Upper, High Cap',
-! & n, colors, values )
-!
-! position = PL_POSITION_TOP
-! opt = bar_type + PL_COLORBAR_LABEL_BOTTOM +
-! & PL_COLORBAR_CAP_LOW
-!
-! call plcolorbar( opt, 0.4_plflt, 0.1_plflt, 0.5_plflt, 0.1_plflt,
-! & ticks, sub_ticks,
-! & axis_opts_2, 'Test label - Lower, Low Cap',
-! & n, colors, values )
-!
-! call plvpor( 0.0_plflt, 1.0_plflt, 0.0_plflt, 1.0_plflt )
-! call plwind( 0.0_plflt, 1.0_plflt, 0.0_plflt, 1.0_plflt )
-! call plptex( 0.5_plflt, 0.5_plflt, 0.0_plflt, 0.0_plflt, 0.5_plflt, title )
-! end
-!
-! subroutine plcolorbar_example_2( bar_type, ticks, sub_ticks, n,
-! & values, title )
-!
-! integer bar_type, position
-! real(kind=plflt) ticks
-! integer sub_ticks
-! integer n
-! real(kind=plflt) values(*)
-! character(*) title
-!
-! real(kind=plflt) colors(20)
-! integer i
-! real(kind=plflt) color_step
-! integer opt
-! character(10) axis_opts_1, axis_opts_2
-!
-! call pladv( 0 )
-! Setup color palette 1
-! call plspal1( 'cmap1_blue_yellow.pal', 1 )
-!
-! color_step = 1.0_plflt / ( n - 1 )
-! do 110 i = 1,n
-! colors(i) = 0.0_plflt + color_step * i
-! 110 continue
-!
-! position = PL_POSITION_LEFT
-! opt = bar_type + PL_COLORBAR_LABEL_LEFT +
-! & PL_COLORBAR_CAP_LOW
-!
-! if ( bar_type .eq. PL_COLORBAR_SHADE_LABEL ) then
-! axis_opts_1 = ''
-! axis_opts_2 = ''
-! else
-! if ( sub_ticks .ne. 0 ) then
-! axis_opts_1 = 'stv'
-! axis_opts_2 = 'st'
-! else
-! axis_opts_1 = 'tv'
-! axis_opts_2 = 't'
-! endif
-! endif
-!
-! call plcolorbar( opt, 0.1_plflt, 0.1_plflt, 0.5_plflt, 0.1_plflt,
-! & ticks, sub_ticks,
-! & axis_opts_1, 'Test label - Left, Low Cap',
-! & n, colors, values )
-!
-! position = PL_POSITION_RIGHT
-! opt = bar_type + PL_COLORBAR_LABEL_RIGHT +
-! & PL_COLORBAR_CAP_HIGH
-!
-! call plcolorbar( opt, 0.1_plflt, 0.4_plflt, 0.5_plflt, 0.1_plflt,
-! & ticks, sub_ticks,
-! & axis_opts_1, 'Test label - Right, High Cap',
-! & n, colors, values )
-!
-! position = PL_POSITION_TOP
-! opt = bar_type + PL_COLORBAR_LABEL_TOP +
-! & PL_COLORBAR_CAP_LOW
-!
-! call plcolorbar( opt, 0.1_plflt, 0.1_plflt, 0.5_plflt, 0.1_plflt,
-! & ticks, sub_ticks,
-! & axis_opts_2, 'Test label - Upper, Low Cap',
-! & n, colors, values )
-!
-! position = PL_POSITION_BOTTOM
-! opt = bar_type + PL_COLORBAR_LABEL_BOTTOM +
-! & PL_COLORBAR_CAP_HIGH
-!
-! call plcolorbar( opt, 0.4_plflt, 0.1_plflt, 0.5_plflt, 0.1_plflt,
-! & ticks, sub_ticks,
-! & axis_opts_2, 'Test label - Lower, High Cap',
-! & n, colors, values )
-!
-! call plvpor( 0.0_plflt, 1.0_plflt, 0.0_plflt, 1.0_plflt )
-! call plwind( 0.0_plflt, 1.0_plflt, 0.0_plflt, 1.0_plflt )
-! call plptex( 0.5_plflt, 0.5_plflt, 0.0_plflt, 0.0_plflt, 0.5_plflt, title )
-! end
+ use plplot
+
+ implicit none
+
+ integer :: kind_i, label_i, cap_i, cont_color, n_values
+ real(kind=plflt) :: cont_width
+ real(kind=plflt), dimension(:) :: values
+
+ ! Parameters for the colorbars on this page
+ integer :: position_i, position, opt
+ real(kind=plflt) :: x, y, x_length, y_length;
+ real(kind=plflt) :: ticks(1)
+ integer :: sub_ticks(1)
+ real(kind=plflt) :: low_cap_color, high_cap_color
+ logical :: vertical, ifn
+ integer, parameter :: n_axes = 1
+ character(len=20) :: axis_opts(1)
+ integer, parameter :: n_labels = 1
+ integer :: label_opts(1)
+ character(len=200) :: labels(1)
+ character(len=200) :: title
+ real(kind=plflt) :: colorbar_width, colorbar_height
+ integer :: n_values_array(1);
+ real(kind=plflt), allocatable, dimension(:,:) :: values_array
+
+ ticks(1) = 0.0_plflt
+ sub_ticks(1) = 0
+ label_opts(1) = 0
+
+ n_values_array(1) = n_values
+ allocate(values_array(1,n_values))
+ values_array(1,:) = values(:)
+
+ low_cap_color = 0.0_plflt;
+ high_cap_color = 1.0_plflt;
+
+ ! Start a new page
+ call pladv( 0 )
+
+ ! Draw one colorbar relative to each side of the page
+ do position_i = 0,COLORBAR_POSITIONS-1
+ position = colorbar_position_options(position_i+1);
+ opt = ior( &
+ colorbar_option_kinds(kind_i+1), &
+ ior(colorbar_label_options(label_i+1), &
+ colorbar_cap_options(cap_i+1) ) )
+
+ vertical = (iand(position, PL_POSITION_LEFT) > 0 .or. iand(position, PL_POSITION_RIGHT) > 0 )
+ ifn = (iand(position, PL_POSITION_LEFT) > 0 .or. iand(position, PL_POSITION_BOTTOM) > 0 )
+
+ ! Set the offset position on the page
+ if (vertical .eqv. .true.) then
+ x = 0.0_plflt
+ y = 0.0_plflt
+ x_length = 0.05_plflt
+ y_length = 0.5_plflt
+ else
+ x = 0.0_plflt
+ y = 0.0_plflt
+ x_length = 0.5_plflt
+ y_length = 0.05_plflt
+ endif
+
+ ! Set appropriate labelling options.
+ if (ifn .eqv. .true.) then
+ if ( cont_color .eq. 0 .or. cont_width .eq. 0._plflt ) then
+ axis_opts(1) = "uwtivn"
+ else
+ axis_opts(1) = "uwxvn"
+ endif
+ else
+ if ( cont_color .eq. 0 .or. cont_width .eq. 0._plflt ) then
+ axis_opts(1) = "uwtivm"
+ else
+ axis_opts(1) = "uwxvm"
+ endif
+ endif
+
+ write(labels(1), '(3A)') trim(colorbar_position_option_labels(position_i+1)), &
+ ', ', trim(colorbar_label_option_labels(label_i+1))
+
+ ! Smaller text
+ call plschr( 0.0_plflt, 0.75_plflt )
+ ! Small ticks on the vertical axis
+ call plsmaj( 0.0_plflt, 0.5_plflt )
+ call plsmin( 0.0_plflt, 0.5_plflt )
+
+ call plvpor( 0.20_plflt, 0.80_plflt, 0.20_plflt, 0.80_plflt )
+ call plwind( 0.0_plflt, 1.0_plflt, 0.0_plflt, 1.0_plflt )
+ ! Set interesting background colour.
+ call plscol0a( 15, 0, 0, 0, 0.20_plflt )
+ call plcolorbar( colorbar_width, colorbar_height, &
+ ior(opt, ior(PL_COLORBAR_BOUNDING_BOX, PL_COLORBAR_BACKGROUND)), position, &
+ x, y, x_length, y_length, &
+ 15, 1, 1, &
+ low_cap_color, high_cap_color, &
+ cont_color, cont_width, &
+ label_opts, labels, &
+ axis_opts, ticks, sub_ticks, &
+ n_values_array, values_array )
+
+ ! Reset text and tick sizes
+ call plschr( 0.0_plflt, 1.0_plflt )
+ call plsmaj( 0.0_plflt, 1.0_plflt )
+ call plsmin( 0.0_plflt, 1.0_plflt )
+ enddo
+
+
+ ! Draw a page title
+ write(title, '(3A)') trim(colorbar_option_kind_labels(kind_i+1)), ' - ', &
+ trim(colorbar_cap_option_labels(cap_i+1))
+ call plvpor( 0.0_plflt, 1.0_plflt, 0.0_plflt, 1.0_plflt )
+ call plwind( 0.0_plflt, 1.0_plflt, 0.0_plflt, 1.0_plflt )
+ call plptex( 0.5_plflt, 0.5_plflt, 0.0_plflt, 0.0_plflt, 0.5_plflt, title )
+
+ deallocate(values_array)
+
+ end subroutine plcolorbar_example_page
+
+ subroutine plcolorbar_example( palette, kind_i, cont_color, cont_width, n_values, values )
+ character(*) :: palette
+ integer :: kind_i, label_i, cap_i, cont_color, n_values
+ real(kind=plflt) :: cont_width
+ real(kind=plflt), dimension(:) :: values
+
+ ! Load the color palette
+ call plspal1( palette, 1 )
+
+ do label_i = 0,COLORBAR_LABELS-1
+ do cap_i = 0,COLORBAR_CAPS-1
+ call plcolorbar_example_page( kind_i, label_i, cap_i, &
+ cont_color, cont_width, &
+ n_values, values )
+ enddo
+ enddo
+ end subroutine plcolorbar_example
+
end program
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-12 19:27:28
|
Revision: 12379
http://sourceforge.net/p/plplot/code/12379
Author: airwin
Date: 2013-06-12 19:27:26 +0000 (Wed, 12 Jun 2013)
Log Message:
-----------
Move all ep.cmake files and references to those files to bp.cmake to
be consistent with the build_projects name of the project (rather than
the ExternalProject_Add CMake function used to implement the project).
Tested by: Alan W. Irwin <ai...@us...> using the
build_all target for the "Ninja" generator on Linux.
Modified Paths:
--------------
trunk/cmake/build_projects/CMakeLists.txt
Added Paths:
-----------
trunk/cmake/build_projects/libagg/bp.cmake
trunk/cmake/build_projects/libharu/bp.cmake
trunk/cmake/build_projects/libqhull/bp.cmake
trunk/cmake/build_projects/ndiff/bp.cmake
trunk/cmake/build_projects/plplot/bp.cmake
trunk/cmake/build_projects/shapelib/bp.cmake
Removed Paths:
-------------
trunk/cmake/build_projects/libagg/ep.cmake
trunk/cmake/build_projects/libharu/ep.cmake
trunk/cmake/build_projects/libqhull/ep.cmake
trunk/cmake/build_projects/ndiff/ep.cmake
trunk/cmake/build_projects/plplot/ep.cmake
trunk/cmake/build_projects/shapelib/ep.cmake
Modified: trunk/cmake/build_projects/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/CMakeLists.txt 2013-06-12 19:09:48 UTC (rev 12378)
+++ trunk/cmake/build_projects/CMakeLists.txt 2013-06-12 19:27:26 UTC (rev 12379)
@@ -126,7 +126,7 @@
if(MSYS_PLATFORM)
# On the MSYS platform, the env command (used to set relevant
- # environment variables for the commands below in the */ep.cmake
+ # environment variables for the commands below in the */bp.cmake
# scripts) requires all full paths be in the MSYS platform form.
determine_msys_path(BP_CMAKE_COMMAND "${BP_CMAKE_COMMAND}")
determine_msys_path(BP_BUILD_COMMAND "${BP_BUILD_COMMAND}")
@@ -170,13 +170,13 @@
# Configure a build of ndiff. The ndiff application is not a a PLplot
# dependency, but still this fuzzy diff is quite useful for PLplot
# developers.
-include(ndiff/ep.cmake)
+include(ndiff/bp.cmake)
# Configure wxwidgets, a soft (optional) PLplot dependency
-#include(wxwidgets/ep.cmake)
+#include(wxwidgets/bp.cmake)
# Configure a build of PLplot and its dependencies.
-include(plplot/ep.cmake)
+include(plplot/bp.cmake)
add_custom_target(build_all)
add_dependencies(build_all ${build_target_LIST})
Copied: trunk/cmake/build_projects/libagg/bp.cmake (from rev 12378, trunk/cmake/build_projects/libagg/ep.cmake)
===================================================================
--- trunk/cmake/build_projects/libagg/bp.cmake (rev 0)
+++ trunk/cmake/build_projects/libagg/bp.cmake 2013-06-12 19:27:26 UTC (rev 12379)
@@ -0,0 +1,66 @@
+# libagg/bp.cmake
+# This file should be included directly or indirectly from a top-level
+# CMakeLists.txt file to configure the build of libagg.
+
+# Copyright (C) 2013 Alan W. Irwin
+
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# The top-level CMakeLists.txt file that includes this file should
+# have run "include(ExternalProject)" and set EP_BASE variable (and
+# corresponding directory property) as well as various BP variables
+# used below that configure how the External_Project functions
+# operate.
+
+set(BP_PACKAGE libagg)
+
+# Data that is related to downloads.
+set(${BP_PACKAGE}_URL http://www.antigrain.com/agg-2.5.tar.gz)
+set(${BP_PACKAGE}_URL_MD5 0229a488bc47be10a2fee6cf0b2febd6)
+
+# Data that is related to the PATH that must be used.
+if(MSYS_PLATFORM)
+ #set(BP_PATH_NODLL "${BP_PATH}")
+ #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
+ determine_msys_path(BP_PATH "${BP_PATH}")
+endif(MSYS_PLATFORM)
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
+
+ExternalProject_Add(
+ build_${BP_PACKAGE}
+ URL ${${BP_PACKAGE}_URL}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE}
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
+ )
+
+# Add custom commands to the current no-command update step.
+add_custom_command(
+ OUTPUT
+ ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ COMMENT "Custom updating of ${BP_PACKAGE}"
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ APPEND
+ )
+
+list(APPEND build_target_LIST build_${BP_PACKAGE})
+# Restore BP_PATH to original state.
+set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Deleted: trunk/cmake/build_projects/libagg/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libagg/ep.cmake 2013-06-12 19:09:48 UTC (rev 12378)
+++ trunk/cmake/build_projects/libagg/ep.cmake 2013-06-12 19:27:26 UTC (rev 12379)
@@ -1,66 +0,0 @@
-# libagg/ep.cmake
-# This file should be included directly or indirectly from a top-level
-# CMakeLists.txt file to configure the build of libagg.
-
-# Copyright (C) 2013 Alan W. Irwin
-
-# This file is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
-# This file is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with this file; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-# The top-level CMakeLists.txt file that includes this file should
-# have run "include(ExternalProject)" and set EP_BASE variable (and
-# corresponding directory property) as well as various BP variables
-# used below that configure how the External_Project functions
-# operate.
-
-set(BP_PACKAGE libagg)
-
-# Data that is related to downloads.
-set(${BP_PACKAGE}_URL http://www.antigrain.com/agg-2.5.tar.gz)
-set(${BP_PACKAGE}_URL_MD5 0229a488bc47be10a2fee6cf0b2febd6)
-
-# Data that is related to the PATH that must be used.
-if(MSYS_PLATFORM)
- #set(BP_PATH_NODLL "${BP_PATH}")
- #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
- determine_msys_path(BP_PATH "${BP_PATH}")
-endif(MSYS_PLATFORM)
-#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
-
-ExternalProject_Add(
- build_${BP_PACKAGE}
- URL ${${BP_PACKAGE}_URL}
- URL_MD5 ${${BP_PACKAGE}_URL_MD5}
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE}
- BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
- INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
- )
-
-# Add custom commands to the current no-command update step.
-add_custom_command(
- OUTPUT
- ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- COMMENT "Custom updating of ${BP_PACKAGE}"
- DEPENDS
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
- APPEND
- )
-
-list(APPEND build_target_LIST build_${BP_PACKAGE})
-# Restore BP_PATH to original state.
-set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Copied: trunk/cmake/build_projects/libharu/bp.cmake (from rev 12378, trunk/cmake/build_projects/libharu/ep.cmake)
===================================================================
--- trunk/cmake/build_projects/libharu/bp.cmake (rev 0)
+++ trunk/cmake/build_projects/libharu/bp.cmake 2013-06-12 19:27:26 UTC (rev 12379)
@@ -0,0 +1,108 @@
+# libharu/bp.cmake
+# This file should be included directly or indirectly from a top-level
+# CMakeLists.txt file to configure the build of libharu.
+
+# Copyright (C) 2013 Alan W. Irwin
+
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# The top-level CMakeLists.txt file that includes this file should
+# have run "include(ExternalProject)" and set EP_BASE variable (and
+# corresponding directory property) as well as various BP variables
+# used below that configure how the External_Project functions
+# operate.
+
+set(BP_PACKAGE libharu)
+
+# Data that is related to downloads.
+set(${BP_PACKAGE}_URL http://${BP_PACKAGE}.org/files/${BP_PACKAGE}-2.1.0.tar.gz)
+set(${BP_PACKAGE}_URL_MD5 0623b8fb08ae1b28af08b2cdbd66b662)
+
+# Data that is related to the PATH that must be used.
+if(MSYS_PLATFORM)
+ #set(BP_PATH_NODLL "${BP_PATH}")
+ #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
+ determine_msys_path(BP_PATH "${BP_PATH}")
+endif(MSYS_PLATFORM)
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
+
+ExternalProject_Add(
+ build_${BP_PACKAGE}
+ URL ${${BP_PACKAGE}_URL}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ # Note -DPOST_2.1.0=OFF is essential for the 2.1.0 version, but you
+ # should drop this option for anything after 2.1.0. Also note that
+ # -DLIBHARU_EXAMPLES=ON builds the demos, but does not test them.
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DPOST_2.1.0=OFF -DLIBHARU_EXAMPLES=ON ${EP_BASE}/Source/build_${BP_PACKAGE}
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
+ )
+
+# Add custom commands to the current no-command update step.
+add_custom_command(
+ OUTPUT
+ ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/demo/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/demo/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/hpdf_page_operator.c
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_page_operator.c
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/haru.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/haru.cmake
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/summary.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/summary.cmake
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_consts.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_consts.h
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_config.h.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_config.h.cmake
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf.h
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/CMakeLists.txt
+ COMMAND ${PATCH_EXECUTABLE} -d ${EP_BASE}/Source/build_${BP_PACKAGE} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include_hpdf_config.h.patch
+ COMMENT "Custom updating of ${BP_PACKAGE}"
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/demo/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/hpdf_page_operator.c
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/haru.cmake
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/summary.cmake
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_consts.h
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_config.h.cmake
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf.h
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include_hpdf_config.h.patch
+ APPEND
+ )
+
+list(APPEND build_target_LIST build_${BP_PACKAGE})
+# Restore BP_PATH to original state.
+set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Deleted: trunk/cmake/build_projects/libharu/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libharu/ep.cmake 2013-06-12 19:09:48 UTC (rev 12378)
+++ trunk/cmake/build_projects/libharu/ep.cmake 2013-06-12 19:27:26 UTC (rev 12379)
@@ -1,108 +0,0 @@
-# libharu/ep.cmake
-# This file should be included directly or indirectly from a top-level
-# CMakeLists.txt file to configure the build of libharu.
-
-# Copyright (C) 2013 Alan W. Irwin
-
-# This file is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
-# This file is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with this file; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-# The top-level CMakeLists.txt file that includes this file should
-# have run "include(ExternalProject)" and set EP_BASE variable (and
-# corresponding directory property) as well as various BP variables
-# used below that configure how the External_Project functions
-# operate.
-
-set(BP_PACKAGE libharu)
-
-# Data that is related to downloads.
-set(${BP_PACKAGE}_URL http://${BP_PACKAGE}.org/files/${BP_PACKAGE}-2.1.0.tar.gz)
-set(${BP_PACKAGE}_URL_MD5 0623b8fb08ae1b28af08b2cdbd66b662)
-
-# Data that is related to the PATH that must be used.
-if(MSYS_PLATFORM)
- #set(BP_PATH_NODLL "${BP_PATH}")
- #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
- determine_msys_path(BP_PATH "${BP_PATH}")
-endif(MSYS_PLATFORM)
-#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
-
-ExternalProject_Add(
- build_${BP_PACKAGE}
- URL ${${BP_PACKAGE}_URL}
- URL_MD5 ${${BP_PACKAGE}_URL_MD5}
- # Note -DPOST_2.1.0=OFF is essential for the 2.1.0 version, but you
- # should drop this option for anything after 2.1.0. Also note that
- # -DLIBHARU_EXAMPLES=ON builds the demos, but does not test them.
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DPOST_2.1.0=OFF -DLIBHARU_EXAMPLES=ON ${EP_BASE}/Source/build_${BP_PACKAGE}
- BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
- INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
- )
-
-# Add custom commands to the current no-command update step.
-add_custom_command(
- OUTPUT
- ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
- COMMAND ${CMAKE_COMMAND} -E make_directory ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/demo/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/demo/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/hpdf_page_operator.c
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_page_operator.c
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/haru.cmake
- ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/haru.cmake
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/summary.cmake
- ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/summary.cmake
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_consts.h
- ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_consts.h
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_config.h.cmake
- ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_config.h.cmake
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf.h
- ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf.h
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/include/CMakeLists.txt
- COMMAND ${PATCH_EXECUTABLE} -d ${EP_BASE}/Source/build_${BP_PACKAGE} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include_hpdf_config.h.patch
- COMMENT "Custom updating of ${BP_PACKAGE}"
- DEPENDS
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/demo/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/hpdf_page_operator.c
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/haru.cmake
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/summary.cmake
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_consts.h
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_config.h.cmake
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf.h
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include_hpdf_config.h.patch
- APPEND
- )
-
-list(APPEND build_target_LIST build_${BP_PACKAGE})
-# Restore BP_PATH to original state.
-set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Copied: trunk/cmake/build_projects/libqhull/bp.cmake (from rev 12378, trunk/cmake/build_projects/libqhull/ep.cmake)
===================================================================
--- trunk/cmake/build_projects/libqhull/bp.cmake (rev 0)
+++ trunk/cmake/build_projects/libqhull/bp.cmake 2013-06-12 19:27:26 UTC (rev 12379)
@@ -0,0 +1,82 @@
+# libqhull/bp.cmake
+# This file should be included directly or indirectly from a top-level
+# CMakeLists.txt file to configure the build of libqhull.
+
+# Copyright (C) 2013 Alan W. Irwin
+
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# The top-level CMakeLists.txt file that includes this file should
+# have run "include(ExternalProject)" and set EP_BASE variable (and
+# corresponding directory property) as well as various BP variables
+# used below that configure how the External_Project functions
+# operate.
+
+set(BP_PACKAGE libqhull)
+
+# Data that is related to downloads.
+set(${BP_PACKAGE}_URL http://www.qhull.org/download/qhull-2010.1-src.tgz)
+set(${BP_PACKAGE}_URL_MD5 e64138470acdeb18f752a0bc2a11ceb4)
+
+# Data that is related to the PATH that must be used.
+if(MSYS_PLATFORM)
+ #set(BP_PATH_NODLL "${BP_PATH}")
+ #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
+ determine_msys_path(BP_PATH "${BP_PATH}")
+endif(MSYS_PLATFORM)
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
+
+ExternalProject_Add(
+ build_${BP_PACKAGE}
+ URL ${${BP_PACKAGE}_URL}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE}
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
+ )
+
+# Add custom commands to the current no-command update step.
+add_custom_command(
+ OUTPUT
+ ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/${BP_PACKAGE}.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/${BP_PACKAGE}.h
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/mem.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/mem.h
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/unix.c
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/unix.c
+ COMMENT "Custom updating of ${BP_PACKAGE}"
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/${BP_PACKAGE}.h
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/mem.h
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/unix.c
+ APPEND
+ )
+
+list(APPEND build_target_LIST build_${BP_PACKAGE})
+# Restore BP_PATH to original state.
+set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Deleted: trunk/cmake/build_projects/libqhull/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libqhull/ep.cmake 2013-06-12 19:09:48 UTC (rev 12378)
+++ trunk/cmake/build_projects/libqhull/ep.cmake 2013-06-12 19:27:26 UTC (rev 12379)
@@ -1,82 +0,0 @@
-# libqhull/ep.cmake
-# This file should be included directly or indirectly from a top-level
-# CMakeLists.txt file to configure the build of libqhull.
-
-# Copyright (C) 2013 Alan W. Irwin
-
-# This file is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
-# This file is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with this file; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-# The top-level CMakeLists.txt file that includes this file should
-# have run "include(ExternalProject)" and set EP_BASE variable (and
-# corresponding directory property) as well as various BP variables
-# used below that configure how the External_Project functions
-# operate.
-
-set(BP_PACKAGE libqhull)
-
-# Data that is related to downloads.
-set(${BP_PACKAGE}_URL http://www.qhull.org/download/qhull-2010.1-src.tgz)
-set(${BP_PACKAGE}_URL_MD5 e64138470acdeb18f752a0bc2a11ceb4)
-
-# Data that is related to the PATH that must be used.
-if(MSYS_PLATFORM)
- #set(BP_PATH_NODLL "${BP_PATH}")
- #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
- determine_msys_path(BP_PATH "${BP_PATH}")
-endif(MSYS_PLATFORM)
-#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
-
-ExternalProject_Add(
- build_${BP_PACKAGE}
- URL ${${BP_PACKAGE}_URL}
- URL_MD5 ${${BP_PACKAGE}_URL_MD5}
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE}
- BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
- INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
- )
-
-# Add custom commands to the current no-command update step.
-add_custom_command(
- OUTPUT
- ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/${BP_PACKAGE}.h
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/${BP_PACKAGE}.h
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/mem.h
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/mem.h
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/unix.c
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/unix.c
- COMMENT "Custom updating of ${BP_PACKAGE}"
- DEPENDS
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/${BP_PACKAGE}.h
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/mem.h
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/unix.c
- APPEND
- )
-
-list(APPEND build_target_LIST build_${BP_PACKAGE})
-# Restore BP_PATH to original state.
-set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Copied: trunk/cmake/build_projects/ndiff/bp.cmake (from rev 12378, trunk/cmake/build_projects/ndiff/ep.cmake)
===================================================================
--- trunk/cmake/build_projects/ndiff/bp.cmake (rev 0)
+++ trunk/cmake/build_projects/ndiff/bp.cmake 2013-06-12 19:27:26 UTC (rev 12379)
@@ -0,0 +1,76 @@
+# ndiff/bp.cmake
+# This file should be included directly or indirectly from a top-level
+# CMakeLists.txt file to configure the build of ndiff.
+
+# Copyright (C) 2013 Alan W. Irwin
+
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# The top-level CMakeLists.txt file that includes this file should
+# have run "include(ExternalProject)" and set EP_BASE variable (and
+# corresponding directory property) as well as various BP variables
+# used below that configure how the External_Project functions
+# operate.
+
+set(BP_PACKAGE ndiff)
+
+# Data that is related to downloads.
+set(${BP_PACKAGE}_URL ftp://ftp.math.utah.edu/pub/misc/${BP_PACKAGE}-2.00.tar.gz)
+
+# The MD5 value below is correct for the gpg --verified version
+# Use URL_MD5 because ExternalProject_Add doesn't deal with gpg --version.
+# In any case, gpg is not available for the MSYS_PLATFORM case.
+set(${BP_PACKAGE}_URL_MD5 885548b4dc26e72c5455bebb5ba6c16d)
+
+# Data that is related to the PATH that must be used.
+if(MSYS_PLATFORM)
+ #set(BP_PATH_NODLL "${BP_PATH}")
+ #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
+ determine_msys_path(BP_PATH "${BP_PATH}")
+endif(MSYS_PLATFORM)
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
+
+ExternalProject_Add(
+ build_${BP_PACKAGE}
+ URL ${${BP_PACKAGE}_URL}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE}
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
+ TEST_BEFORE_INSTALL ON
+ TEST_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_CTEST_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
+ )
+
+# Add custom commands to the current no-command update step.
+add_custom_command(
+ OUTPUT
+ ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/config.h.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/config.h.cmake
+ COMMENT "Custom updating of ${BP_PACKAGE}"
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/config.h.cmake
+ APPEND
+ )
+
+list(APPEND build_target_LIST build_${BP_PACKAGE})
+# Restore BP_PATH to original state.
+set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Deleted: trunk/cmake/build_projects/ndiff/ep.cmake
===================================================================
--- trunk/cmake/build_projects/ndiff/ep.cmake 2013-06-12 19:09:48 UTC (rev 12378)
+++ trunk/cmake/build_projects/ndiff/ep.cmake 2013-06-12 19:27:26 UTC (rev 12379)
@@ -1,76 +0,0 @@
-# ndiff/ep.cmake
-# This file should be included directly or indirectly from a top-level
-# CMakeLists.txt file to configure the build of ndiff.
-
-# Copyright (C) 2013 Alan W. Irwin
-
-# This file is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
-# This file is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with this file; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-# The top-level CMakeLists.txt file that includes this file should
-# have run "include(ExternalProject)" and set EP_BASE variable (and
-# corresponding directory property) as well as various BP variables
-# used below that configure how the External_Project functions
-# operate.
-
-set(BP_PACKAGE ndiff)
-
-# Data that is related to downloads.
-set(${BP_PACKAGE}_URL ftp://ftp.math.utah.edu/pub/misc/${BP_PACKAGE}-2.00.tar.gz)
-
-# The MD5 value below is correct for the gpg --verified version
-# Use URL_MD5 because ExternalProject_Add doesn't deal with gpg --version.
-# In any case, gpg is not available for the MSYS_PLATFORM case.
-set(${BP_PACKAGE}_URL_MD5 885548b4dc26e72c5455bebb5ba6c16d)
-
-# Data that is related to the PATH that must be used.
-if(MSYS_PLATFORM)
- #set(BP_PATH_NODLL "${BP_PATH}")
- #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
- determine_msys_path(BP_PATH "${BP_PATH}")
-endif(MSYS_PLATFORM)
-#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
-
-ExternalProject_Add(
- build_${BP_PACKAGE}
- URL ${${BP_PACKAGE}_URL}
- URL_MD5 ${${BP_PACKAGE}_URL_MD5}
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE}
- BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
- TEST_BEFORE_INSTALL ON
- TEST_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_CTEST_COMMAND}
- INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
- )
-
-# Add custom commands to the current no-command update step.
-add_custom_command(
- OUTPUT
- ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/config.h.cmake
- ${EP_BASE}/Source/build_${BP_PACKAGE}/config.h.cmake
- COMMENT "Custom updating of ${BP_PACKAGE}"
- DEPENDS
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/config.h.cmake
- APPEND
- )
-
-list(APPEND build_target_LIST build_${BP_PACKAGE})
-# Restore BP_PATH to original state.
-set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Copied: trunk/cmake/build_projects/plplot/bp.cmake (from rev 12378, trunk/cmake/build_projects/plplot/ep.cmake)
===================================================================
--- trunk/cmake/build_projects/plplot/bp.cmake (rev 0)
+++ trunk/cmake/build_projects/plplot/bp.cmake 2013-06-12 19:27:26 UTC (rev 12379)
@@ -0,0 +1,45 @@
+# plplot/bp.cmake
+# This file should be included directly or indirectly from a top-level
+# CMakeLists.txt file to configure the build and test of PLplot.
+
+# Copyright (C) 2013 Alan W. Irwin
+
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# The top-level CMakeLists.txt file that includes this file should
+# have run "include(ExternalProject)" and set EP_BASE variable (and
+# corresponding directory property) as well as various BP variables
+# used below that configure how the External_Project functions
+# operate.
+# Configure build of PLplot dependencies.
+
+include(shapelib/bp.cmake)
+include(libqhull/bp.cmake)
+include(libharu/bp.cmake)
+include(libagg/bp.cmake)
+
+# Build PLplot itself.
+# (Not implemented yet, but create empty custom target with correct
+# target dependencies as if that target were actually a PLplot build).
+add_custom_target(build_plplot)
+add_dependencies(build_plplot
+ build_shapelib
+ build_libqhull
+ build_libharu
+ build_libagg
+ )
+
+
+
Deleted: trunk/cmake/build_projects/plplot/ep.cmake
===================================================================
--- trunk/cmake/build_projects/plplot/ep.cmake 2013-06-12 19:09:48 UTC (rev 12378)
+++ trunk/cmake/build_projects/plplot/ep.cmake 2013-06-12 19:27:26 UTC (rev 12379)
@@ -1,45 +0,0 @@
-# plplot/ep.cmake
-# This file should be included directly or indirectly from a top-level
-# CMakeLists.txt file to configure the build and test of PLplot.
-
-# Copyright (C) 2013 Alan W. Irwin
-
-# This file is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
-# This file is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with this file; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-# The top-level CMakeLists.txt file that includes this file should
-# have run "include(ExternalProject)" and set EP_BASE variable (and
-# corresponding directory property) as well as various BP variables
-# used below that configure how the External_Project functions
-# operate.
-# Configure build of PLplot dependencies.
-
-include(shapelib/ep.cmake)
-include(libqhull/ep.cmake)
-include(libharu/ep.cmake)
-include(libagg/ep.cmake)
-
-# Build PLplot itself.
-# (Not implemented yet, but create empty custom target with correct
-# target dependencies as if that target were actually a PLplot build).
-add_custom_target(build_plplot)
-add_dependencies(build_plplot
- build_shapelib
- build_libqhull
- build_libharu
- build_libagg
- )
-
-
-
Copied: trunk/cmake/build_projects/shapelib/bp.cmake (from rev 12378, trunk/cmake/build_projects/shapelib/ep.cmake)
===================================================================
--- trunk/cmake/build_projects/shapelib/bp.cmake (rev 0)
+++ trunk/cmake/build_projects/shapelib/bp.cmake 2013-06-12 19:27:26 UTC (rev 12379)
@@ -0,0 +1,77 @@
+# shapelib/bp.cmake
+# This file should be included directly or indirectly from a top-level
+# CMakeLists.txt file to configure the build of shapelib.
+
+# Copyright (C) 2013 Alan W. Irwin
+
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# The top-level CMakeLists.txt file that includes this file should
+# have run "include(ExternalProject)" and set EP_BASE variable (and
+# corresponding directory property) as well as various BP variables
+# used below that configure how the External_Project functions
+# operate.
+
+set(BP_PACKAGE shapelib)
+
+# Data that is related to downloads.
+set(${BP_PACKAGE}_URL http://download.osgeo.org/${BP_PACKAGE}/${BP_PACKAGE}-1.3.0.tar.gz)
+set(${BP_PACKAGE}_URL_MD5 2ff7d0b21d4b7506b452524492795f77)
+
+set(shape_eg_data_URL http://dl.maptools.org/dl/${BP_PACKAGE}/shape_eg_data.zip)
+set(shape_eg_data_URL_MD5 36208abd5d34c5c80101d8b214109f0d)
+
+# Data that is related to the PATH that must be used.
+if(MSYS_PLATFORM)
+ set(BP_PATH_NODLL "${BP_PATH}")
+ set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
+ determine_msys_path(BP_PATH "${BP_PATH}")
+endif(MSYS_PLATFORM)
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
+
+ExternalProject_Add(
+ build_${BP_PACKAGE}
+ URL ${${BP_PACKAGE}_URL}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DEG_DATA:PATH=${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data ${EP_BASE}/Source/build_${BP_PACKAGE}
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
+ TEST_BEFORE_INSTALL ON
+ TEST_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_CTEST_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
+ )
+
+# Add custom commands to the current no-command update step.
+add_custom_command(
+ OUTPUT
+ ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -DURL:STRING=${shape_eg_data_URL} -DFILE:FILEPATH=${EP_BASE}/Download/build_${BP_PACKAGE}/shape_eg_data.zip -DMD5:STRING=${shape_eg_data_URL_MD5} -P ${CMAKE_SOURCE_DIR}/download_check.cmake
+ COMMAND ${CMAKE_COMMAND} -E remove_directory ${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data
+ COMMAND ${UNZIP_EXECUTABLE} -q ${EP_BASE}/Download/build_${BP_PACKAGE}/shape_eg_data.zip -d ${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data
+ COMMENT "Custom updating of ${BP_PACKAGE}"
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/download_check.cmake
+ # N.B. no file dependencies are worthwhile for the eg_data
+ # chain above since it all starts with a download.
+ APPEND
+ )
+
+list(APPEND build_target_LIST build_${BP_PACKAGE})
+# Restore BP_PATH to original state.
+set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Deleted: trunk/cmake/build_projects/shapelib/ep.cmake
===================================================================
--- trunk/cmake/build_projects/shapelib/ep.cmake 2013-06-12 19:09:48 UTC (rev 12378)
+++ trunk/cmake/build_projects/shapelib/ep.cmake 2013-06-12 19:27:26 UTC (rev 12379)
@@ -1,77 +0,0 @@
-# shapelib/ep.cmake
-# This file should be included directly or indirectly from a top-level
-# CMakeLists.txt file to configure the build of shapelib.
-
-# Copyright (C) 2013 Alan W. Irwin
-
-# This file is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
-# This file is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with this file; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-# The top-level CMakeLists.txt file that includes this file should
-# have run "include(ExternalProject)" and set EP_BASE variable (and
-# corresponding directory property) as well as various BP variables
-# used below that configure how the External_Project functions
-# operate.
-
-set(BP_PACKAGE shapelib)
-
-# Data that is related to downloads.
-set(${BP_PACKAGE}_URL http://download.osgeo.org/${BP_PACKAGE}/${BP_PACKAGE}-1.3.0.tar.gz)
-set(${BP_PACKAGE}_URL_MD5 2ff7d0b21d4b7506b452524492795f77)
-
-set(shape_eg_data_URL http://dl.maptools.org/dl/${BP_PACKAGE}/shape_eg_data.zip)
-set(shape_eg_data_URL_MD5 36208abd5d34c5c80101d8b214109f0d)
-
-# Data that is related to the PATH that must be used.
-if(MSYS_PLATFORM)
- set(BP_PATH_NODLL "${BP_PATH}")
- set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
- determine_msys_path(BP_PATH "${BP_PATH}")
-endif(MSYS_PLATFORM)
-#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
-
-ExternalProject_Add(
- build_${BP_PACKAGE}
- URL ${${BP_PACKAGE}_URL}
- URL_MD5 ${${BP_PACKAGE}_URL_MD5}
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DEG_DATA:PATH=${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data ${EP_BASE}/Source/build_${BP_PACKAGE}
- BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
- TEST_BEFORE_INSTALL ON
- TEST_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_CTEST_COMMAND}
- INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
- )
-
-# Add custom commands to the current no-command update step.
-add_custom_command(
- OUTPUT
- ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -DURL:STRING=${shape_eg_data_URL} -DFILE:FILEPATH=${EP_BASE}/Download/build_${BP_PACKAGE}/shape_eg_data.zip -DMD5:STRING=${shape_eg_data_URL_MD5} -P ${CMAKE_SOURCE_DIR}/download_check.cmake
- COMMAND ${CMAKE_COMMAND} -E remove_directory ${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data
- COMMAND ${UNZIP_EXECUTABLE} -q ${EP_BASE}/Download/build_${BP_PACKAGE}/shape_eg_data.zip -d ${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data
- COMMENT "Custom updating of ${BP_PACKAGE}"
- DEPENDS
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/download_check.cmake
- # N.B. no file dependencies are worthwhile for the eg_data
- # chain above since it all starts with a download.
- APPEND
- )
-
-list(APPEND build_target_LIST build_${BP_PACKAGE})
-# Restore BP_PATH to original state.
-set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-12 19:09:51
|
Revision: 12378
http://sourceforge.net/p/plplot/code/12378
Author: airwin
Date: 2013-06-12 19:09:48 +0000 (Wed, 12 Jun 2013)
Log Message:
-----------
Use the APPEND signature of add_custom_command for custom steps in
updating the software for each of the build configurations. This
change greatly simplifies the CMake logic and satisfies the stringent
dependency checks done by the CMake "Ninja" generator.
Use the env command for all configuration, build, test, and install
steps.
Reorganize the CMake logic for the overall project including a build_all
target to build all configured projects.
Tested by: Alan W. Irwin <ai...@us...> using the
build_all target for "Unix Makefiles" and "Ninja" generators on Linux and
the "MSYS Makefiles", "MinGW Makefiles", and "Ninja" generators on the
Wine version of Windows.
Modified Paths:
--------------
trunk/cmake/build_projects/CMakeLists.txt
trunk/cmake/build_projects/libagg/ep.cmake
trunk/cmake/build_projects/libharu/ep.cmake
trunk/cmake/build_projects/libqhull/ep.cmake
trunk/cmake/build_projects/ndiff/ep.cmake
trunk/cmake/build_projects/plplot/ep.cmake
trunk/cmake/build_projects/shapelib/ep.cmake
Modified: trunk/cmake/build_projects/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/CMakeLists.txt 2013-06-12 18:51:28 UTC (rev 12377)
+++ trunk/cmake/build_projects/CMakeLists.txt 2013-06-12 19:09:48 UTC (rev 12378)
@@ -22,6 +22,7 @@
message(STATUS "CMake version = ${CMAKE_VERSION}")
message(STATUS "CMAKE_SYSTEM = ${CMAKE_SYSTEM}")
+message(STATUS "CMAKE_GENERATOR = ${CMAKE_GENERATOR}")
message(STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}")
cmake_minimum_required(VERSION 2.8.10.2 FATAL_ERROR)
@@ -99,24 +100,6 @@
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
include(ExternalProject)
-# Propagate the overall CMake generator and install prefix to all CMake-based
-# software project builds.
-set(BP_CMAKE_COMMAND cmake "-G${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX})
-
-# The non-parallel versions are for build systems that
-# apparently have race conditions for parallel builds.
-if(CMAKE_GENERATOR STREQUAL "MinGW Makefiles")
- set(BP_BUILD_COMMAND mingw32-make)
-else(CMAKE_GENERATOR STREQUAL "MinGW Makefiles")
- set(BP_BUILD_COMMAND make)
-endif(CMAKE_GENERATOR STREQUAL "MinGW Makefiles")
-set(BP_PARALLEL_BUILD_COMMAND ${BP_BUILD_COMMAND} -j4)
-set(BP_CTEST_COMMAND ctest)
-set(BP_PARALLEL_CTEST_COMMAND ctest -j4)
-
-set(BP_ORIGINAL_NATIVE_PATH "$ENV{PATH}")
-set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-
if(MSYS_PLATFORM)
# Useful function to convert Windows list of semicolon-delimited
# PATHs to the equivalent list of MSYS PATHs (exactly like the
@@ -135,13 +118,65 @@
endfunction(determine_msys_path)
endif(MSYS_PLATFORM)
+# This works for at least Linux make, ninja, MinGW mingw32_make, MSYS make,
+# and jom.
+set(BP_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}")
+
+set(BP_CTEST_COMMAND "${CMAKE_CTEST_COMMAND}")
+
+if(MSYS_PLATFORM)
+ # On the MSYS platform, the env command (used to set relevant
+ # environment variables for the commands below in the */ep.cmake
+ # scripts) requires all full paths be in the MSYS platform form.
+ determine_msys_path(BP_CMAKE_COMMAND "${BP_CMAKE_COMMAND}")
+ determine_msys_path(BP_BUILD_COMMAND "${BP_BUILD_COMMAND}")
+ determine_msys_path(BP_CTEST_COMMAND "${BP_CTEST_COMMAND}")
+ determine_msys_path(MSYS_CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+ determine_msys_path(MSYS_CMAKE_COMMAND "${CMAKE_COMMAND}")
+ # Propagate the overall CMake generator and install prefix to all CMake-based
+ # software project builds.
+ set(BP_CMAKE_COMMAND ${MSYS_CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX:PATH=${MSYS_CMAKE_INSTALL_PREFIX})
+else(MSYS_PLATFORM)
+ # Propagate the overall CMake generator and install prefix to all CMake-based
+ # software project builds.
+ set(BP_CMAKE_COMMAND ${CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX})
+endif(MSYS_PLATFORM)
+
+
+# The parallel versions are for software packages that
+# do not have race conditions for parallel builds or tests.
+set(BP_PARALLEL_BUILD_COMMAND "${BP_BUILD_COMMAND}" -j4)
+set(BP_PARALLEL_CTEST_COMMAND "${BP_CTEST_COMMAND}" -j4)
+
+message(STATUS "BP_CMAKE_COMMAND = ${BP_CMAKE_COMMAND}")
+message(STATUS "BP_BUILD_COMMAND = ${BP_BUILD_COMMAND}")
+message(STATUS "BP_PARALLEL_BUILD_COMMAND = ${BP_PARALLEL_BUILD_COMMAND}")
+message(STATUS "BP_CTEST_COMMAND = ${BP_CTEST_COMMAND}")
+message(STATUS "BP_PARALLEL_CTEST_COMMAND = ${BP_PARALLEL_CTEST_COMMAND}")
+
+
+set(BP_ORIGINAL_NATIVE_PATH "$ENV{PATH}")
+set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
+
# Now include the build configurations for certain targets and their
# dependencies.
+# Each (directly or indirectly) included build configuration
+# that is judged to be working should append its target to build_target_LIST
+# so that in the logic below we can creat a "build_all" target that depends
+# on those individual build targets
+set(build_target_LIST)
+
# Configure a build of ndiff. The ndiff application is not a a PLplot
# dependency, but still this fuzzy diff is quite useful for PLplot
# developers.
include(ndiff/ep.cmake)
+# Configure wxwidgets, a soft (optional) PLplot dependency
+#include(wxwidgets/ep.cmake)
+
# Configure a build of PLplot and its dependencies.
-include(plplot/ep.cmake)
\ No newline at end of file
+include(plplot/ep.cmake)
+
+add_custom_target(build_all)
+add_dependencies(build_all ${build_target_LIST})
Modified: trunk/cmake/build_projects/libagg/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libagg/ep.cmake 2013-06-12 18:51:28 UTC (rev 12377)
+++ trunk/cmake/build_projects/libagg/ep.cmake 2013-06-12 19:09:48 UTC (rev 12378)
@@ -41,34 +41,26 @@
ExternalProject_Add(
build_${BP_PACKAGE}
URL ${${BP_PACKAGE}_URL}
- URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE}
- BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
- INSTALL_COMMAND ${BP_PARALLEL_BUILD_COMMAND} install
- STEP_TARGETS download update_build_system configure build install
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
)
-# Use custom command approach to generate real file dependencies
-# rather than time stamps alone.
+# Add custom commands to the current no-command update step.
add_custom_command(
OUTPUT
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- COMMENT "Updating of ${BP_PACKAGE} build system"
+ COMMENT "Custom updating of ${BP_PACKAGE}"
DEPENDS
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ APPEND
)
-ExternalProject_Add_Step(build_${BP_PACKAGE} update_build_system
- COMMENT "Updated ${BP_PACKAGE} build system"
- DEPENDEES download
- DEPENDERS configure
- DEPENDS
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- ALWAYS OFF
- )
+list(APPEND build_target_LIST build_${BP_PACKAGE})
# Restore BP_PATH to original state.
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Modified: trunk/cmake/build_projects/libharu/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libharu/ep.cmake 2013-06-12 18:51:28 UTC (rev 12377)
+++ trunk/cmake/build_projects/libharu/ep.cmake 2013-06-12 19:09:48 UTC (rev 12378)
@@ -44,62 +44,49 @@
URL_MD5 ${${BP_PACKAGE}_URL_MD5}
# Note -DPOST_2.1.0=OFF is essential for the 2.1.0 version, but you
# should drop this option for anything after 2.1.0. Also note that
- # -D${BP_PACKAGE}_EXAMPLES=ON builds the demos, but does not test them.
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DPOST_2.1.0=OFF -D${BP_PACKAGE}_EXAMPLES=ON ${EP_BASE}/Source/build_${BP_PACKAGE}
- BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
- INSTALL_COMMAND ${BP_PARALLEL_BUILD_COMMAND} install
- STEP_TARGETS download update_build_system configure build install test
+ # -DLIBHARU_EXAMPLES=ON builds the demos, but does not test them.
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DPOST_2.1.0=OFF -DLIBHARU_EXAMPLES=ON ${EP_BASE}/Source/build_${BP_PACKAGE}
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
)
-# Use custom command approach to generate real file dependencies
-# rather than time stamps alone.
+# Add custom commands to the current no-command update step.
add_custom_command(
OUTPUT
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/demo/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_page_operator.c
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/haru.cmake
- ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/summary.cmake
- ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_consts.h
- ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_config.h.cmake
- ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf.h
- ${EP_BASE}/Source/build_${BP_PACKAGE}/include/CMakeLists.txt
- # File that is patched.
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_streams.c
+ ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
COMMAND ${CMAKE_COMMAND} -E make_directory ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules
- COMMAND ${CMAKE_COMMAND} -E copy
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -E copy
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/demo/CMakeLists.txt
${EP_BASE}/Source/build_${BP_PACKAGE}/demo/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -E copy
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/hpdf_page_operator.c
${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_page_operator.c
- COMMAND ${CMAKE_COMMAND} -E copy
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -E copy
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/haru.cmake
${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/haru.cmake
- COMMAND ${CMAKE_COMMAND} -E copy
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/summary.cmake
${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/summary.cmake
- COMMAND ${CMAKE_COMMAND} -E copy
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_consts.h
${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_consts.h
- COMMAND ${CMAKE_COMMAND} -E copy
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_config.h.cmake
${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_config.h.cmake
- COMMAND ${CMAKE_COMMAND} -E copy
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf.h
${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf.h
- COMMAND ${CMAKE_COMMAND} -E copy
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/CMakeLists.txt
${EP_BASE}/Source/build_${BP_PACKAGE}/include/CMakeLists.txt
COMMAND ${PATCH_EXECUTABLE} -d ${EP_BASE}/Source/build_${BP_PACKAGE} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include_hpdf_config.h.patch
- COMMENT "Updating of ${BP_PACKAGE} build system"
+ COMMENT "Custom updating of ${BP_PACKAGE}"
DEPENDS
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/demo/CMakeLists.txt
@@ -112,26 +99,10 @@
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf.h
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/CMakeLists.txt
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include_hpdf_config.h.patch
+ APPEND
)
-ExternalProject_Add_Step(build_${BP_PACKAGE} update_build_system
- COMMENT "Updated ${BP_PACKAGE} build system"
- DEPENDEES download
- DEPENDERS configure
- DEPENDS
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/demo/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_page_operator.c
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/haru.cmake
- ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/summary.cmake
- ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_consts.h
- ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_config.h.cmake
- ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf.h
- ${EP_BASE}/Source/build_${BP_PACKAGE}/include/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_streams.c
- ALWAYS OFF
- )
+list(APPEND build_target_LIST build_${BP_PACKAGE})
# Restore BP_PATH to original state.
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Modified: trunk/cmake/build_projects/libqhull/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libqhull/ep.cmake 2013-06-12 18:51:28 UTC (rev 12377)
+++ trunk/cmake/build_projects/libqhull/ep.cmake 2013-06-12 19:09:48 UTC (rev 12378)
@@ -41,27 +41,21 @@
ExternalProject_Add(
build_${BP_PACKAGE}
URL ${${BP_PACKAGE}_URL}
- URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE}
- BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
- INSTALL_COMMAND ${BP_PARALLEL_BUILD_COMMAND} install
- STEP_TARGETS download update_build_system configure build install test
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
)
-# Use custom command approach to generate real file dependencies
-# rather than time stamps alone.
+# Add custom commands to the current no-command update step.
add_custom_command(
OUTPUT
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/${BP_PACKAGE}.h
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/mem.h
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/unix.c
- COMMAND ${CMAKE_COMMAND} -E copy
+ ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/${BP_PACKAGE}.h
@@ -72,27 +66,17 @@
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/unix.c
${EP_BASE}/Source/build_${BP_PACKAGE}/src/unix.c
- COMMENT "Updating of ${BP_PACKAGE} build system"
+ COMMENT "Custom updating of ${BP_PACKAGE}"
DEPENDS
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/${BP_PACKAGE}.h
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/mem.h
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/unix.c
+ APPEND
)
-ExternalProject_Add_Step(build_${BP_PACKAGE} update_build_system
- COMMENT "Updated ${BP_PACKAGE} build system"
- DEPENDEES download
- DEPENDERS configure
- DEPENDS
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/${BP_PACKAGE}.h
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/mem.h
- ${EP_BASE}/Source/build_${BP_PACKAGE}/src/unix.c
- ALWAYS OFF
- )
+list(APPEND build_target_LIST build_${BP_PACKAGE})
# Restore BP_PATH to original state.
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Modified: trunk/cmake/build_projects/ndiff/ep.cmake
===================================================================
--- trunk/cmake/build_projects/ndiff/ep.cmake 2013-06-12 18:51:28 UTC (rev 12377)
+++ trunk/cmake/build_projects/ndiff/ep.cmake 2013-06-12 19:09:48 UTC (rev 12378)
@@ -45,42 +45,32 @@
ExternalProject_Add(
build_${BP_PACKAGE}
URL ${${BP_PACKAGE}_URL}
- URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE}
- BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
TEST_BEFORE_INSTALL ON
- TEST_COMMAND ${BP_PARALLEL_CTEST_COMMAND}
- INSTALL_COMMAND ${BP_PARALLEL_BUILD_COMMAND} install
- STEP_TARGETS download update_build_system configure build install test
+ TEST_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_CTEST_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
)
-# Use custom command approach to generate real file dependencies
-# rather than time stamps alone.
+# Add custom commands to the current no-command update step.
add_custom_command(
OUTPUT
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/config.h.cmake
- COMMAND ${CMAKE_COMMAND} -E copy
+ ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -E copy
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/config.h.cmake
${EP_BASE}/Source/build_${BP_PACKAGE}/config.h.cmake
- COMMENT "Updating of ${BP_PACKAGE} build system"
+ COMMENT "Custom updating of ${BP_PACKAGE}"
DEPENDS
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/config.h.cmake
+ APPEND
)
-ExternalProject_Add_Step(build_${BP_PACKAGE} update_build_system
- COMMENT "Updated ${BP_PACKAGE} build system"
- DEPENDEES download
- DEPENDERS configure
- DEPENDS
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/config.h.cmake
- ALWAYS OFF
- )
+list(APPEND build_target_LIST build_${BP_PACKAGE})
# Restore BP_PATH to original state.
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Modified: trunk/cmake/build_projects/plplot/ep.cmake
===================================================================
--- trunk/cmake/build_projects/plplot/ep.cmake 2013-06-12 18:51:28 UTC (rev 12377)
+++ trunk/cmake/build_projects/plplot/ep.cmake 2013-06-12 19:09:48 UTC (rev 12378)
@@ -34,7 +34,7 @@
# (Not implemented yet, but create empty custom target with correct
# target dependencies as if that target were actually a PLplot build).
add_custom_target(build_plplot)
-add_dependencies(build_plplot
+add_dependencies(build_plplot
build_shapelib
build_libqhull
build_libharu
Modified: trunk/cmake/build_projects/shapelib/ep.cmake
===================================================================
--- trunk/cmake/build_projects/shapelib/ep.cmake 2013-06-12 18:51:28 UTC (rev 12377)
+++ trunk/cmake/build_projects/shapelib/ep.cmake 2013-06-12 19:09:48 UTC (rev 12378)
@@ -50,47 +50,28 @@
TEST_BEFORE_INSTALL ON
TEST_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_CTEST_COMMAND}
INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
- STEP_TARGETS download update_build_system get_eg_data configure build install test
)
-# Use custom command approach to allow more than one COMMAND and/or
-# generate real file dependencies rather than time stamps alone.
+# Add custom commands to the current no-command update step.
add_custom_command(
OUTPUT
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
- ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- COMMENT "Updating of ${BP_PACKAGE} build system"
- DEPENDS
+ ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-update
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
- )
-ExternalProject_Add_Step(build_${BP_PACKAGE} update_build_system
- COMMENT "Updated ${BP_PACKAGE} build system"
- DEPENDEES download
- DEPENDERS configure
- DEPENDS
${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
- ALWAYS OFF
- )
-
-add_custom_command(
- OUTPUT
- ${EP_BASE}/Download/build_${BP_PACKAGE}/shape_eg_data.zip
COMMAND ${CMAKE_COMMAND} -DURL:STRING=${shape_eg_data_URL} -DFILE:FILEPATH=${EP_BASE}/Download/build_${BP_PACKAGE}/shape_eg_data.zip -DMD5:STRING=${shape_eg_data_URL_MD5} -P ${CMAKE_SOURCE_DIR}/download_check.cmake
COMMAND ${CMAKE_COMMAND} -E remove_directory ${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data
COMMAND ${UNZIP_EXECUTABLE} -q ${EP_BASE}/Download/build_${BP_PACKAGE}/shape_eg_data.zip -d ${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data
- COMMENT "getting eg_data for ${BP_PACKAGE} test"
- )
-ExternalProject_Add_Step(build_${BP_PACKAGE} get_eg_data
- COMMENT "got eg_data for ${BP_PACKAGE} test"
- DEPENDEES download
- DEPENDERS configure
+ COMMENT "Custom updating of ${BP_PACKAGE}"
DEPENDS
- ${EP_BASE}/Download/build_${BP_PACKAGE}/shape_eg_data.zip
- ALWAYS OFF
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/download_check.cmake
+ # N.B. no file dependencies are worthwhile for the eg_data
+ # chain above since it all starts with a download.
+ APPEND
)
+list(APPEND build_target_LIST build_${BP_PACKAGE})
# Restore BP_PATH to original state.
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-12 18:51:31
|
Revision: 12377
http://sourceforge.net/p/plplot/code/12377
Author: airwin
Date: 2013-06-12 18:51:28 +0000 (Wed, 12 Jun 2013)
Log Message:
-----------
Use cache variable to set BUILD_SHARED_LIBS rather than ordinary
variable.
Change from old logic (which forced static library build for
most Windows cases) to forced static library build only
for the combination of Windows and ninja generator. This
is only a temporary measure to work around a ninja generator bug
on Windows for the combination of shared libraries and using
the same name kernel ("qhull" in this case) for an executable
and shared library.
Reorganize some of the CMake logic.
Modified Paths:
--------------
trunk/cmake/build_projects/libqhull/src/CMakeLists.txt
Modified: trunk/cmake/build_projects/libqhull/src/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/libqhull/src/CMakeLists.txt 2013-06-07 21:34:02 UTC (rev 12376)
+++ trunk/cmake/build_projects/libqhull/src/CMakeLists.txt 2013-06-12 18:51:28 UTC (rev 12377)
@@ -1,29 +1,23 @@
# Configurable items here.
option(USE_RPATH "Use -rpath when linking libraries, executables" ON)
-# libraries are all shared by default
-option(BUILD_SHARED_LIBS "Build shared libraries" ON)
-
# Change before each release whenever there has been an API change of any
# kind.
set(qhull_SOVERSION 5)
set(qhull_VERSION ${qhull_SOVERSION}.0.0)
-# no shared library support for win32 compilers except cygwin, mingw
-if(WIN32 AND NOT CYGWIN AND NOT MINGW)
- if(BUILD_SHARED_LIBS)
- set(BUILD_SHARED_LIBS OFF)
- message( " >> There is no shared library support for your Windows compiler!\n >> Turning option off." )
- endif(BUILD_SHARED_LIBS)
-endif(WIN32 AND NOT CYGWIN AND NOT MINGW)
+# libraries are all shared by default
+option(BUILD_SHARED_LIBS "Build shared libraries" ON)
-# find math library
-if(NOT WIN32)
- find_library(MATH_LIB NAMES m PATHS /usr/local/lib /usr/lib)
- if(NOT MATH_LIB)
- message(FATAL_ERROR "Cannot find required math library")
- endif(NOT MATH_LIB)
-endif(NOT WIN32)
+# Use static build for now on Windows for the
+# "Ninga" generator case since that case appears to
+# be broken for the shared library build
+# _AND_ using the same name kernel ("qhull") for the library
+# and executable.
+if(WIN32 AND CMAKE_GENERATOR STREQUAL "Ninja")
+ message(STATUS "Force static library build for qhull as temporary workaround for Ninja bug.")
+ set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build shared libraries" FORCE)
+endif(WIN32 AND CMAKE_GENERATOR STREQUAL "Ninja")
# some extra flags for Borland C++ Compiler 5.5
if(BORLAND)
@@ -82,10 +76,17 @@
)
endif(BUILD_SHARED_LIBS)
-target_link_libraries(
- qhull
- ${MATH_LIB}
- )
+# find math library
+if(NOT WIN32)
+ find_library(MATH_LIB NAMES m PATHS /usr/local/lib /usr/lib)
+ if(NOT MATH_LIB)
+ message(FATAL_ERROR "Cannot find required math library")
+ endif(NOT MATH_LIB)
+ target_link_libraries(
+ qhull
+ ${MATH_LIB}
+ )
+endif(NOT WIN32)
# qh_QHpointer=1 is the value used by Debian packagers for qhull_2003.1
# but comment it out since it causes segfaults for PLplot for qhull_2010.1,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2013-06-07 21:34:07
|
Revision: 12376
http://sourceforge.net/p/plplot/code/12376
Author: andrewross
Date: 2013-06-07 21:34:02 +0000 (Fri, 07 Jun 2013)
Log Message:
-----------
Add missing plgcmap1_range function.
Modified Paths:
--------------
trunk/bindings/lua/plplotluac.i
Modified: trunk/bindings/lua/plplotluac.i
===================================================================
--- trunk/bindings/lua/plplotluac.i 2013-06-07 18:46:54 UTC (rev 12375)
+++ trunk/bindings/lua/plplotluac.i 2013-06-07 21:34:02 UTC (rev 12376)
@@ -1382,6 +1382,7 @@
%rename( font ) plfont;
%rename( fontld ) plfontld;
%rename( gchr ) plgchr;
+%rename( gcmap1_range ) plgcmap1_range;
%rename( gcol0 ) plgcol0;
%rename( gcolbg ) plgcolbg;
%rename( gcol0a ) plgcol0a;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-07 18:46:57
|
Revision: 12375
http://sourceforge.net/p/plplot/code/12375
Author: airwin
Date: 2013-06-07 18:46:54 +0000 (Fri, 07 Jun 2013)
Log Message:
-----------
Replace software package name by ${BP_PACKAGE} wherever possible to
make ep.cmake files more abstracted/generic.
Modified Paths:
--------------
trunk/cmake/build_projects/libagg/ep.cmake
trunk/cmake/build_projects/libharu/ep.cmake
trunk/cmake/build_projects/libqhull/ep.cmake
trunk/cmake/build_projects/ndiff/ep.cmake
trunk/cmake/build_projects/shapelib/ep.cmake
Modified: trunk/cmake/build_projects/libagg/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libagg/ep.cmake 2013-06-07 16:03:35 UTC (rev 12374)
+++ trunk/cmake/build_projects/libagg/ep.cmake 2013-06-07 18:46:54 UTC (rev 12375)
@@ -1,6 +1,6 @@
# libagg/ep.cmake
# This file should be included directly or indirectly from a top-level
-# CMakeLists.txt file to configure the build and test of libagg.
+# CMakeLists.txt file to configure the build of libagg.
# Copyright (C) 2013 Alan W. Irwin
@@ -24,23 +24,25 @@
# used below that configure how the External_Project functions
# operate.
+set(BP_PACKAGE libagg)
+
# Data that is related to downloads.
-set(libagg_URL http://www.antigrain.com/agg-2.5.tar.gz)
-set(libagg_URL_MD5 0229a488bc47be10a2fee6cf0b2febd6)
+set(${BP_PACKAGE}_URL http://www.antigrain.com/agg-2.5.tar.gz)
+set(${BP_PACKAGE}_URL_MD5 0229a488bc47be10a2fee6cf0b2febd6)
# Data that is related to the PATH that must be used.
if(MSYS_PLATFORM)
#set(BP_PATH_NODLL "${BP_PATH}")
- #set(BP_PATH "${EP_BASE}/Build/build_libagg/dll;${BP_PATH_NODLL}")
+ #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
determine_msys_path(BP_PATH "${BP_PATH}")
endif(MSYS_PLATFORM)
-#message(STATUS "modified BP_PATH for libagg = ${BP_PATH}")
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
ExternalProject_Add(
- build_libagg
- URL ${libagg_URL}
- URL_MD5 ${libagg_URL_MD5}
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_libagg
+ build_${BP_PACKAGE}
+ URL ${${BP_PACKAGE}_URL}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE}
BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
INSTALL_COMMAND ${BP_PARALLEL_BUILD_COMMAND} install
STEP_TARGETS download update_build_system configure build install
@@ -50,23 +52,23 @@
# rather than time stamps alone.
add_custom_command(
OUTPUT
- ${EP_BASE}/Source/build_libagg/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libagg/CMakeLists.txt
- ${EP_BASE}/Source/build_libagg/CMakeLists.txt
- COMMENT "Updating of libagg build system"
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ COMMENT "Updating of ${BP_PACKAGE} build system"
DEPENDS
- ${CMAKE_SOURCE_DIR}/libagg/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
)
-ExternalProject_Add_Step(build_libagg update_build_system
- COMMENT "Updated libagg build system"
+ExternalProject_Add_Step(build_${BP_PACKAGE} update_build_system
+ COMMENT "Updated ${BP_PACKAGE} build system"
DEPENDEES download
DEPENDERS configure
DEPENDS
- ${EP_BASE}/Source/build_libagg/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
ALWAYS OFF
)
# Restore BP_PATH to original state.
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-#message(STATUS "libagg restored original BP_PATH = ${BP_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Modified: trunk/cmake/build_projects/libharu/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libharu/ep.cmake 2013-06-07 16:03:35 UTC (rev 12374)
+++ trunk/cmake/build_projects/libharu/ep.cmake 2013-06-07 18:46:54 UTC (rev 12375)
@@ -1,6 +1,6 @@
# libharu/ep.cmake
# This file should be included directly or indirectly from a top-level
-# CMakeLists.txt file to configure the build and test of libharu.
+# CMakeLists.txt file to configure the build of libharu.
# Copyright (C) 2013 Alan W. Irwin
@@ -24,26 +24,28 @@
# used below that configure how the External_Project functions
# operate.
+set(BP_PACKAGE libharu)
+
# Data that is related to downloads.
-set(libharu_URL http://libharu.org/files/libharu-2.1.0.tar.gz)
-set(libharu_URL_MD5 0623b8fb08ae1b28af08b2cdbd66b662)
+set(${BP_PACKAGE}_URL http://${BP_PACKAGE}.org/files/${BP_PACKAGE}-2.1.0.tar.gz)
+set(${BP_PACKAGE}_URL_MD5 0623b8fb08ae1b28af08b2cdbd66b662)
# Data that is related to the PATH that must be used.
if(MSYS_PLATFORM)
#set(BP_PATH_NODLL "${BP_PATH}")
- #set(BP_PATH "${EP_BASE}/Build/build_libharu/dll;${BP_PATH_NODLL}")
+ #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
determine_msys_path(BP_PATH "${BP_PATH}")
endif(MSYS_PLATFORM)
-#message(STATUS "modified BP_PATH for libharu = ${BP_PATH}")
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
ExternalProject_Add(
- build_libharu
- URL ${libharu_URL}
- URL_MD5 ${libharu_URL_MD5}
+ build_${BP_PACKAGE}
+ URL ${${BP_PACKAGE}_URL}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
# Note -DPOST_2.1.0=OFF is essential for the 2.1.0 version, but you
# should drop this option for anything after 2.1.0. Also note that
- # -DLIBHARU_EXAMPLES=ON builds the demos, but does not test them.
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DPOST_2.1.0=OFF -DLIBHARU_EXAMPLES=ON ${EP_BASE}/Source/build_libharu
+ # -D${BP_PACKAGE}_EXAMPLES=ON builds the demos, but does not test them.
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DPOST_2.1.0=OFF -D${BP_PACKAGE}_EXAMPLES=ON ${EP_BASE}/Source/build_${BP_PACKAGE}
BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
INSTALL_COMMAND ${BP_PARALLEL_BUILD_COMMAND} install
STEP_TARGETS download update_build_system configure build install test
@@ -53,83 +55,83 @@
# rather than time stamps alone.
add_custom_command(
OUTPUT
- ${EP_BASE}/Source/build_libharu/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/demo/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/src/hpdf_page_operator.c
- ${EP_BASE}/Source/build_libharu/src/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/cmake/modules/haru.cmake
- ${EP_BASE}/Source/build_libharu/cmake/modules/summary.cmake
- ${EP_BASE}/Source/build_libharu/include/hpdf_consts.h
- ${EP_BASE}/Source/build_libharu/include/hpdf_config.h.cmake
- ${EP_BASE}/Source/build_libharu/include/hpdf.h
- ${EP_BASE}/Source/build_libharu/include/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/demo/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_page_operator.c
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/haru.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/summary.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_consts.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_config.h.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/CMakeLists.txt
# File that is patched.
- ${EP_BASE}/Source/build_libharu/src/hpdf_streams.c
- COMMAND ${CMAKE_COMMAND} -E make_directory ${EP_BASE}/Source/build_libharu/cmake/modules
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_streams.c
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libharu/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libharu/demo/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/demo/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/demo/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/demo/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libharu/src/hpdf_page_operator.c
- ${EP_BASE}/Source/build_libharu/src/hpdf_page_operator.c
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/hpdf_page_operator.c
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_page_operator.c
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libharu/src/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/src/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libharu/cmake/modules/haru.cmake
- ${EP_BASE}/Source/build_libharu/cmake/modules/haru.cmake
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/haru.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/haru.cmake
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libharu/cmake/modules/summary.cmake
- ${EP_BASE}/Source/build_libharu/cmake/modules/summary.cmake
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/summary.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/summary.cmake
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libharu/include/hpdf_consts.h
- ${EP_BASE}/Source/build_libharu/include/hpdf_consts.h
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_consts.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_consts.h
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libharu/include/hpdf_config.h.cmake
- ${EP_BASE}/Source/build_libharu/include/hpdf_config.h.cmake
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_config.h.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_config.h.cmake
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libharu/include/hpdf.h
- ${EP_BASE}/Source/build_libharu/include/hpdf.h
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf.h
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libharu/include/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/include/CMakeLists.txt
- COMMAND ${PATCH_EXECUTABLE} -d ${EP_BASE}/Source/build_libharu -p1 < ${CMAKE_SOURCE_DIR}/libharu/include_hpdf_config.h.patch
- COMMENT "Updating of libharu build system"
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/CMakeLists.txt
+ COMMAND ${PATCH_EXECUTABLE} -d ${EP_BASE}/Source/build_${BP_PACKAGE} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include_hpdf_config.h.patch
+ COMMENT "Updating of ${BP_PACKAGE} build system"
DEPENDS
- ${CMAKE_SOURCE_DIR}/libharu/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/libharu/demo/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/libharu/src/hpdf_page_operator.c
- ${CMAKE_SOURCE_DIR}/libharu/src/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/libharu/cmake/modules/haru.cmake
- ${CMAKE_SOURCE_DIR}/libharu/cmake/modules/summary.cmake
- ${CMAKE_SOURCE_DIR}/libharu/include/hpdf_consts.h
- ${CMAKE_SOURCE_DIR}/libharu/include/hpdf_config.h.cmake
- ${CMAKE_SOURCE_DIR}/libharu/include/hpdf.h
- ${CMAKE_SOURCE_DIR}/libharu/include/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/libharu/include_hpdf_config.h.patch
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/demo/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/hpdf_page_operator.c
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/haru.cmake
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/cmake/modules/summary.cmake
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_consts.h
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf_config.h.cmake
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/hpdf.h
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/include_hpdf_config.h.patch
)
-ExternalProject_Add_Step(build_libharu update_build_system
- COMMENT "Updated libharu build system"
+ExternalProject_Add_Step(build_${BP_PACKAGE} update_build_system
+ COMMENT "Updated ${BP_PACKAGE} build system"
DEPENDEES download
DEPENDERS configure
DEPENDS
- ${EP_BASE}/Source/build_libharu/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/demo/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/src/hpdf_page_operator.c
- ${EP_BASE}/Source/build_libharu/src/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/cmake/modules/haru.cmake
- ${EP_BASE}/Source/build_libharu/cmake/modules/summary.cmake
- ${EP_BASE}/Source/build_libharu/include/hpdf_consts.h
- ${EP_BASE}/Source/build_libharu/include/hpdf_config.h.cmake
- ${EP_BASE}/Source/build_libharu/include/hpdf.h
- ${EP_BASE}/Source/build_libharu/include/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/src/hpdf_streams.c
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/demo/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_page_operator.c
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/haru.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/cmake/modules/summary.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_consts.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf_config.h.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/hpdf.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/include/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/hpdf_streams.c
ALWAYS OFF
)
# Restore BP_PATH to original state.
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-#message(STATUS "shapelib restored original BP_PATH = ${BP_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Modified: trunk/cmake/build_projects/libqhull/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libqhull/ep.cmake 2013-06-07 16:03:35 UTC (rev 12374)
+++ trunk/cmake/build_projects/libqhull/ep.cmake 2013-06-07 18:46:54 UTC (rev 12375)
@@ -1,6 +1,6 @@
# libqhull/ep.cmake
# This file should be included directly or indirectly from a top-level
-# CMakeLists.txt file to configure the build and test of libqhull.
+# CMakeLists.txt file to configure the build of libqhull.
# Copyright (C) 2013 Alan W. Irwin
@@ -24,23 +24,25 @@
# used below that configure how the External_Project functions
# operate.
+set(BP_PACKAGE libqhull)
+
# Data that is related to downloads.
-set(libqhull_URL http://www.qhull.org/download/qhull-2010.1-src.tgz)
-set(libqhull_URL_MD5 e64138470acdeb18f752a0bc2a11ceb4)
+set(${BP_PACKAGE}_URL http://www.qhull.org/download/qhull-2010.1-src.tgz)
+set(${BP_PACKAGE}_URL_MD5 e64138470acdeb18f752a0bc2a11ceb4)
# Data that is related to the PATH that must be used.
if(MSYS_PLATFORM)
#set(BP_PATH_NODLL "${BP_PATH}")
- #set(BP_PATH "${EP_BASE}/Build/build_libqhull/dll;${BP_PATH_NODLL}")
+ #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
determine_msys_path(BP_PATH "${BP_PATH}")
endif(MSYS_PLATFORM)
-#message(STATUS "modified BP_PATH for libqhull = ${BP_PATH}")
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
ExternalProject_Add(
- build_libqhull
- URL ${libqhull_URL}
- URL_MD5 ${libqhull_URL_MD5}
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_libqhull
+ build_${BP_PACKAGE}
+ URL ${${BP_PACKAGE}_URL}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE}
BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
INSTALL_COMMAND ${BP_PARALLEL_BUILD_COMMAND} install
STEP_TARGETS download update_build_system configure build install test
@@ -50,47 +52,47 @@
# rather than time stamps alone.
add_custom_command(
OUTPUT
- ${EP_BASE}/Source/build_libqhull/CMakeLists.txt
- ${EP_BASE}/Source/build_libqhull/src/CMakeLists.txt
- ${EP_BASE}/Source/build_libqhull/src/libqhull.h
- ${EP_BASE}/Source/build_libqhull/src/mem.h
- ${EP_BASE}/Source/build_libqhull/src/unix.c
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/${BP_PACKAGE}.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/mem.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/unix.c
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libqhull/CMakeLists.txt
- ${EP_BASE}/Source/build_libqhull/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libqhull/src/CMakeLists.txt
- ${EP_BASE}/Source/build_libqhull/src/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libqhull/src/libqhull.h
- ${EP_BASE}/Source/build_libqhull/src/libqhull.h
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/${BP_PACKAGE}.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/${BP_PACKAGE}.h
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libqhull/src/mem.h
- ${EP_BASE}/Source/build_libqhull/src/mem.h
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/mem.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/mem.h
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/libqhull/src/unix.c
- ${EP_BASE}/Source/build_libqhull/src/unix.c
- COMMENT "Updating of libqhull build system"
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/unix.c
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/unix.c
+ COMMENT "Updating of ${BP_PACKAGE} build system"
DEPENDS
- ${CMAKE_SOURCE_DIR}/libqhull/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/libqhull/src/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/libqhull/src/libqhull.h
- ${CMAKE_SOURCE_DIR}/libqhull/src/mem.h
- ${CMAKE_SOURCE_DIR}/libqhull/src/unix.c
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/${BP_PACKAGE}.h
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/mem.h
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/src/unix.c
)
-ExternalProject_Add_Step(build_libqhull update_build_system
- COMMENT "Updated libqhull build system"
+ExternalProject_Add_Step(build_${BP_PACKAGE} update_build_system
+ COMMENT "Updated ${BP_PACKAGE} build system"
DEPENDEES download
DEPENDERS configure
DEPENDS
- ${EP_BASE}/Source/build_libqhull/CMakeLists.txt
- ${EP_BASE}/Source/build_libqhull/src/CMakeLists.txt
- ${EP_BASE}/Source/build_libqhull/src/libqhull.h
- ${EP_BASE}/Source/build_libqhull/src/mem.h
- ${EP_BASE}/Source/build_libqhull/src/unix.c
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/${BP_PACKAGE}.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/mem.h
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/src/unix.c
ALWAYS OFF
)
# Restore BP_PATH to original state.
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-#message(STATUS "shapelib restored original BP_PATH = ${BP_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Modified: trunk/cmake/build_projects/ndiff/ep.cmake
===================================================================
--- trunk/cmake/build_projects/ndiff/ep.cmake 2013-06-07 16:03:35 UTC (rev 12374)
+++ trunk/cmake/build_projects/ndiff/ep.cmake 2013-06-07 18:46:54 UTC (rev 12375)
@@ -1,6 +1,6 @@
# ndiff/ep.cmake
# This file should be included directly or indirectly from a top-level
-# CMakeLists.txt file to configure the build and test of ndiff.
+# CMakeLists.txt file to configure the build of ndiff.
# Copyright (C) 2013 Alan W. Irwin
@@ -24,27 +24,29 @@
# used below that configure how the External_Project functions
# operate.
+set(BP_PACKAGE ndiff)
+
# Data that is related to downloads.
-set(ndiff_URL ftp://ftp.math.utah.edu/pub/misc/ndiff-2.00.tar.gz)
+set(${BP_PACKAGE}_URL ftp://ftp.math.utah.edu/pub/misc/${BP_PACKAGE}-2.00.tar.gz)
# The MD5 value below is correct for the gpg --verified version
# Use URL_MD5 because ExternalProject_Add doesn't deal with gpg --version.
# In any case, gpg is not available for the MSYS_PLATFORM case.
-set(ndiff_URL_MD5 885548b4dc26e72c5455bebb5ba6c16d)
+set(${BP_PACKAGE}_URL_MD5 885548b4dc26e72c5455bebb5ba6c16d)
# Data that is related to the PATH that must be used.
if(MSYS_PLATFORM)
#set(BP_PATH_NODLL "${BP_PATH}")
- #set(BP_PATH "${EP_BASE}/Build/build_ndiff/dll;${BP_PATH_NODLL}")
+ #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
determine_msys_path(BP_PATH "${BP_PATH}")
endif(MSYS_PLATFORM)
-#message(STATUS "modified BP_PATH for ndiff = ${BP_PATH}")
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
ExternalProject_Add(
- build_ndiff
- URL ${ndiff_URL}
- URL_MD5 ${ndiff_URL_MD5}
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_ndiff
+ build_${BP_PACKAGE}
+ URL ${${BP_PACKAGE}_URL}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_${BP_PACKAGE}
BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
TEST_BEFORE_INSTALL ON
TEST_COMMAND ${BP_PARALLEL_CTEST_COMMAND}
@@ -56,29 +58,29 @@
# rather than time stamps alone.
add_custom_command(
OUTPUT
- ${EP_BASE}/Source/build_ndiff/CMakeLists.txt
- ${EP_BASE}/Source/build_ndiff/config.h.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/config.h.cmake
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/ndiff/CMakeLists.txt
- ${EP_BASE}/Source/build_ndiff/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/ndiff/config.h.cmake
- ${EP_BASE}/Source/build_ndiff/config.h.cmake
- COMMENT "Updating of ndiff build system"
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/config.h.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/config.h.cmake
+ COMMENT "Updating of ${BP_PACKAGE} build system"
DEPENDS
- ${CMAKE_SOURCE_DIR}/ndiff/CMakeLists.txt
- ${CMAKE_SOURCE_DIR}/ndiff/config.h.cmake
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/config.h.cmake
)
-ExternalProject_Add_Step(build_ndiff update_build_system
- COMMENT "Updated ndiff build system"
+ExternalProject_Add_Step(build_${BP_PACKAGE} update_build_system
+ COMMENT "Updated ${BP_PACKAGE} build system"
DEPENDEES download
DEPENDERS configure
DEPENDS
- ${EP_BASE}/Source/build_ndiff/CMakeLists.txt
- ${EP_BASE}/Source/build_ndiff/config.h.cmake
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/config.h.cmake
ALWAYS OFF
)
# Restore BP_PATH to original state.
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-#message(STATUS "shapelib restored original BP_PATH = ${BP_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
Modified: trunk/cmake/build_projects/shapelib/ep.cmake
===================================================================
--- trunk/cmake/build_projects/shapelib/ep.cmake 2013-06-07 16:03:35 UTC (rev 12374)
+++ trunk/cmake/build_projects/shapelib/ep.cmake 2013-06-07 18:46:54 UTC (rev 12375)
@@ -1,6 +1,6 @@
# shapelib/ep.cmake
# This file should be included directly or indirectly from a top-level
-# CMakeLists.txt file to configure the build and test of shapelib.
+# CMakeLists.txt file to configure the build of shapelib.
# Copyright (C) 2013 Alan W. Irwin
@@ -24,26 +24,28 @@
# used below that configure how the External_Project functions
# operate.
+set(BP_PACKAGE shapelib)
+
# Data that is related to downloads.
-set(shapelib_URL http://download.osgeo.org/shapelib/shapelib-1.3.0.tar.gz)
-set(shapelib_URL_MD5 2ff7d0b21d4b7506b452524492795f77)
+set(${BP_PACKAGE}_URL http://download.osgeo.org/${BP_PACKAGE}/${BP_PACKAGE}-1.3.0.tar.gz)
+set(${BP_PACKAGE}_URL_MD5 2ff7d0b21d4b7506b452524492795f77)
-set(shape_eg_data_URL http://dl.maptools.org/dl/shapelib/shape_eg_data.zip)
+set(shape_eg_data_URL http://dl.maptools.org/dl/${BP_PACKAGE}/shape_eg_data.zip)
set(shape_eg_data_URL_MD5 36208abd5d34c5c80101d8b214109f0d)
# Data that is related to the PATH that must be used.
if(MSYS_PLATFORM)
set(BP_PATH_NODLL "${BP_PATH}")
- set(BP_PATH "${EP_BASE}/Build/build_shapelib/dll;${BP_PATH_NODLL}")
+ set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
determine_msys_path(BP_PATH "${BP_PATH}")
endif(MSYS_PLATFORM)
-#message(STATUS "modified BP_PATH for shapelib = ${BP_PATH}")
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
ExternalProject_Add(
- build_shapelib
- URL ${shapelib_URL}
- URL_MD5 ${shapelib_URL_MD5}
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DEG_DATA:PATH=${EP_BASE}/Source/build_shapelib/eg_data ${EP_BASE}/Source/build_shapelib
+ build_${BP_PACKAGE}
+ URL ${${BP_PACKAGE}_URL}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DEG_DATA:PATH=${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data ${EP_BASE}/Source/build_${BP_PACKAGE}
BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
TEST_BEFORE_INSTALL ON
TEST_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_CTEST_COMMAND}
@@ -55,40 +57,40 @@
# generate real file dependencies rather than time stamps alone.
add_custom_command(
OUTPUT
- ${EP_BASE}/Source/build_shapelib/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_SOURCE_DIR}/shapelib/CMakeLists.txt
- ${EP_BASE}/Source/build_shapelib/CMakeLists.txt
- COMMENT "Updating of shapelib build system"
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
+ COMMENT "Updating of ${BP_PACKAGE} build system"
DEPENDS
- ${CMAKE_SOURCE_DIR}/shapelib/CMakeLists.txt
+ ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt
)
-ExternalProject_Add_Step(build_shapelib update_build_system
- COMMENT "Updated shapelib build system"
+ExternalProject_Add_Step(build_${BP_PACKAGE} update_build_system
+ COMMENT "Updated ${BP_PACKAGE} build system"
DEPENDEES download
DEPENDERS configure
DEPENDS
- ${EP_BASE}/Source/build_shapelib/CMakeLists.txt
+ ${EP_BASE}/Source/build_${BP_PACKAGE}/CMakeLists.txt
ALWAYS OFF
)
add_custom_command(
OUTPUT
- ${EP_BASE}/Download/build_shapelib/shape_eg_data.zip
- COMMAND ${CMAKE_COMMAND} -DURL:STRING=${shape_eg_data_URL} -DFILE:FILEPATH=${EP_BASE}/Download/build_shapelib/shape_eg_data.zip -DMD5:STRING=${shape_eg_data_URL_MD5} -P ${CMAKE_SOURCE_DIR}/download_check.cmake
- COMMAND ${CMAKE_COMMAND} -E remove_directory ${EP_BASE}/Source/build_shapelib/eg_data
- COMMAND ${UNZIP_EXECUTABLE} -q ${EP_BASE}/Download/build_shapelib/shape_eg_data.zip -d ${EP_BASE}/Source/build_shapelib/eg_data
- COMMENT "getting eg_data for shapelib test"
+ ${EP_BASE}/Download/build_${BP_PACKAGE}/shape_eg_data.zip
+ COMMAND ${CMAKE_COMMAND} -DURL:STRING=${shape_eg_data_URL} -DFILE:FILEPATH=${EP_BASE}/Download/build_${BP_PACKAGE}/shape_eg_data.zip -DMD5:STRING=${shape_eg_data_URL_MD5} -P ${CMAKE_SOURCE_DIR}/download_check.cmake
+ COMMAND ${CMAKE_COMMAND} -E remove_directory ${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data
+ COMMAND ${UNZIP_EXECUTABLE} -q ${EP_BASE}/Download/build_${BP_PACKAGE}/shape_eg_data.zip -d ${EP_BASE}/Source/build_${BP_PACKAGE}/eg_data
+ COMMENT "getting eg_data for ${BP_PACKAGE} test"
)
-ExternalProject_Add_Step(build_shapelib get_eg_data
- COMMENT "got eg_data for shapelib test"
+ExternalProject_Add_Step(build_${BP_PACKAGE} get_eg_data
+ COMMENT "got eg_data for ${BP_PACKAGE} test"
DEPENDEES download
DEPENDERS configure
DEPENDS
- ${EP_BASE}/Download/build_shapelib/shape_eg_data.zip
+ ${EP_BASE}/Download/build_${BP_PACKAGE}/shape_eg_data.zip
ALWAYS OFF
)
# Restore BP_PATH to original state.
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-#message(STATUS "shapelib restored original BP_PATH = ${BP_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2013-06-07 16:03:37
|
Revision: 12374
http://sourceforge.net/p/plplot/code/12374
Author: andrewross
Date: 2013-06-07 16:03:35 +0000 (Fri, 07 Jun 2013)
Log Message:
-----------
Update lua bindings to implement latest colorbar API and update examples accordingly.
Modified Paths:
--------------
trunk/bindings/lua/plplotluac.i
trunk/bindings/swig-support/plplotcapi.i
trunk/examples/lua/x16.lua
trunk/examples/lua/x33.lua
Modified: trunk/bindings/lua/plplotluac.i
===================================================================
--- trunk/bindings/lua/plplotluac.i 2013-06-06 21:44:55 UTC (rev 12373)
+++ trunk/bindings/lua/plplotluac.i 2013-06-07 16:03:35 UTC (rev 12374)
@@ -230,7 +230,32 @@
LUA_FREE_ARRAY( $1 );
}
+// No length but remember size to check others
+%typemap( in ) const PLINT * ArrayN( int temp )
+{
+ int i;
+ $1 = (PLINT *) LUA_get_int_num_array_var( L, $input, &temp );
+ if ( !$1 )
+ SWIG_fail;
+ if (temp != Alen)
+ {
+ lua_pushfstring( L, "Tables must be of same length." );
+ SWIG_fail;
+ }
+
+ Xlen = temp;
+ Ylen = -1;
+ for ( i = 0; i < Xlen; i++ )
+ if ( $1[i] > Ylen ) Ylen = $1[i];
+
+}
+%typemap( freearg ) ( const PLINT * ArrayN )
+{
+ LUA_FREE_ARRAY( $1 );
+}
+
+
//--------------------------------------------------------------------------
// PLFLT Arrays
//--------------------------------------------------------------------------
@@ -1240,8 +1265,38 @@
}
}
+%typemap( in ) ( PLINT n, const char **Array )
+{
+ int i;
+ $1 = SWIG_table_size( L, $input );
+ Alen = $1;
+ $2 = malloc( sizeof ( char* ) * Alen );
+ for ( i = 1; i <= Alen; i++ )
+ {
+ lua_rawgeti( L, $input, i );
+ if ( lua_isstring( L, -1 ) )
+ {
+ $2[i - 1] = (char *) lua_tostring( L, -1 );
+ }
+ else
+ {
+ lua_pop( L, 1 );
+ lua_pushfstring( L, "Requires a sequence of strings." );
+ SWIG_fail;
+ }
+ lua_pop( L, 1 );
+ }
+}
+%typemap( freearg ) ( PLINT n, const char **Array )
+{
+ if ( $2 )
+ {
+ free( $2 ); $2 = NULL;
+ }
+}
+
// Process options list using current options info.
%typemap( in, checkfn = "lua_istable" ) ( int *p_argc, const char **argv )
{
@@ -1308,6 +1363,7 @@
%rename( clear ) plclear;
%rename( col0 ) plcol0;
%rename( col1 ) plcol1;
+%rename( colorbar ) plcolorbar;
%rename( configtime ) plconfigtime;
%rename( cont ) plcont;
%rename( cpstrm ) plcpstrm;
@@ -1398,6 +1454,7 @@
%rename( scmap1l ) plscmap1l;
%rename( scmap1la ) plscmap1la;
%rename( scmap1n ) plscmap1n;
+%rename( scmap1_range ) plscmap1_range;
%rename( scol0 ) plscol0;
%rename( scol0a ) plscol0a;
%rename( scolbg ) plscolbg;
Modified: trunk/bindings/swig-support/plplotcapi.i
===================================================================
--- trunk/bindings/swig-support/plplotcapi.i 2013-06-06 21:44:55 UTC (rev 12373)
+++ trunk/bindings/swig-support/plplotcapi.i 2013-06-07 16:03:35 UTC (rev 12374)
@@ -481,7 +481,6 @@
const PLINT *ArrayCkNull, const PLFLT *ArrayCkNull,
const PLINT *ArrayCkNull, const char **ArrayCk );
-#if defined ( SWIG_PYTHON ) || defined ( SWIG_JAVA ) || defined ( SWIG_OCTAVE )
void
plcolorbar( PLFLT *OUTPUT, PLFLT *OUTPUT,
PLINT opt, PLINT position, PLFLT x, PLFLT y,
@@ -493,7 +492,6 @@
PLINT n, const char **Array,
const PLFLT *ArrayCk, const PLINT *ArrayCk,
const PLINT *ArrayN, const PLFLT **MatrixCk );
-#endif
void
pllightsource( PLFLT x, PLFLT y, PLFLT z );
Modified: trunk/examples/lua/x16.lua
===================================================================
--- trunk/examples/lua/x16.lua 2013-06-06 21:44:55 UTC (rev 12373)
+++ trunk/examples/lua/x16.lua 2013-06-07 16:03:35 UTC (rev 12374)
@@ -72,7 +72,19 @@
return z<0.4 or z>0.6
end
+-- return single bit (for OR)
+function bit(x,b)
+ return ((x % 2^b) - (x % 2^(b-1)) > 0)
+end
+-- logic OR for number values
+function lor(x,y)
+ result = 0
+ for p=1,16 do result = result + (((bit(x,p) or bit(y,p)) == true) and 2^(p-1) or 0) end
+ return result
+end
+
+
----------------------------------------------------------------------------
-- main
--
@@ -86,6 +98,14 @@
cont_color = 0
cont_width = 0.
+axis_opts = { "bcvtm" }
+num_values = {}
+values = {}
+axis_ticks = { 0.0 }
+axis_subticks = { 0 }
+label_opts = { pl.PL_COLORBAR_LABEL_BOTTOM }
+labels = { "Magnitude" }
+
-- Parse and process command line arguments
pl.parseopts(arg, pl.PL_PARSE_FULL)
@@ -169,6 +189,21 @@
pl.shades(z, -1, 1, -1, 1, shedge, fill_width, cont_color, cont_width, 1)
+-- Smaller text
+pl.schr( 0.0, 0.75 )
+-- Small ticks on the vertical axis
+pl.smaj( 0.0, 0.5 )
+pl.smin( 0.0, 0.5 )
+
+num_values[1] = ns + 1
+values[1] = shedge
+colorbar_width, colorbar_height = pl.colorbar( lor(pl.PL_COLORBAR_SHADE, pl.PL_COLORBAR_SHADE_LABEL), 0, 0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0, cont_color, cont_width, label_opts, labels, axis_opts, axis_ticks, axis_subticks, num_values, values )
+
+-- Reset text and tick sizes
+pl.schr( 0.0, 1.0 )
+pl.smaj( 0.0, 1.0 )
+pl.smin( 0.0, 1.0 )
+
pl.col0(1)
pl.box("bcnst", 0, 0, "bcnstv", 0, 0)
pl.col0(2)
@@ -193,6 +228,22 @@
pl.shades(z, -1, 1, -1, 1, shedge, fill_width, cont_color, cont_width, 1, "pltr1", cgrid1)
+-- Smaller text
+pl.schr( 0.0, 0.75 )
+-- Small ticks on the vertical axis
+pl.smaj( 0.0, 0.5 )
+pl.smin( 0.0, 0.5 )
+
+num_values[1] = ns + 1
+values[1] = shedge
+
+colorbar_width, colorbar_height = pl.colorbar( lor(pl.PL_COLORBAR_SHADE, pl.PL_COLORBAR_SHADE_LABEL), 0, 0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0, cont_color, cont_width, label_opts, labels, axis_opts, axis_ticks, axis_subticks, num_values, values )
+
+-- Reset text and tick sizes
+pl.schr( 0.0, 1.0 )
+pl.smaj( 0.0, 1.0 )
+pl.smin( 0.0, 1.0 )
+
pl.col0(1)
pl.box("bcnst", 0, 0, "bcnstv", 0, 0)
pl.col0(2)
@@ -215,6 +266,21 @@
pl.shades(z, -1, 1, -1, 1, shedge, fill_width, cont_color, cont_width, 0, "pltr2", cgrid2)
+-- Smaller text
+pl.schr( 0.0, 0.75 )
+-- Small ticks on the vertical axis
+pl.smaj( 0.0, 0.5 )
+pl.smin( 0.0, 0.5 )
+
+num_values[1] = ns + 1
+values[1] = shedge
+colorbar_width, colorbar_height = pl.colorbar( lor(pl.PL_COLORBAR_SHADE, pl.PL_COLORBAR_SHADE_LABEL), 0, 0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0, cont_color, cont_width, label_opts, labels, axis_opts, axis_ticks, axis_subticks, num_values, values )
+
+-- Reset text and tick sizes
+pl.schr( 0.0, 1.0 )
+pl.smaj( 0.0, 1.0 )
+pl.smin( 0.0, 1.0 )
+
pl.col0(1)
pl.box("bcnst", 0, 0, "bcnstv", 0, 0)
pl.col0(2)
@@ -239,6 +305,21 @@
pl.shades(z, -1, 1, -1, 1, shedge, fill_width, 2, 3., 0, "pltr2", cgrid2)
+-- Smaller text
+pl.schr( 0.0, 0.75 )
+-- Small ticks on the vertical axis
+pl.smaj( 0.0, 0.5 )
+pl.smin( 0.0, 0.5 )
+
+num_values[1] = ns + 1
+values[1] = shedge
+colorbar_width, colorbar_height = pl.colorbar( lor(pl.PL_COLORBAR_SHADE, pl.PL_COLORBAR_SHADE_LABEL), 0, 0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0, 2, 3., label_opts, labels, axis_opts, axis_ticks, axis_subticks, num_values, values )
+
+-- Reset text and tick sizes
+pl.schr( 0.0, 1.0 )
+pl.smaj( 0.0, 1.0 )
+pl.smin( 0.0, 1.0 )
+
pl.col0(1)
pl.box("bcnst", 0, 0, "bcnstv", 0, 0)
pl.col0(2)
@@ -308,6 +389,21 @@
-- Now we can shade the interior region.
pl.shades(z, -1, 1, -1, 1, shedge, fill_width, cont_color, cont_width, 0, "pltr2", cgrid2)
+-- Smaller text
+pl.schr( 0.0, 0.75 )
+-- Small ticks on the vertical axis
+pl.smaj( 0.0, 0.5 )
+pl.smin( 0.0, 0.5 )
+
+num_values[1] = ns + 1
+values[1] = shedge
+colorbar_width, colorbar_height = pl.colorbar( lor(pl.PL_COLORBAR_SHADE, pl.PL_COLORBAR_SHADE_LABEL), 0, 0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0, cont_color, cont_width, label_opts, labels, axis_opts, axis_ticks, axis_subticks, num_values, values )
+
+-- Reset text and tick sizes
+pl.schr( 0.0, 1.0 )
+pl.smaj( 0.0, 1.0 )
+pl.smin( 0.0, 1.0 )
+
-- Now we can draw the perimeter. (If do before, shade stuff may overlap.)
for i = 1, PERIMETERPTS do
t = 2*math.pi/(PERIMETERPTS-1)*(i-1)
Modified: trunk/examples/lua/x33.lua
===================================================================
--- trunk/examples/lua/x33.lua 2013-06-06 21:44:55 UTC (rev 12373)
+++ trunk/examples/lua/x33.lua 2013-06-07 16:03:35 UTC (rev 12374)
@@ -1,4 +1,4 @@
---[[ $Id: x04.lua 11667 2011-03-21 03:35:08Z airwin $
+--[[ $Id: x33.lua 11667 2011-03-21 03:35:08Z airwin $
Demonstrate most pllegend capability including unicode symbols.
@@ -24,25 +24,25 @@
-- initialise Lua bindings for PLplot examples.
dofile("plplot_examples.lua")
-----------------------------------------------------------------------------
--- plot1
---
--- Log-linear plot.
-----------------------------------------------------------------------------
-
-- return single bit (for OR)
function bit(x,b)
return ((x % 2^b) - (x % 2^(b-1)) > 0)
end
-- logic OR for number values
-
function lor(x,y)
result = 0
- for p=1,8 do result = result + (((bit(x,p) or bit(y,p)) == true) and 2^(p-1) or 0) end
+ for p=1,32 do result = result + (((bit(x,p) or bit(y,p)) == true) and 2^(p-1) or 0) end
return result
end
+-- logic AND for number values
+function land(x,y)
+ result = 0
+ for p=1,32 do result = result + (((bit(x,p) and bit(y,p)) == true) and 2^(p-1) or 0) end
+ return result
+end
+
-- Intialize pllegend arrays taking advantage of Lua's default global scope.
function initialize_pllegend_arrays(nlegend)
@@ -78,6 +78,116 @@
end
end
+function plcolorbar_example_page( kind_i, label_i, cap_i, cont_color, cont_width, n_values, values )
+ -- Parameters for the colorbars on this page
+ ticks = { 0.0 }
+ sub_ticks = { 0 }
+ axis_opts = {}
+ label_opts = { 0 }
+ n_values_array = {}
+ values_array = {}
+ label = {}
+
+ n_values_array[1] = n_values
+ values_array[1] = values
+
+ low_cap_color = 0.0
+ high_cap_color = 1.0
+
+ -- Start a new page
+ pl.adv( 0 )
+
+ -- Draw one colorbar relative to each side of the page
+ for position_i = 0,COLORBAR_POSITIONS-1 do
+ position = colorbar_position_options[position_i+1]
+ opt =
+ lor(colorbar_option_kinds[kind_i+1],
+ lor(colorbar_label_options[label_i+1],
+ colorbar_cap_options[cap_i+1]))
+
+ vertical = lor(land(position,pl.PL_POSITION_LEFT), land(position,pl.PL_POSITION_RIGHT))
+ ifn = lor(land(position, pl.PL_POSITION_LEFT), land(position, pl.PL_POSITION_BOTTOM))
+
+ -- Set the offset position on the page
+ if vertical > 0 then
+ x = 0.0
+ y = 0.0
+ x_length = 0.05
+ y_length = 0.5
+ else
+ x = 0.0
+ y = 0.0
+ x_length = 0.5
+ y_length = 0.05
+ end
+
+ -- Set appropriate labelling options.
+ if ifn > 0 then
+ if ( cont_color == 0 ) or ( cont_width == 0. ) then
+ axis_opts[1] = "uwtivn"
+ else
+ axis_opts[1] = "uwxvn"
+ end
+ else
+ if ( cont_color == 0 ) or ( cont_width == 0. ) then
+ axis_opts[1] = "uwtivm"
+ else
+ axis_opts[1] = "uwxvm"
+ end
+ end
+
+ label[1] = string.format( "%s, %s",
+ colorbar_position_option_labels[position_i+1],
+ colorbar_label_option_labels[label_i+1] )
+
+ -- Smaller text
+ pl.schr( 0.0, 0.75 )
+ -- Small ticks on the vertical axis
+ pl.smaj( 0.0, 0.5 )
+ pl.smin( 0.0, 0.5 )
+
+ pl.vpor( 0.20, 0.80, 0.20, 0.80 )
+ pl.wind( 0.0, 1.0, 0.0, 1.0 )
+ -- Set interesting background colour.
+ pl.scol0a( 15, 0, 0, 0, 0.20 );
+ colorbar_width, colorbar_height = pl.colorbar(
+ lor(opt, lor(pl.PL_COLORBAR_BOUNDING_BOX, pl.PL_COLORBAR_BACKGROUND)), position,
+ x, y, x_length, y_length,
+ 15, 1, 1,
+ low_cap_color, high_cap_color,
+ cont_color, cont_width,
+ label_opts, label,
+ axis_opts, ticks, sub_ticks,
+ n_values_array, values_array )
+
+ -- Reset text and tick sizes
+ pl.schr( 0.0, 1.0 )
+ pl.smaj( 0.0, 1.0 )
+ pl.smin( 0.0, 1.0 )
+ end
+
+ -- Draw a page title
+ title = string.format( "%s - %s",
+ colorbar_option_kind_labels[kind_i+1],
+ colorbar_cap_option_labels[cap_i+1] )
+ pl.vpor( 0.0, 1.0, 0.0, 1.0 )
+ pl.wind( 0.0, 1.0, 0.0, 1.0 )
+ pl.ptex( 0.5, 0.5, 0.0, 0.0, 0.5, title )
+end
+
+function plcolorbar_example( palette, kind_i, cont_color, cont_width, n_values, values )
+ -- Load the color palette
+ pl.spal1( palette, 1 )
+
+ for label_i = 0, COLORBAR_LABELS-1 do
+ for cap_i = 0, COLORBAR_CAPS-1 do
+ plcolorbar_example_page( kind_i, label_i, cap_i,
+ cont_color, cont_width,
+ n_values, values )
+ end
+ end
+end
+
----------------------------------------------------------------------------
-- main
----------------------------------------------------------------------------
@@ -110,6 +220,69 @@
"✦"
}
+-- plcolorbar options
+COLORBAR_KINDS = 4
+-- Colorbar type options
+colorbar_option_kinds = {
+ pl.PL_COLORBAR_SHADE,
+ lor(pl.PL_COLORBAR_SHADE, pl.PL_COLORBAR_SHADE_LABEL),
+ pl.PL_COLORBAR_IMAGE,
+ pl.PL_COLORBAR_GRADIENT
+}
+
+colorbar_option_kind_labels = {
+ "Shade colorbars",
+ "Shade colorbars with custom labels",
+ "Image colorbars",
+ "Gradient colorbars"
+}
+
+-- Which side of the page are we positioned relative to?
+COLORBAR_POSITIONS = 4
+colorbar_position_options = {
+ pl.PL_POSITION_LEFT,
+ pl.PL_POSITION_RIGHT,
+ pl.PL_POSITION_TOP,
+ pl.PL_POSITION_BOTTOM
+}
+
+colorbar_position_option_labels = {
+ "Left",
+ "Right",
+ "Top",
+ "Bottom"
+}
+
+-- Colorbar label positioning options
+COLORBAR_LABELS = 4
+colorbar_label_options = {
+ pl.PL_COLORBAR_LABEL_LEFT,
+ pl.PL_COLORBAR_LABEL_RIGHT,
+ pl.PL_COLORBAR_LABEL_TOP,
+ pl.PL_COLORBAR_LABEL_BOTTOM
+}
+colorbar_label_option_labels = {
+ "Label left",
+ "Label right",
+ "Label top",
+ "Label bottom"
+}
+
+-- Colorbar cap options
+COLORBAR_CAPS = 4
+colorbar_cap_options = {
+ pl.PL_COLORBAR_CAP_NONE,
+ pl.PL_COLORBAR_CAP_LOW,
+ pl.PL_COLORBAR_CAP_HIGH,
+ lor(pl.PL_COLORBAR_CAP_LOW, pl.PL_COLORBAR_CAP_HIGH)
+}
+colorbar_cap_option_labels = {
+ "No caps",
+ "Low cap",
+ "High cap",
+ "Low and high caps"
+}
+
-- Parse and process command line arguments
pl.parseopts(arg, pl.PL_PARSE_FULL)
@@ -612,4 +785,27 @@
symbol_colors, symbol_scales, symbol_numbers, symbols )
max_height = math.max(max_height, legend_height)
+-- Color bar examples
+values_small = { -1.0e-200, 1.0e-200 }
+values_uneven = { -1.0e-200, 2.0e-200, 2.6e-200, 3.4e-200, 6.0e-200, 7.0e-200, 8.0e-200, 9.0e-200, 10.0e-200 }
+values_even = { -2.0e-200, -1.0e-200, 0.0e-200, 1.0e-200, 2.0e-200, 3.0e-200, 4.0e-200, 5.0e-200, 6.0e-200 }
+
+-- Use unsaturated green background colour to contrast with black caps.
+pl.scolbg( 70, 185, 70 )
+-- Cut out the greatest and smallest bits of the color spectrum to
+-- leave colors for the end caps.
+pl.scmap1_range( 0.01, 0.99 )
+
+-- We can only test image and gradient colorbars with two element arrays
+for i = 2, COLORBAR_KINDS-1 do
+ plcolorbar_example( "cmap1_blue_yellow.pal", i, 0, 0, 2, values_small )
+end
+-- Test shade colorbars with larger arrays
+for i = 0,1 do
+ plcolorbar_example( "cmap1_blue_yellow.pal", i, 4, 2, 9, values_even )
+end
+for i = 0,1 do
+ plcolorbar_example( "cmap1_blue_yellow.pal", i, 0, 0, 9, values_uneven )
+end
+
pl.plend()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2013-06-06 21:44:57
|
Revision: 12373
http://sourceforge.net/p/plplot/code/12373
Author: andrewross
Date: 2013-06-06 21:44:55 +0000 (Thu, 06 Jun 2013)
Log Message:
-----------
Style recent changes.
Modified Paths:
--------------
trunk/src/plbox.c
Modified: trunk/src/plbox.c
===================================================================
--- trunk/src/plbox.c 2013-06-06 21:44:33 UTC (rev 12372)
+++ trunk/src/plbox.c 2013-06-06 21:44:55 UTC (rev 12373)
@@ -1292,16 +1292,16 @@
if ( lgx )
{
if ( ldx )
- {
- pldtfac( vpwxmi, vpwxma, &factor, &tstart);
- tn = xtick1*( floor((vpwxmi-tstart )/xtick1 )) + tstart;
- }
- else
- {
- tn = xtick1*floor( vpwxmi / xtick1 );
- }
- for ( ; tn <= vpwxma; tn += xtick1 )
{
+ pldtfac( vpwxmi, vpwxma, &factor, &tstart );
+ tn = xtick1 * ( floor( ( vpwxmi - tstart ) / xtick1 ) ) + tstart;
+ }
+ else
+ {
+ tn = xtick1 * floor( vpwxmi / xtick1 );
+ }
+ for (; tn <= vpwxma; tn += xtick1 )
+ {
if ( lhx )
{
if ( llx )
@@ -1338,16 +1338,16 @@
if ( lgy )
{
if ( ldy )
- {
- pldtfac( vpwymi, vpwyma, &factor, &tstart);
- tn = ytick1*( floor((vpwymi-tstart )/ytick1 )) + tstart;
- }
- else
- {
- tn = ytick1*floor( vpwymi / ytick1 );
- }
- for ( ; tn <= vpwyma; tn += ytick1 )
{
+ pldtfac( vpwymi, vpwyma, &factor, &tstart );
+ tn = ytick1 * ( floor( ( vpwymi - tstart ) / ytick1 ) ) + tstart;
+ }
+ else
+ {
+ tn = ytick1 * floor( vpwymi / ytick1 );
+ }
+ for (; tn <= vpwyma; tn += ytick1 )
+ {
if ( lhy )
{
if ( lly )
@@ -1776,90 +1776,90 @@
pos = ( (PLLabelDefaults *) plsc->label_data )->exp_label_pos;
just = ( (PLLabelDefaults *) plsc->label_data )->exp_label_just;
}
- if ( lvy )
- {
- offset = 0.1; // more space to clear labels in "v" mode
- }
- else
- {
- offset = 0.02;
- }
- // Left axis exponent
- if ( lny )
- {
- if (!plsc->label_data)
- {
- height = 3.2;
- pos = 1.0 + offset;
- just = 0.5;
- }
- if ( plsc->if_boxbb )
- {
- // For horizontal axes, height of zero corresponds
- // to character centred on edge so should add 0.5
- // to height to obtain bounding box edge in
- // direction away from edge if no exponent. Add
- // an additional offset to make exponent fit.
- height_mm = ( height + 1.4 ) * char_height_mm;
- plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
- plsc->ypmm + height_mm );
- string_length_mm = plstrl( string );
- pos_mm = ( plsc->vppxmi + pos *
- ( plsc->vppxma - plsc->vppxmi ) ) /
- plsc->xpmm;
- plsc->boxbb_xmin = MIN( plsc->boxbb_xmin,
- pos_mm - string_length_mm );
- }
- else
- {
- if ( lvy )
- {
- plmtex( "lv", height, pos, just, string );
- }
- else
- {
- plmtex( "l", height, pos, just, string );
- }
- }
- }
- // Right axis exponent.
- if ( lmy )
- {
- if ( !plsc->label_data )
- {
- height = 3.4; // Extra space for superscript
- pos = 1.0 + offset;
- just = 0.5;
- }
- if ( plsc->if_boxbb )
- {
- // For horizontal axes, height of zero corresponds
- // to character centred on edge so should add 0.5
- // to height to obtain bounding box edge in
- // direction away from edge if no exponent. Add
- // an additional offset to make exponent fit.
- height_mm = ( height + 1.4 ) * char_height_mm;
- plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
- plsc->ypmm + height_mm );
- string_length_mm = plstrl( string );
- pos_mm = ( plsc->vppxmi + pos *
- ( plsc->vppxma - plsc->vppxmi ) ) /
- plsc->xpmm;
- plsc->boxbb_xmax = MAX( plsc->boxbb_xmin,
- pos_mm + string_length_mm );
- }
- else
- {
- if ( lvy )
- {
- plmtex( "rv", height, pos, just, string );
- }
- else
- {
- plmtex( "r", height, pos, just, string );
- }
+ if ( lvy )
+ {
+ offset = 0.1; // more space to clear labels in "v" mode
+ }
+ else
+ {
+ offset = 0.02;
+ }
+ // Left axis exponent
+ if ( lny )
+ {
+ if ( !plsc->label_data )
+ {
+ height = 3.2;
+ pos = 1.0 + offset;
+ just = 0.5;
}
+ if ( plsc->if_boxbb )
+ {
+ // For horizontal axes, height of zero corresponds
+ // to character centred on edge so should add 0.5
+ // to height to obtain bounding box edge in
+ // direction away from edge if no exponent. Add
+ // an additional offset to make exponent fit.
+ height_mm = ( height + 1.4 ) * char_height_mm;
+ plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
+ plsc->ypmm + height_mm );
+ string_length_mm = plstrl( string );
+ pos_mm = ( plsc->vppxmi + pos *
+ ( plsc->vppxma - plsc->vppxmi ) ) /
+ plsc->xpmm;
+ plsc->boxbb_xmin = MIN( plsc->boxbb_xmin,
+ pos_mm - string_length_mm );
+ }
+ else
+ {
+ if ( lvy )
+ {
+ plmtex( "lv", height, pos, just, string );
+ }
+ else
+ {
+ plmtex( "l", height, pos, just, string );
+ }
+ }
}
+ // Right axis exponent.
+ if ( lmy )
+ {
+ if ( !plsc->label_data )
+ {
+ height = 3.4; // Extra space for superscript
+ pos = 1.0 + offset;
+ just = 0.5;
+ }
+ if ( plsc->if_boxbb )
+ {
+ // For horizontal axes, height of zero corresponds
+ // to character centred on edge so should add 0.5
+ // to height to obtain bounding box edge in
+ // direction away from edge if no exponent. Add
+ // an additional offset to make exponent fit.
+ height_mm = ( height + 1.4 ) * char_height_mm;
+ plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
+ plsc->ypmm + height_mm );
+ string_length_mm = plstrl( string );
+ pos_mm = ( plsc->vppxmi + pos *
+ ( plsc->vppxma - plsc->vppxmi ) ) /
+ plsc->xpmm;
+ plsc->boxbb_xmax = MAX( plsc->boxbb_xmin,
+ pos_mm + string_length_mm );
+ }
+ else
+ {
+ if ( lvy )
+ {
+ plmtex( "rv", height, pos, just, string );
+ }
+ else
+ {
+ plmtex( "r", height, pos, just, string );
+ }
+ }
+ }
}
}
}
@@ -2332,89 +2332,89 @@
pos = ( (PLLabelDefaults *) plsc->label_data )->exp_label_pos;
just = ( (PLLabelDefaults *) plsc->label_data )->exp_label_just;
}
- if ( lvy )
- {
- offset = 0.1; // more space to clear labels in "v" mode
- }
- else
- {
- offset = 0.02;
- }
- // Left axis exponent.
- if ( lny )
- {
- if (!plsc->label_data)
- {
- height = 3.2;
- pos = 1.0 + offset;
- just = 0.5;
- }
- if ( plsc->if_boxbb )
- {
- // For horizontal axes, height of zero corresponds
- // to character centred on edge so should add 0.5
- // to height to obtain bounding box edge in
- // direction away from edge if no exponent. Add
- // an additional offset to make exponent fit.
- height_mm = ( height + 1.4 ) * char_height_mm;
- plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
- plsc->ypmm + height_mm );
- string_length_mm = plstrl( string );
- pos_mm = ( plsc->vppxmi + pos *
- ( plsc->vppxma - plsc->vppxmi ) ) /
- plsc->xpmm;
- plsc->boxbb_xmin = MIN( plsc->boxbb_xmin,
- pos_mm - string_length_mm );
- }
- else
- {
- if ( lvy )
- {
- plmtex( "lv", height, pos, just, string );
- }
- else
- {
- plmtex( "l", height, pos, just, string );
+ if ( lvy )
+ {
+ offset = 0.1; // more space to clear labels in "v" mode
+ }
+ else
+ {
+ offset = 0.02;
+ }
+ // Left axis exponent.
+ if ( lny )
+ {
+ if ( !plsc->label_data )
+ {
+ height = 3.2;
+ pos = 1.0 + offset;
+ just = 0.5;
+ }
+ if ( plsc->if_boxbb )
+ {
+ // For horizontal axes, height of zero corresponds
+ // to character centred on edge so should add 0.5
+ // to height to obtain bounding box edge in
+ // direction away from edge if no exponent. Add
+ // an additional offset to make exponent fit.
+ height_mm = ( height + 1.4 ) * char_height_mm;
+ plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
+ plsc->ypmm + height_mm );
+ string_length_mm = plstrl( string );
+ pos_mm = ( plsc->vppxmi + pos *
+ ( plsc->vppxma - plsc->vppxmi ) ) /
+ plsc->xpmm;
+ plsc->boxbb_xmin = MIN( plsc->boxbb_xmin,
+ pos_mm - string_length_mm );
+ }
+ else
+ {
+ if ( lvy )
+ {
+ plmtex( "lv", height, pos, just, string );
}
+ else
+ {
+ plmtex( "l", height, pos, just, string );
+ }
}
- }
- // Right axis exponent.
- if ( lmy )
- {
- if ( !plsc->label_data )
- {
- height = 3.4; // Extra space for superscript
- pos = 1.0 + offset;
- just = 0.5;
- }
- if ( plsc->if_boxbb )
- {
- // For horizontal axes, height of zero corresponds
- // to character centred on edge so should add 0.5
- // to height to obtain bounding box edge in
- // direction away from edge if no exponent. Add
- // an additional offset to make exponent fit.
- height_mm = ( height + 1.4 ) * char_height_mm;
- plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
- plsc->ypmm + height_mm );
- string_length_mm = plstrl( string );
- pos_mm = ( plsc->vppxmi + pos *
- ( plsc->vppxma - plsc->vppxmi ) ) /
- plsc->xpmm;
- plsc->boxbb_xmax = MAX( plsc->boxbb_xmin,
- pos_mm + string_length_mm );
- }
- else
- {
- if ( lvy )
- {
- plmtex( "rv", height, pos, just, string );
- }
- else
- {
- plmtex( "r", height, pos, just, string );
- }
+ }
+ // Right axis exponent.
+ if ( lmy )
+ {
+ if ( !plsc->label_data )
+ {
+ height = 3.4; // Extra space for superscript
+ pos = 1.0 + offset;
+ just = 0.5;
}
+ if ( plsc->if_boxbb )
+ {
+ // For horizontal axes, height of zero corresponds
+ // to character centred on edge so should add 0.5
+ // to height to obtain bounding box edge in
+ // direction away from edge if no exponent. Add
+ // an additional offset to make exponent fit.
+ height_mm = ( height + 1.4 ) * char_height_mm;
+ plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
+ plsc->ypmm + height_mm );
+ string_length_mm = plstrl( string );
+ pos_mm = ( plsc->vppxmi + pos *
+ ( plsc->vppxma - plsc->vppxmi ) ) /
+ plsc->xpmm;
+ plsc->boxbb_xmax = MAX( plsc->boxbb_xmin,
+ pos_mm + string_length_mm );
+ }
+ else
+ {
+ if ( lvy )
+ {
+ plmtex( "rv", height, pos, just, string );
+ }
+ else
+ {
+ plmtex( "r", height, pos, just, string );
+ }
+ }
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2013-06-06 21:44:36
|
Revision: 12372
http://sourceforge.net/p/plplot/code/12372
Author: andrewross
Date: 2013-06-06 21:44:33 +0000 (Thu, 06 Jun 2013)
Log Message:
-----------
Style recent changes.
Modified Paths:
--------------
trunk/bindings/c++/plstream.cc
trunk/bindings/java/PLStream.java
trunk/bindings/java/plplotjavac.i
trunk/bindings/octave/plplot_octave.h.in
trunk/bindings/octave/plplot_octave.i
trunk/bindings/python/plplot_widgetmodule.c
trunk/bindings/python/plplotcmodule.i
trunk/bindings/swig-support/plplotcapi.i
trunk/examples/c++/x15.cc
trunk/examples/c++/x16.cc
trunk/examples/c++/x33.cc
trunk/examples/java/x16.java
trunk/examples/java/x33.java
Modified: trunk/bindings/c++/plstream.cc
===================================================================
--- trunk/bindings/c++/plstream.cc 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/bindings/c++/plstream.cc 2013-06-06 21:44:33 UTC (rev 12372)
@@ -1398,7 +1398,7 @@
{
set_stream();
- plgcmap1_range( &min_color, &max_color);
+ plgcmap1_range( &min_color, &max_color );
}
// Set color map 0 colors by 8 bit RGB values
Modified: trunk/bindings/java/PLStream.java
===================================================================
--- trunk/bindings/java/PLStream.java 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/bindings/java/PLStream.java 2013-06-06 21:44:33 UTC (rev 12372)
@@ -555,28 +555,28 @@
}
- public void colorbar( double[] p_colorbar_width,
- double[] p_colorbar_height,
- int opt, int position, double x, double y,
- double x_length, double y_length,
- int bg_color, int bb_color, int bb_style,
- double low_cap_color, double high_cap_color,
- int cont_color, double cont_width,
- int[] label_opts, String[] labels,
- String[] axis_opts,
- double[] ticks, int[] sub_ticks,
- int[] n_values, double[][] values )
- {
- if ( set_stream() == -1 ) return;
- plplotjavac.plcolorbar( p_colorbar_width, p_colorbar_height,
- opt, position, x, y, x_length, y_length,
- bg_color, bb_color, bb_style,
- low_cap_color, high_cap_color,
- cont_color, cont_width,
- label_opts, labels, axis_opts,
- ticks, sub_ticks,
- n_values, values );
- }
+ public void colorbar( double[] p_colorbar_width,
+ double[] p_colorbar_height,
+ int opt, int position, double x, double y,
+ double x_length, double y_length,
+ int bg_color, int bb_color, int bb_style,
+ double low_cap_color, double high_cap_color,
+ int cont_color, double cont_width,
+ int[] label_opts, String[] labels,
+ String[] axis_opts,
+ double[] ticks, int[] sub_ticks,
+ int[] n_values, double[][] values )
+ {
+ if ( set_stream() == -1 ) return;
+ plplotjavac.plcolorbar( p_colorbar_width, p_colorbar_height,
+ opt, position, x, y, x_length, y_length,
+ bg_color, bb_color, bb_style,
+ low_cap_color, high_cap_color,
+ cont_color, cont_width,
+ label_opts, labels, axis_opts,
+ ticks, sub_ticks,
+ n_values, values );
+ }
public void lightsource( double x, double y, double z )
Modified: trunk/bindings/java/plplotjavac.i
===================================================================
--- trunk/bindings/java/plplotjavac.i 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/bindings/java/plplotjavac.i 2013-06-06 21:44:33 UTC (rev 12372)
@@ -582,17 +582,18 @@
// Set X and Y length for later consistency checking
%typemap( in ) const PLINT * ArrayN {
- int i;
+ int i;
jint *jydata = ( *jenv )->GetIntArrayElements( jenv, $input, 0 );
if ( ( *jenv )->GetArrayLength( jenv, $input ) != Alen )
{
- printf( "Vectors must be same length.\n" );
- return;
+ printf( "Vectors must be same length.\n" );
+ return;
}
Xlen = ( *jenv )->GetArrayLength( jenv, $input );
Ylen = -1;
- for ( i = 0; i < Xlen ; i++ )
- if (jydata[i] > Ylen) Ylen = jydata[i];
+ for ( i = 0; i < Xlen; i++ )
+ if ( jydata[i] > Ylen )
+ Ylen = jydata[i];
setup_array_1d_i( &$1, jydata, Alen );
( *jenv )->ReleaseIntArrayElements( jenv, $input, jydata, 0 );
}
@@ -1971,8 +1972,8 @@
{
int size = ( *jenv )->GetArrayLength( jenv, $input );
Alen = size;
- $1 = size;
- $2 = (char **) malloc( Alen * sizeof ( char * ) );
+ $1 = size;
+ $2 = (char **) malloc( Alen * sizeof ( char * ) );
// make a copy of each string
for ( i = 0; i < Alen; i++ )
{
Modified: trunk/bindings/octave/plplot_octave.h.in
===================================================================
--- trunk/bindings/octave/plplot_octave.h.in 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/bindings/octave/plplot_octave.h.in 2013-06-06 21:44:33 UTC (rev 12372)
@@ -1810,42 +1810,43 @@
} //%name plimagefr2 //%input a(nx,ny), xg(nx+1,ny+1), yg(nx+1,ny+1)
void plcolorbar( PLFLT *p_colorbar_width, PLFLT *p_colorbar_height,
- PLINT opt, PLINT position, PLFLT x, PLFLT y,
- PLFLT x_length, PLFLT y_length,
- PLINT bg_color, PLINT bb_color, PLINT bb_style,
- PLFLT low_cap_color, PLFLT high_cap_color,
- PLINT cont_color, PLFLT cont_width,
- PLINT n_labels, const PLINT *label_opts, const char * const *label,
- PLINT n_axes, const char * const * axis_opts,
- const PLFLT *ticks, const PLINT *sub_ticks,
- const PLINT *n_values, const PLFLT * const *values ) // %nowrap
+ PLINT opt, PLINT position, PLFLT x, PLFLT y,
+ PLFLT x_length, PLFLT y_length,
+ PLINT bg_color, PLINT bb_color, PLINT bb_style,
+ PLFLT low_cap_color, PLFLT high_cap_color,
+ PLINT cont_color, PLFLT cont_width,
+ PLINT n_labels, const PLINT *label_opts, const char * const *label,
+ PLINT n_axes, const char * const * axis_opts,
+ const PLFLT *ticks, const PLINT *sub_ticks,
+ const PLINT *n_values, const PLFLT * const *values ) // %nowrap
void my_plcolorbar( PLFLT *p_colorbar_width, PLFLT *p_colorbar_height,
- PLINT opt, PLINT position, PLFLT x, PLFLT y,
- PLFLT x_length, PLFLT y_length,
- PLINT bg_color, PLINT bb_color, PLINT bb_style,
- PLFLT low_cap_color, PLFLT high_cap_color,
- PLINT cont_color, PLFLT cont_width,
- PLINT n_labels, const PLINT *label_opts, const char * const *label,
- PLINT nx, const char * const * axis_opts,
- const PLFLT *ticks, const PLINT *sub_ticks,
- const PLINT *n_values, const PLFLT *a )
+ PLINT opt, PLINT position, PLFLT x, PLFLT y,
+ PLFLT x_length, PLFLT y_length,
+ PLINT bg_color, PLINT bb_color, PLINT bb_style,
+ PLFLT low_cap_color, PLFLT high_cap_color,
+ PLINT cont_color, PLFLT cont_width,
+ PLINT n_labels, const PLINT *label_opts, const char * const *label,
+ PLINT nx, const char * const * axis_opts,
+ const PLFLT *ticks, const PLINT *sub_ticks,
+ const PLINT *n_values, const PLFLT *a )
{
PLINT ny, i;
ny = -1;
- for ( i = 0; i < nx ; i++ )
- if ( n_values[i] < ny ) ny = n_values[i];
+ for ( i = 0; i < nx; i++ )
+ if ( n_values[i] < ny )
+ ny = n_values[i];
f2c( a, aa, nx, ny );
- c_plcolorbar(p_colorbar_width, p_colorbar_height,
- opt, position, x, y,
- x_length, y_length,
- bg_color, bb_color, bb_style,
- low_cap_color, high_cap_color,
- cont_color, cont_width,
- n_labels, label_opts, label,
- nx, axis_opts,
- ticks, sub_ticks,
- n_values, aa);
+ c_plcolorbar( p_colorbar_width, p_colorbar_height,
+ opt, position, x, y,
+ x_length, y_length,
+ bg_color, bb_color, bb_style,
+ low_cap_color, high_cap_color,
+ cont_color, cont_width,
+ n_labels, label_opts, label,
+ nx, axis_opts,
+ ticks, sub_ticks,
+ n_values, aa );
} //%name plcolorbar //%input a(nx,ny)
#ifdef __cplusplus
Modified: trunk/bindings/octave/plplot_octave.i
===================================================================
--- trunk/bindings/octave/plplot_octave.i 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/bindings/octave/plplot_octave.i 2013-06-06 21:44:33 UTC (rev 12372)
@@ -355,7 +355,8 @@
_cvt_double_to( $1, &temp( 0, 0 ), Alen );
Ylen = -1;
for ( i = 0; i < Xlen; i++ )
- if ( $1[i] > Ylen ) Ylen = $1[i];
+ if ( $1[i] > Ylen )
+ Ylen = $1[i];
}
%typemap( freearg ) ( const PLINT * ArrayN )
{
@@ -1024,7 +1025,8 @@
}
// No count but check consistency with previous
-%typemap( in ) (PLINT n, const char **Array) {
+%typemap( in ) ( PLINT n, const char **Array )
+{
charMatrix temp_matrix;
Cell temp_cell;
char *tmp_cstring;
@@ -1038,7 +1040,7 @@
if ( !$input.is_empty() )
{
Alen = _dim( $input, 0 );
- $1 = Alen;
+ $1 = Alen;
$2 = new char*[Alen];
ifcell = $input.is_cell();
if ( ifcell )
@@ -1117,7 +1119,8 @@
$2 = NULL;
}
}
-%typemap( freearg ) (PLINT n, const char **Array) {
+%typemap( freearg ) ( PLINT n, const char **Array )
+{
int i;
if ( $2 != NULL )
{
@@ -1784,46 +1787,47 @@
%{
void my_plcolorbar( PLFLT *p_colorbar_width, PLFLT *p_colorbar_height,
- PLINT opt, PLINT position, PLFLT x, PLFLT y,
- PLFLT x_length, PLFLT y_length,
- PLINT bg_color, PLINT bb_color, PLINT bb_style,
- PLFLT low_cap_color, PLFLT high_cap_color,
- PLINT cont_color, PLFLT cont_width,
- PLINT n_labels, const PLINT *label_opts, const char **label,
- PLINT n_axes, const char ** axis_opts,
- const PLFLT *ticks, const PLINT *sub_ticks,
- const PLINT *n_values, const PLFLT *a )
+ PLINT opt, PLINT position, PLFLT x, PLFLT y,
+ PLFLT x_length, PLFLT y_length,
+ PLINT bg_color, PLINT bb_color, PLINT bb_style,
+ PLFLT low_cap_color, PLFLT high_cap_color,
+ PLINT cont_color, PLFLT cont_width,
+ PLINT n_labels, const PLINT *label_opts, const char **label,
+ PLINT n_axes, const char ** axis_opts,
+ const PLFLT *ticks, const PLINT *sub_ticks,
+ const PLINT *n_values, const PLFLT *a )
{
PLINT nx, ny, i;
- nx = n_axes;
- ny = -1;
- for ( i = 0; i < nx ; i++ )
- if ( n_values[i] > ny ) ny = n_values[i];
- f2c( a, aa, nx, ny );
- c_plcolorbar(p_colorbar_width, p_colorbar_height,
- opt, position, x, y,
- x_length, y_length,
- bg_color, bb_color, bb_style,
- low_cap_color, high_cap_color,
- cont_color, cont_width,
- n_labels, label_opts, label,
- n_axes, axis_opts,
- ticks, sub_ticks,
- n_values, aa);
+ nx = n_axes;
+ ny = -1;
+ for ( i = 0; i < nx; i++ )
+ if ( n_values[i] > ny )
+ ny = n_values[i];
+ f2c( a, aa, nx, ny );
+ c_plcolorbar( p_colorbar_width, p_colorbar_height,
+ opt, position, x, y,
+ x_length, y_length,
+ bg_color, bb_color, bb_style,
+ low_cap_color, high_cap_color,
+ cont_color, cont_width,
+ n_labels, label_opts, label,
+ n_axes, axis_opts,
+ ticks, sub_ticks,
+ n_values, aa );
}
%}
void my_plcolorbar( PLFLT *OUTPUT, PLFLT *OUTPUT,
- PLINT opt, PLINT position, PLFLT x, PLFLT y,
- PLFLT x_length, PLFLT y_length,
- PLINT bg_color, PLINT bb_color, PLINT bb_style,
- PLFLT low_cap_color, PLFLT high_cap_color,
- PLINT cont_color, PLFLT cont_width,
- PLINT n, const PLINT *Array, const char **ArrayCk,
- PLINT n, const char **Array,
- const PLFLT *ArrayCk, const PLINT *ArrayCk,
- const PLINT *ArrayN , const PLFLT *MatrixCk );
+ PLINT opt, PLINT position, PLFLT x, PLFLT y,
+ PLFLT x_length, PLFLT y_length,
+ PLINT bg_color, PLINT bb_color, PLINT bb_style,
+ PLFLT low_cap_color, PLFLT high_cap_color,
+ PLINT cont_color, PLFLT cont_width,
+ PLINT n, const PLINT *Array, const char **ArrayCk,
+ PLINT n, const char **Array,
+ const PLFLT *ArrayCk, const PLINT *ArrayCk,
+ const PLINT *ArrayN, const PLFLT *MatrixCk );
// Probably never deal with this one.
%ignore plMinMax2dGrid;
Modified: trunk/bindings/python/plplot_widgetmodule.c
===================================================================
--- trunk/bindings/python/plplot_widgetmodule.c 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/bindings/python/plplot_widgetmodule.c 2013-06-06 21:44:33 UTC (rev 12372)
@@ -1,6 +1,6 @@
// C code to create dynamically loaded library to implement plplot_widget module
-#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
+#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <Python.h>
#include <arrayobject.h>
#include "plplot.h"
Modified: trunk/bindings/python/plplotcmodule.i
===================================================================
--- trunk/bindings/python/plplotcmodule.i 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/bindings/python/plplotcmodule.i 2013-06-06 21:44:33 UTC (rev 12372)
@@ -45,7 +45,7 @@
%include typemaps.i
%{
-#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
+#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <arrayobject.h>
#include "plplot.h"
#include "plplotP.h"
@@ -143,8 +143,8 @@
tmp = (PyArrayObject *) myIntArray_ContiguousFromObject( $input, NPY_PLINT, 1, 1 );
if ( tmp == NULL )
return NULL;
- $1 = Alen = PyArray_DIMS(tmp)[0];
- $2 = (PLINT *) PyArray_DATA(tmp);
+ $1 = Alen = PyArray_DIMS( tmp )[0];
+ $2 = (PLINT *) PyArray_DATA( tmp );
}
%typemap( freearg ) ( PLINT n, const PLINT * Array )
{
@@ -157,13 +157,13 @@
tmp = (PyArrayObject *) myIntArray_ContiguousFromObject( $input, NPY_PLINT, 1, 1 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] != Alen )
+ if ( PyArray_DIMS( tmp )[0] != Alen )
{
PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
return NULL;
}
- $2 = PyArray_DIMS(tmp)[0];
- $1 = (PLINT *) PyArray_DATA(tmp);
+ $2 = PyArray_DIMS( tmp )[0];
+ $1 = (PLINT *) PyArray_DATA( tmp );
}
%typemap( freearg ) ( const PLINT * ArrayCk, PLINT n )
{
@@ -176,12 +176,12 @@
tmp = (PyArrayObject *) myIntArray_ContiguousFromObject( $input, NPY_PLINT, 1, 1 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] != Alen )
+ if ( PyArray_DIMS( tmp )[0] != Alen )
{
PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
return NULL;
}
- $1 = (PLINT *) PyArray_DATA(tmp);
+ $1 = (PLINT *) PyArray_DATA( tmp );
}
%typemap( freearg ) const PLINT * ArrayCk { Py_DECREF( tmp$argnum );}
@@ -191,12 +191,12 @@
tmp = (PyArrayObject *) myIntArray_ContiguousFromObject( $input, NPY_PLINT, 1, 1 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] != Alen )
+ if ( PyArray_DIMS( tmp )[0] != Alen )
{
PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
return NULL;
}
- $1 = (PLINT *) PyArray_DATA(tmp);
+ $1 = (PLINT *) PyArray_DATA( tmp );
}
%typemap( freearg ) const PLINT * ArrayCkNull { Py_DECREF( tmp$argnum );}
@@ -206,12 +206,12 @@
tmp = (PyArrayObject *) myIntArray_ContiguousFromObject( $input, NPY_PLINT, 1, 1 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] < Alen - 1 )
+ if ( PyArray_DIMS( tmp )[0] < Alen - 1 )
{
PyErr_SetString( PyExc_ValueError, "Vector must be at least length of others minus 1." );
return NULL;
}
- $1 = (PLINT *) PyArray_DATA(tmp);
+ $1 = (PLINT *) PyArray_DATA( tmp );
}
%typemap( freearg ) const PLINT * ArrayCkMinus1 { Py_DECREF( tmp$argnum );}
@@ -220,12 +220,12 @@
tmp = (PyArrayObject *) myIntArray_ContiguousFromObject( $input, NPY_PLINT, 1, 1 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] < Alen - 1 )
+ if ( PyArray_DIMS( tmp )[0] < Alen - 1 )
{
PyErr_SetString( PyExc_ValueError, "Vector must be at least length of others minus 1." );
return NULL;
}
- $1 = (PLINT *) PyArray_DATA(tmp);
+ $1 = (PLINT *) PyArray_DATA( tmp );
}
%typemap( freearg ) const PLINT * ArrayCkMinus1Null { Py_DECREF( tmp$argnum );}
@@ -235,8 +235,8 @@
tmp = (PyArrayObject *) myIntArray_ContiguousFromObject( $input, NPY_PLINT, 1, 1 );
if ( tmp == NULL )
return NULL;
- Alen = PyArray_DIMS(tmp)[0];
- $1 = (PLINT *) PyArray_DATA(tmp);
+ Alen = PyArray_DIMS( tmp )[0];
+ $1 = (PLINT *) PyArray_DATA( tmp );
}
%typemap( freearg ) const PLINT * Array { Py_DECREF( tmp$argnum );}
@@ -247,16 +247,17 @@
tmp = (PyArrayObject *) myIntArray_ContiguousFromObject( $input, NPY_PLINT, 1, 1 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] != Alen )
+ if ( PyArray_DIMS( tmp )[0] != Alen )
{
PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
return NULL;
}
- Xlen = PyArray_DIMS(tmp)[0];
- $1 = (PLINT *) PyArray_DATA(tmp);
+ Xlen = PyArray_DIMS( tmp )[0];
+ $1 = (PLINT *) PyArray_DATA( tmp );
Ylen = -1;
for ( i = 0; i < Xlen; i++ )
- if ( $1[i] > Ylen ) Ylen = $1[i];
+ if ( $1[i] > Ylen )
+ Ylen = $1[i];
}
%typemap( freearg ) const PLINT * ArrayN { Py_DECREF( tmp$argnum );}
@@ -297,8 +298,8 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- $1 = Alen = PyArray_DIMS(tmp)[0];
- $2 = (PLFLT *) PyArray_DATA(tmp);
+ $1 = Alen = PyArray_DIMS( tmp )[0];
+ $2 = (PLFLT *) PyArray_DATA( tmp );
}
%typemap( freearg ) ( PLINT n, const PLFLT * Array )
{
@@ -311,13 +312,13 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] != Alen )
+ if ( PyArray_DIMS( tmp )[0] != Alen )
{
PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
return NULL;
}
- $1 = (PLFLT *) PyArray_DATA(tmp);
- $2 = PyArray_DIMS(tmp)[0];
+ $1 = (PLFLT *) PyArray_DATA( tmp );
+ $2 = PyArray_DIMS( tmp )[0];
}
%typemap( freearg ) ( const PLFLT * ArrayCk, PLINT n )
{
@@ -330,12 +331,12 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] != Alen )
+ if ( PyArray_DIMS( tmp )[0] != Alen )
{
PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
return NULL;
}
- $1 = (PLFLT *) PyArray_DATA(tmp);
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
%typemap( freearg ) const PLFLT * ArrayCk { Py_DECREF( tmp$argnum );}
@@ -345,12 +346,12 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] != Alen )
+ if ( PyArray_DIMS( tmp )[0] != Alen )
{
PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
return NULL;
}
- $1 = (PLFLT *) PyArray_DATA(tmp);
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
%typemap( freearg ) const PLFLT * ArrayCkNull { Py_DECREF( tmp$argnum );}
@@ -360,12 +361,12 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] != Xlen )
+ if ( PyArray_DIMS( tmp )[0] != Xlen )
{
PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
return NULL;
}
- $1 = (PLFLT *) PyArray_DATA(tmp);
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
%typemap( freearg ) const PLFLT * ArrayCkX { Py_DECREF( tmp$argnum );}
@@ -375,12 +376,12 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] != Ylen )
+ if ( PyArray_DIMS( tmp )[0] != Ylen )
{
PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
return NULL;
}
- $1 = (PLFLT *) PyArray_DATA(tmp);
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
%typemap( freearg ) const PLFLT * ArrayCkY { Py_DECREF( tmp$argnum );}
@@ -390,9 +391,9 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- Xlen = PyArray_DIMS(tmp)[0];
+ Xlen = PyArray_DIMS( tmp )[0];
$2 = Xlen;
- $1 = (PLFLT *) PyArray_DATA(tmp);
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
%typemap( freearg ) ( const PLFLT * ArrayX, PLINT nx )
{
@@ -405,8 +406,8 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- Xlen = PyArray_DIMS(tmp)[0];
- $1 = (PLFLT *) PyArray_DATA(tmp);
+ Xlen = PyArray_DIMS( tmp )[0];
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
%typemap( freearg ) const PLFLT * ArrayX { Py_DECREF( tmp$argnum );}
@@ -416,9 +417,9 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- Ylen = PyArray_DIMS(tmp)[0];
+ Ylen = PyArray_DIMS( tmp )[0];
$2 = Ylen;
- $1 = (PLFLT *) PyArray_DATA(tmp);
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
%typemap( freearg ) ( const PLFLT * ArrayY, PLINT ny )
{
@@ -431,8 +432,8 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- Ylen = PyArray_DIMS(tmp)[0];
- $1 = (PLFLT *) PyArray_DATA(tmp);
+ Ylen = PyArray_DIMS( tmp )[0];
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
%typemap( freearg ) const PLFLT * ArrayY { Py_DECREF( tmp$argnum );}
@@ -443,8 +444,8 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- $2 = PyArray_DIMS(tmp)[0];
- $1 = (PLFLT *) PyArray_DATA(tmp);
+ $2 = PyArray_DIMS( tmp )[0];
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
%typemap( freearg ) ( const PLFLT * Array, PLINT n )
{
@@ -457,8 +458,8 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- Alen = PyArray_DIMS(tmp)[0];
- $1 = (PLFLT *) PyArray_DATA(tmp);
+ Alen = PyArray_DIMS( tmp )[0];
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
%typemap( freearg ) const PLFLT * Array { Py_DECREF( tmp$argnum );}
@@ -469,17 +470,17 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 2, 2 );
if ( tmp == NULL )
return NULL;
- if ( Xlen != PyArray_DIMS(tmp)[0] || Ylen != PyArray_DIMS(tmp)[1] )
+ if ( Xlen != PyArray_DIMS( tmp )[0] || Ylen != PyArray_DIMS( tmp )[1] )
{
PyErr_SetString( PyExc_ValueError, "Vectors must match matrix." );
return NULL;
}
- $2 = PyArray_DIMS(tmp)[0];
- $3 = PyArray_DIMS(tmp)[1];
+ $2 = PyArray_DIMS( tmp )[0];
+ $3 = PyArray_DIMS( tmp )[1];
size = sizeof ( PLFLT ) * $3;
$1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * $2 );
for ( i = 0; i < $2; i++ )
- $1[i] = (PLFLT *) ( PyArray_DATA(tmp) + i * size );
+ $1[i] = (PLFLT *) ( PyArray_DATA( tmp ) + i * size );
}
%typemap( freearg ) ( const PLFLT * *MatrixCk, PLINT nx, PLINT ny )
{
@@ -494,12 +495,12 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 2, 2 );
if ( tmp == NULL )
return NULL;
- Xlen = $2 = PyArray_DIMS(tmp)[0];
- Ylen = $3 = PyArray_DIMS(tmp)[1];
+ Xlen = $2 = PyArray_DIMS( tmp )[0];
+ Ylen = $3 = PyArray_DIMS( tmp )[1];
size = sizeof ( PLFLT ) * $3;
$1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * $2 );
for ( i = 0; i < $2; i++ )
- $1[i] = (PLFLT *) ( PyArray_DATA(tmp) + i * size );
+ $1[i] = (PLFLT *) ( PyArray_DATA( tmp ) + i * size );
}
%typemap( freearg ) ( const PLFLT * *Matrix, PLINT nx, PLINT ny )
{
@@ -514,12 +515,12 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 2, 2 );
if ( tmp == NULL )
return NULL;
- Xlen = PyArray_DIMS(tmp)[0];
- Ylen = PyArray_DIMS(tmp)[1];
+ Xlen = PyArray_DIMS( tmp )[0];
+ Ylen = PyArray_DIMS( tmp )[1];
size = sizeof ( PLFLT ) * Ylen;
$1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * Xlen );
for ( i = 0; i < Xlen; i++ )
- $1[i] = (PLFLT *) ( PyArray_DATA(tmp) + i * size );
+ $1[i] = (PLFLT *) ( PyArray_DATA( tmp ) + i * size );
}
%typemap( freearg ) const PLFLT * *Matrix {
Py_DECREF( tmp$argnum );
@@ -532,9 +533,9 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 2, 2 );
if ( tmp == NULL )
return NULL;
- Xlen = $2 = PyArray_DIMS(tmp)[0];
- Ylen = $3 = PyArray_DIMS(tmp)[1];
- $1 = (PLFLT *) PyArray_DATA(tmp);
+ Xlen = $2 = PyArray_DIMS( tmp )[0];
+ Ylen = $3 = PyArray_DIMS( tmp )[1];
+ $1 = (PLFLT *) PyArray_DATA( tmp );
}
%typemap( freearg ) ( const PLFLT * Matrix, PLINT nx, PLINT ny )
{
@@ -548,7 +549,7 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 2, 2 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] != Xlen || PyArray_DIMS(tmp)[1] != Ylen )
+ if ( PyArray_DIMS( tmp )[0] != Xlen || PyArray_DIMS( tmp )[1] != Ylen )
{
PyErr_SetString( PyExc_ValueError, "Vectors must match matrix." );
return NULL;
@@ -556,7 +557,7 @@
size = sizeof ( PLFLT ) * Ylen;
$1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * Xlen );
for ( i = 0; i < Xlen; i++ )
- $1[i] = (PLFLT *) ( PyArray_DATA(tmp) + i * size );
+ $1[i] = (PLFLT *) ( PyArray_DATA( tmp ) + i * size );
}
%typemap( freearg ) const PLFLT * *MatrixCk {
Py_DECREF( tmp$argnum );
@@ -571,7 +572,7 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 2, 2 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] != Xlen || PyArray_DIMS(tmp)[1] != Ylen )
+ if ( PyArray_DIMS( tmp )[0] != Xlen || PyArray_DIMS( tmp )[1] != Ylen )
{
PyErr_SetString( PyExc_ValueError, "Vectors must match matrix." );
return NULL;
@@ -579,7 +580,7 @@
size = sizeof ( PLFLT ) * Ylen;
$1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * Xlen );
for ( i = 0; i < Xlen; i++ )
- $1[i] = (PLFLT *) ( PyArray_DATA(tmp) + i * size );
+ $1[i] = (PLFLT *) ( PyArray_DATA( tmp ) + i * size );
}
%typemap( freearg ) PLFLT * *OutMatrixCk {
Py_DECREF( tmp$argnum );
@@ -596,9 +597,9 @@
tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, NPY_PLFLT, 1, 1 );
if ( tmp == NULL )
return NULL;
- Ylen = PyArray_DIMS(tmp)[0];
+ Ylen = PyArray_DIMS( tmp )[0];
$2 = Ylen;
- $1 = (PLFLT *) PyArray_DATA(tmp);
+ $1 = (PLFLT *) PyArray_DATA( tmp );
// Make created 2D array have dimensions from prior ArrayX in the argument
// list and this ArrayY.
dims[0] = Xlen;
@@ -631,7 +632,7 @@
tmp = (PyArrayObject *) PyArray_ContiguousFromObject( $input, NPY_STRING, 1, 1 );
if ( tmp == NULL )
return NULL;
- if ( PyArray_DIMS(tmp)[0] != Alen )
+ if ( PyArray_DIMS( tmp )[0] != Alen )
{
PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
return NULL;
@@ -639,7 +640,7 @@
$1 = (char **) malloc( sizeof ( char* ) * Alen );
for ( i = 0; i < Alen; i++ )
{
- $1[i] = PyArray_DATA(tmp) + i * PyArray_STRIDES(tmp)[0];
+ $1[i] = PyArray_DATA( tmp ) + i * PyArray_STRIDES( tmp )[0];
if ( $1[i] == NULL )
{
free( $1 );
@@ -650,18 +651,18 @@
%typemap( freearg ) const char **ArrayCk { Py_DECREF( tmp$argnum ); free( $1 );}
// With count. Always allow NULL strings.
-%typemap( in ) (PLINT n, const char **Array) ( PyArrayObject * tmp )
+%typemap( in ) ( PLINT n, const char **Array ) ( PyArrayObject * tmp )
{
int i;
tmp = (PyArrayObject *) PyArray_ContiguousFromObject( $input, NPY_STRING, 1, 1 );
if ( tmp == NULL )
return NULL;
- Alen = PyArray_DIMS(tmp)[0];
+ Alen = PyArray_DIMS( tmp )[0];
$1 = Alen;
- $2 = (char **) malloc( sizeof ( char* ) * Alen );
+ $2 = (char **) malloc( sizeof ( char* ) * Alen );
for ( i = 0; i < Alen; i++ )
{
- $2[i] = PyArray_DATA(tmp) + i * PyArray_STRIDES(tmp)[0];
+ $2[i] = PyArray_DATA( tmp ) + i * PyArray_STRIDES( tmp )[0];
if ( $2[i] == NULL )
{
free( $2 );
@@ -669,7 +670,10 @@
}
}
}
-%typemap( freearg ) (PLINT n, const char **Array) { Py_DECREF( tmp$argnum ); free( $2 );}
+%typemap( freearg ) ( PLINT n, const char **Array )
+{
+ Py_DECREF( tmp$argnum ); free( $2 );
+}
//**************************
// String returning functions
@@ -732,8 +736,8 @@
PyErr_SetString( PyExc_ValueError, "Expected a sequence to two 1D arrays." );
return NULL;
}
- tmpGrid1.nx = PyArray_DIMS(pltr_xg)[0];
- tmpGrid1.ny = PyArray_DIMS(pltr_yg)[0];
+ tmpGrid1.nx = PyArray_DIMS( pltr_xg )[0];
+ tmpGrid1.ny = PyArray_DIMS( pltr_yg )[0];
if ( isimg == 0 )
{
if ( Xlen != tmpGrid1.nx || Ylen != tmpGrid1.ny )
@@ -750,8 +754,8 @@
return NULL;
}
}
- tmpGrid1.xg = (PLFLT *) PyArray_DATA(pltr_xg);
- tmpGrid1.yg = (PLFLT *) PyArray_DATA(pltr_yg);
+ tmpGrid1.xg = (PLFLT *) PyArray_DATA( pltr_xg );
+ tmpGrid1.yg = (PLFLT *) PyArray_DATA( pltr_yg );
return &tmpGrid1;
}
@@ -780,14 +784,14 @@
PyErr_SetString( PyExc_ValueError, "Expected a sequence of two 2D arrays." );
return NULL;
}
- if ( PyArray_DIMS(pltr_xg)[0] != PyArray_DIMS(pltr_yg)[0] ||
- PyArray_DIMS(pltr_xg)[1] != PyArray_DIMS(pltr_yg)[1] )
+ if ( PyArray_DIMS( pltr_xg )[0] != PyArray_DIMS( pltr_yg )[0] ||
+ PyArray_DIMS( pltr_xg )[1] != PyArray_DIMS( pltr_yg )[1] )
{
PyErr_SetString( PyExc_ValueError, "Arrays must be same size." );
return NULL;
}
- tmpGrid2.nx = PyArray_DIMS(pltr_xg)[0];
- tmpGrid2.ny = PyArray_DIMS(pltr_xg)[1];
+ tmpGrid2.nx = PyArray_DIMS( pltr_xg )[0];
+ tmpGrid2.ny = PyArray_DIMS( pltr_xg )[1];
if ( isimg == 0 )
{
if ( Xlen != tmpGrid2.nx || Ylen != tmpGrid2.ny )
@@ -807,10 +811,10 @@
size = sizeof ( PLFLT ) * tmpGrid2.ny;
tmpGrid2.xg = (PLFLT **) malloc( sizeof ( PLFLT* ) * tmpGrid2.nx );
for ( i = 0; i < tmpGrid2.nx; i++ )
- tmpGrid2.xg[i] = (PLFLT *) ( PyArray_DATA(pltr_xg) + i * size );
+ tmpGrid2.xg[i] = (PLFLT *) ( PyArray_DATA( pltr_xg ) + i * size );
tmpGrid2.yg = (PLFLT **) malloc( sizeof ( PLFLT* ) * tmpGrid2.nx );
for ( i = 0; i < tmpGrid2.nx; i++ )
- tmpGrid2.yg[i] = (PLFLT *) ( PyArray_DATA(pltr_yg) + i * size );
+ tmpGrid2.yg[i] = (PLFLT *) ( PyArray_DATA( pltr_yg ) + i * size );
return &tmpGrid2;
}
@@ -960,7 +964,7 @@
else
{
tmp = (PyArrayObject *) myArray_ContiguousFromObject( result, NPY_PLFLT, 1, 1 );
- if ( tmp == 0 || PyArray_DIMS(tmp)[0] != 2 )
+ if ( tmp == 0 || PyArray_DIMS( tmp )[0] != 2 )
{
fprintf( stderr, "pltr callback must return a 2 element array or sequence\n" );
PyErr_SetString( PyExc_RuntimeError, "pltr callback must return a 2-sequence." );
@@ -968,7 +972,7 @@
}
else
{
- PLFLT* t = (PLFLT *) PyArray_DATA(tmp);
+ PLFLT* t = (PLFLT *) PyArray_DATA( tmp );
*tx = t[0];
*ty = t[1];
Py_XDECREF( tmp );
@@ -1086,8 +1090,8 @@
// grab the Global Interpreter Lock to be sure threads don't mess us up
MY_BLOCK_THREADS
// build the argument list
- px = PyArray_SimpleNewFromData( 1, &n, NPY_PLFLT, (void *) xt );
- py = PyArray_SimpleNewFromData( 1, &n, NPY_PLFLT, (void *) yt );
+ px = PyArray_SimpleNewFromData( 1, &n, NPY_PLFLT, (void *) xt );
+ py = PyArray_SimpleNewFromData( 1, &n, NPY_PLFLT, (void *) yt );
arglist = Py_BuildValue( "(ddOOO)", x, y, px, py, pdata );
// call the python function
result = PyEval_CallObject( python_ct, arglist );
Modified: trunk/bindings/swig-support/plplotcapi.i
===================================================================
--- trunk/bindings/swig-support/plplotcapi.i 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/bindings/swig-support/plplotcapi.i 2013-06-06 21:44:33 UTC (rev 12372)
@@ -107,14 +107,14 @@
// Flags for pllegend.
-#define PL_LEGEND_NONE 1
-#define PL_LEGEND_COLOR_BOX 2
-#define PL_LEGEND_LINE 4
-#define PL_LEGEND_SYMBOL 8
-#define PL_LEGEND_TEXT_LEFT 16
-#define PL_LEGEND_BACKGROUND 32
-#define PL_LEGEND_BOUNDING_BOX 64
-#define PL_LEGEND_ROW_MAJOR 128
+#define PL_LEGEND_NONE 1
+#define PL_LEGEND_COLOR_BOX 2
+#define PL_LEGEND_LINE 4
+#define PL_LEGEND_SYMBOL 8
+#define PL_LEGEND_TEXT_LEFT 16
+#define PL_LEGEND_BACKGROUND 32
+#define PL_LEGEND_BOUNDING_BOX 64
+#define PL_LEGEND_ROW_MAJOR 128
// Flags for plcolorbar
#define PL_COLORBAR_LABEL_LEFT 0x1
@@ -481,7 +481,7 @@
const PLINT *ArrayCkNull, const PLFLT *ArrayCkNull,
const PLINT *ArrayCkNull, const char **ArrayCk );
-#if defined (SWIG_PYTHON) || defined(SWIG_JAVA) || defined(SWIG_OCTAVE)
+#if defined ( SWIG_PYTHON ) || defined ( SWIG_JAVA ) || defined ( SWIG_OCTAVE )
void
plcolorbar( PLFLT *OUTPUT, PLFLT *OUTPUT,
PLINT opt, PLINT position, PLFLT x, PLFLT y,
@@ -492,7 +492,7 @@
PLINT n, const PLINT *Array, const char **ArrayCk,
PLINT n, const char **Array,
const PLFLT *ArrayCk, const PLINT *ArrayCk,
- const PLINT *ArrayN , const PLFLT **MatrixCk );
+ const PLINT *ArrayN, const PLFLT **MatrixCk );
#endif
void
Modified: trunk/examples/c++/x15.cc
===================================================================
--- trunk/examples/c++/x15.cc 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/examples/c++/x15.cc 2013-06-06 21:44:33 UTC (rev 12372)
@@ -105,7 +105,7 @@
void x15::plot1( PLFLT **z, PLFLT zmin, PLFLT zmax )
{
PLFLT shade_min, shade_max, sh_color;
- int sh_cmap = 0;
+ int sh_cmap = 0;
PLFLT sh_width;
int min_color = 0, max_color = 0;
PLFLT min_width = 0.0, max_width = 0.0;
@@ -145,7 +145,7 @@
void x15::plot2( PLFLT **z, PLFLT zmin, PLFLT zmax )
{
PLFLT shade_min, shade_max, sh_color;
- int sh_cmap = 0;
+ int sh_cmap = 0;
PLFLT sh_width;
int min_color = 0, max_color = 0;
PLFLT min_width = 0.0, max_width = 0.0;
Modified: trunk/examples/c++/x16.cc
===================================================================
--- trunk/examples/c++/x16.cc 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/examples/c++/x16.cc 2013-06-06 21:44:33 UTC (rev 12372)
@@ -139,21 +139,21 @@
x16::x16( int argc, const char ** argv )
{
- int i, j;
- PLFLT x, y, argx, argy, distort, r, t, zmin, zmax;
- PLFLT *px = new PLFLT[PERIMETERPTS];
- PLFLT *py = new PLFLT[PERIMETERPTS];
- PLFLT *xg1 = new PLFLT[nx];
- PLFLT *yg1 = new PLFLT[ny];
- PLFLT **z;
- PLFLT **w;
- PLcGrid cgrid1;
- PLcGrid2 cgrid2;
- PLFLT *clevel = new PLFLT[ns];
- PLFLT *shedge = new PLFLT[ns + 1];
+ int i, j;
+ PLFLT x, y, argx, argy, distort, r, t, zmin, zmax;
+ PLFLT *px = new PLFLT[PERIMETERPTS];
+ PLFLT *py = new PLFLT[PERIMETERPTS];
+ PLFLT *xg1 = new PLFLT[nx];
+ PLFLT *yg1 = new PLFLT[ny];
+ PLFLT **z;
+ PLFLT **w;
+ PLcGrid cgrid1;
+ PLcGrid2 cgrid2;
+ PLFLT *clevel = new PLFLT[ns];
+ PLFLT *shedge = new PLFLT[ns + 1];
const int cont_color = 0;
const PLFLT fill_width = 2.0, cont_width = 0.0;
- PLFLT colorbar_width, colorbar_height;
+ PLFLT colorbar_width, colorbar_height;
#define NUM_AXES 1
PLINT n_axis_opts = NUM_AXES;
Modified: trunk/examples/c++/x33.cc
===================================================================
--- trunk/examples/c++/x33.cc 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/examples/c++/x33.cc 2013-06-06 21:44:33 UTC (rev 12372)
@@ -37,10 +37,10 @@
using namespace std;
#endif
-#define COLORBAR_KINDS 4
+#define COLORBAR_KINDS 4
#define COLORBAR_POSITIONS 4
-#define COLORBAR_LABELS 4
-#define COLORBAR_CAPS 4
+#define COLORBAR_LABELS 4
+#define COLORBAR_CAPS 4
class x33 {
public:
@@ -53,13 +53,13 @@
static const PLINT position_options[16];
static const char *special_symbols[5];
static const PLINT colorbar_option_kinds[COLORBAR_KINDS];
- static const char *colorbar_option_kind_labels[COLORBAR_KINDS];
+ static const char *colorbar_option_kind_labels[COLORBAR_KINDS];
static const PLINT colorbar_position_options[COLORBAR_POSITIONS];
- static const char *colorbar_position_option_labels[COLORBAR_POSITIONS];
+ static const char *colorbar_position_option_labels[COLORBAR_POSITIONS];
static const PLINT colorbar_label_options[COLORBAR_LABELS];
- static const char *colorbar_label_option_labels[COLORBAR_LABELS];
+ static const char *colorbar_label_option_labels[COLORBAR_LABELS];
static const PLINT colorbar_cap_options[COLORBAR_CAPS];
- static const char *colorbar_cap_option_labels[COLORBAR_CAPS];
+ static const char *colorbar_cap_option_labels[COLORBAR_CAPS];
void plcolorbar_example_page( int, int, int, PLINT, PLFLT, PLINT, PLFLT * );
void plcolorbar_example( const char *, int, PLINT, PLFLT, PLINT, PLFLT * );
@@ -105,7 +105,7 @@
PL_COLORBAR_IMAGE,
PL_COLORBAR_GRADIENT
};
-const char *x33::colorbar_option_kind_labels[COLORBAR_KINDS] = {
+const char *x33::colorbar_option_kind_labels[COLORBAR_KINDS] = {
"Shade colorbars",
"Shade colorbars with custom labels",
"Image colorbars",
@@ -119,7 +119,7 @@
PL_POSITION_TOP,
PL_POSITION_BOTTOM
};
-const char *x33::colorbar_position_option_labels[COLORBAR_POSITIONS] = {
+const char *x33::colorbar_position_option_labels[COLORBAR_POSITIONS] = {
"Left",
"Right",
"Top",
@@ -133,7 +133,7 @@
PL_COLORBAR_LABEL_TOP,
PL_COLORBAR_LABEL_BOTTOM
};
-const char *x33::colorbar_label_option_labels[COLORBAR_LABELS] = {
+const char *x33::colorbar_label_option_labels[COLORBAR_LABELS] = {
"Label left",
"Label right",
"Label top",
@@ -147,7 +147,7 @@
PL_COLORBAR_CAP_HIGH,
PL_COLORBAR_CAP_LOW | PL_COLORBAR_CAP_HIGH
};
-const char *x33::colorbar_cap_option_labels[COLORBAR_CAPS] = {
+const char *x33::colorbar_cap_option_labels[COLORBAR_CAPS] = {
"No caps",
"Low cap",
"High cap",
@@ -859,7 +859,7 @@
// Free space that contained legend text.
for ( k = 0; k < MAX_NLEGEND; k++ )
delete [] text[k];
-
+
// Color bar examples
PLFLT values_small[2] = { -1.0e-200, 1.0e-200 };
PLFLT values_uneven[9] = { -1.0e-200, 2.0e-200, 2.6e-200, 3.4e-200, 6.0e-200, 7.0e-200, 8.0e-200, 9.0e-200, 10.0e-200 };
@@ -873,18 +873,18 @@
// We can only test image and gradient colorbars with two element arrays
for ( i = 2; i < COLORBAR_KINDS; i++ )
- {
- plcolorbar_example( "cmap1_blue_yellow.pal", i, 0, 0, 2, values_small );
- }
+ {
+ plcolorbar_example( "cmap1_blue_yellow.pal", i, 0, 0, 2, values_small );
+ }
// Test shade colorbars with larger arrays
for ( i = 0; i < 2; i++ )
- {
- plcolorbar_example( "cmap1_blue_yellow.pal", i, 4, 2, 9, values_even );
- }
+ {
+ plcolorbar_example( "cmap1_blue_yellow.pal", i, 4, 2, 9, values_even );
+ }
for ( i = 0; i < 2; i++ )
- {
- plcolorbar_example( "cmap1_blue_yellow.pal", i, 0, 0, 9, values_uneven );
- }
+ {
+ plcolorbar_example( "cmap1_blue_yellow.pal", i, 0, 0, 9, values_uneven );
+ }
//plend();
delete pls;
Modified: trunk/examples/java/x16.java
===================================================================
--- trunk/examples/java/x16.java 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/examples/java/x16.java 2013-06-06 21:44:33 UTC (rev 12372)
@@ -92,21 +92,21 @@
double[] shedge = new double[NSHADES + 1];
final int cont_color = 0;
final double fill_width = 2., cont_width = 0.;
- double[] colorbar_width = new double[1];
- double[] colorbar_height = new double[1];
+ double[] colorbar_width = new double[1];
+ double[] colorbar_height = new double[1];
- int n_axis_opts = NUM_AXES;
- int[] num_values = new int[NUM_AXES];
- double[][] values = new double[NUM_AXES][NSHADES+1];
- String axis_opts[] = { "bcvtm" };
- double axis_ticks[] = { 0.0 };
- int axis_subticks[] = { 0 };
- double filler_values[] = { 0.0, 1.0 };
-
- int n_labels = NUM_LABELS;
- int label_opts[] = { PL_COLORBAR_LABEL_BOTTOM };
- String labels[] = { "Magnitude" };
+ int n_axis_opts = NUM_AXES;
+ int[] num_values = new int[NUM_AXES];
+ double[][] values = new double[NUM_AXES][NSHADES + 1];
+ String axis_opts[] = { "bcvtm" };
+ double axis_ticks[] = { 0.0 };
+ int axis_subticks[] = { 0 };
+ double filler_values[] = { 0.0, 1.0 };
+ int n_labels = NUM_LABELS;
+ int label_opts[] = { PL_COLORBAR_LABEL_BOTTOM };
+ String labels[] = { "Magnitude" };
+
// Parse and process command line arguments.
pls.parseopts( args, PL_PARSE_FULL | PL_PARSE_NOPROGRAM );
@@ -191,9 +191,10 @@
pls.smin( 0.0, 0.5 );
num_values[0] = NSHADES + 1;
- for ( i = 0; i < NSHADES + 1; i++ ) {
- values[0][i] = shedge[i];
- }
+ for ( i = 0; i < NSHADES + 1; i++ )
+ {
+ values[0][i] = shedge[i];
+ }
pls.colorbar( colorbar_width, colorbar_height,
PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
@@ -240,9 +241,10 @@
pls.smin( 0.0, 0.5 );
num_values[0] = NSHADES + 1;
- for ( i = 0; i < NSHADES + 1; i++ ) {
- values[0][i] = shedge[i];
- }
+ for ( i = 0; i < NSHADES + 1; i++ )
+ {
+ values[0][i] = shedge[i];
+ }
pls.colorbar( colorbar_width, colorbar_height,
PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
@@ -290,9 +292,10 @@
pls.smin( 0.0, 0.5 );
num_values[0] = NSHADES + 1;
- for ( i = 0; i < NSHADES + 1; i++ ) {
- values[0][i] = shedge[i];
- }
+ for ( i = 0; i < NSHADES + 1; i++ )
+ {
+ values[0][i] = shedge[i];
+ }
pls.colorbar( colorbar_width, colorbar_height,
PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
@@ -341,13 +344,14 @@
pls.smin( 0.0, 0.5 );
num_values[0] = NSHADES + 1;
- for ( i = 0; i < NSHADES + 1; i++ ) {
- values[0][i] = shedge[i];
- }
+ for ( i = 0; i < NSHADES + 1; i++ )
+ {
+ values[0][i] = shedge[i];
+ }
pls.colorbar( colorbar_width, colorbar_height,
PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
- 2, 3.0,
+ 2, 3.0,
label_opts, labels,
axis_opts,
axis_ticks, axis_subticks,
@@ -418,9 +422,10 @@
pls.smin( 0.0, 0.5 );
num_values[0] = NSHADES + 1;
- for ( i = 0; i < NSHADES + 1; i++ ) {
- values[0][i] = shedge[i];
- }
+ for ( i = 0; i < NSHADES + 1; i++ )
+ {
+ values[0][i] = shedge[i];
+ }
pls.colorbar( colorbar_width, colorbar_height,
PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL, 0,
0.005, 0.0, 0.0375, 0.875, 0, 1, 1, 0.0, 0.0,
Modified: trunk/examples/java/x33.java
===================================================================
--- trunk/examples/java/x33.java 2013-06-06 21:32:48 UTC (rev 12371)
+++ trunk/examples/java/x33.java 2013-06-06 21:44:33 UTC (rev 12372)
@@ -58,205 +58,205 @@
// plcolorbar options
- static String[] colorbar_option_kind_labels = {
- "Shade colorbars",
- "Shade colorbars with custom labels",
- "Image colorbars",
- "Gradient colorbars"
+ static String[] colorbar_option_kind_labels = {
+ "Shade colorbars",
+ "Shade colorbars with custom labels",
+ "Image colorbars",
+ "Gradient colorbars"
};
- static String[] colorbar_position_option_labels = {
- "Left",
- "Right",
- "Top",
- "Bottom"
+ static String[] colorbar_position_option_labels = {
+ "Left",
+ "Right",
+ "Top",
+ "Bottom"
};
-
- static String[] colorbar_label_option_labels = {
- "Label left",
- "Label right",
- "Label top",
- "Label bottom"
+
+ static String[] colorbar_label_option_labels = {
+ "Label left",
+ "Label right",
+ "Label top",
+ "Label bottom"
};
- static String[] colorbar_cap_option_labels = {
- "No caps",
- "Low cap",
- "High cap",
- "Low and high caps"
+ static String[] colorbar_cap_option_labels = {
+ "No caps",
+ "Low cap",
+ "High cap",
+ "Low and high caps"
};
- final static int COLORBAR_KINDS = 4;
+ final static int COLORBAR_KINDS = 4;
final static int COLORBAR_POSITIONS = 4;
- final static int COLORBAR_LABELS = 4;
- final static int COLORBAR_CAPS = 4;
+ final static int COLORBAR_LABELS = 4;
+ final static int COLORBAR_CAPS = 4;
void plcolorbar_example_page( int kind_i, int label_i, int cap_i, int cont_color, double cont_width, double[] values )
{
- int i;
- // Parameters for the colorbars on this page
- int position_i, position, opt;
- double x, y, x_length, y_length;
- double[] ticks = { 0.0 };
- int[] sub_ticks = { 0 };
- double low_cap_color, high_cap_color;
- boolean vertical, ifn;
- int n_axes = 1;
- String[] axis_opts = new String[1];
- int n_labels = 1;
- int[] label_opts = { 0 };
- String[] label = new String[1];
- String title;
- double[] colorbar_width = new double[1];
- double[] colorbar_height = new double[1];
- int[] n_values_array = new int[1];
- double[][] values_array = new double[1][values.length];
+ int i;
+ // Parameters for the colorbars on this page
+ int position_i, position, opt;
+ double x, y, x_length, y_length;
+ double[] ticks = { 0.0 };
+ int[] sub_ticks = { 0 };
+ double low_cap_color, high_cap_color;
+ boolean vertical, ifn;
+ int n_axes = 1;
+ String[] axis_opts = new String[1];
+ int n_labels = 1;
+ int[] label_opts = { 0 };
+ String[] label = new String[1];
+ String title;
+ double[] colorbar_width = new double[1];
+ double[] colorbar_height = new double[1];
+ int[] n_values_array = new int[1];
+ double[][] values_array = new double[1][values.length];
- // Colorbar type options
- int[] colorbar_option_kinds = {
- PL_COLORBAR_SHADE,
- PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL,
- PL_COLORBAR_IMAGE,
- PL_COLORBAR_GRADIENT
- };
- // Which side of the page are we positioned relative to?
- int[] colorbar_position_options = {
- PL_POSITION_LEFT,
- PL_POSITION_RIGHT,
- PL_POSITION_TOP,
- PL_POSITION_BOTTOM
- };
- // Colorbar label positioning options
- int[] colorbar_label_options = {
- PL_COLORBAR_LABEL_LEFT,
- PL_COLORBAR_LABEL_RIGHT,
- PL_COLORBAR_LABEL_TOP,
- PL_COLORBAR_LABEL_BOTTOM
- };
- // Colorbar cap options
- int[] colorbar_cap_options = {
- PL_COLORBAR_CAP_NONE,
- PL_COLORBAR_CAP_LOW,
- PL_COLORBAR_CAP_HIGH,
- PL_COLORBAR_CAP_LOW | PL_COLORBAR_CAP_HIGH
- };
+ // Colorbar type options
+ int[] colorbar_option_kinds = {
+ PL_COLORBAR_SHADE,
+ PL_COLORBAR_SHADE | PL_COLORBAR_SHADE_LABEL,
+ PL_COLORBAR_IMAGE,
+ PL_COLORBAR_GRADIENT
+ };
+ // Which side of the page are we positioned relative to?
+ int[] colorbar_position_options = {
+ PL_POSITION_LEFT,
+ PL_POSITION_RIGHT,
+ PL_POSITION_TOP,
+ PL_POSITION_BOTTOM
+ };
+ // Colorbar label positioning options
+ int[] colorbar_label_options = {
+ PL_COLORBAR_LABEL_LEFT,
+ PL_COLORBAR_LABEL_RIGHT,
+ PL_COLORBAR_LABEL_TOP,
+ PL_COLORBAR_LABEL_BOTTOM
+ };
+ // Colorbar cap options
+ int[] colorbar_cap_options = {
+ PL_COLORBAR_CAP_NONE,
+ PL_COLORBAR_CAP_LOW,
+ PL_COLORBAR_CAP_HIGH,
+ PL_COLORBAR_CAP_LOW | PL_COLORBAR_CAP_HIGH
+ };
- n_values_array[0] = values.length;
- for ( i = 0; i < n_values_array[0]; i++ )
- values_array[0][i] = values[i];
+ n_values_array[0] = values.length;
+ for ( i = 0; i < n_values_array[0]; i++ )
+ values_array[0][i] = values[i];
- low_cap_color = 0.0;
- high_cap_color = 1.0;
+ low_cap_color = 0.0;
+ high_cap_color = 1.0;
- // Start a new page
- pls.adv( 0 );
+ // Start a new page
+ pls.adv( 0 );
- // Draw one colorbar relative to each side of the page
- for ( position_i = 0; position_i < COLORBAR_POSITIONS; position_i++ )
- {
- position = colorbar_position_options[position_i];
- opt =
- colorbar_option_kinds[kind_i] |
- colorbar_label_options[label_i] |
- colorbar_cap_options[cap_i];
-
- vertical = ((position & PL_POSITION_LEFT) != 0) || ((position & PL_POSITION_RIGHT) != 0);
- ifn = ((position & PL_POSITION_LEFT) != 0) || ((position & PL_POSITION_BOTTOM) != 0);
+ // Draw one colorbar relative to each side of the page
+ for ( position_i = 0; position_i < COLORBAR_POSITIONS; position_i++ )
+ {
+ position = colorbar_position_options[position_i];
+ opt =
+ colorbar_option_kinds[kind_i] |
+ colorbar_label_options[label_i] |
+ colorbar_cap_options[cap_i];
- // Set the offset position on the page
- if ( vertical )
- {
- x = 0.0;
- y = 0.0;
- x_length = 0.05;
- y_length = 0.5;
- }
- else
- {
- x = 0.0;
- y = 0.0;
- x_length = 0.5;
- y_length = 0.05;
- }
+ vertical = ( ( position & PL_POSITION_LEFT ) != 0 ) || ( ( position & PL_POSITION_RIGHT ) != 0 );
+ ifn = ( ( position & PL_POSITION_LEFT ) != 0 ) || ( ( position & PL_POSITION_BOTTOM ) != 0 );
- // Set appropriate labelling options.
- if ( ifn )
+ // Set the offset position on the page
+ if ( vertical )
{
- if ( cont_color == 0 || cont_width == 0. )
+ x = 0.0;
+ y = 0.0;
+ x_length = 0.05;
+ y_length = 0.5;
+ }
+ else
+ {
+ x = 0.0;
+ y = 0.0;
+ x_length = 0.5;
+ y_length = 0.05;
+ }
+
+ // Set appropriate labelling options.
+ if ( ifn )
+ {
+ if ( cont_color == 0 || cont_width == 0. )
{
- axis_opts[0] = "uwtivn";
- }
- else
- {
- axis_opts[0] = "uwxvn";
- }
- }
- else
+ axis_opts[0] = "uwtivn";
+ }
+ else
+ {
+ axis_opts[0] = "uwxvn";
+ }
+ }
+ else
{
- if ( cont_color == 0 || cont_width == 0. )
- {
- axis_opts[0] = "uwtivm";
- }
- else
+ if ( cont_color == 0 || cont_width == 0. )
{
- axis_opts[0] = "uwxvm";
- }
- }
-
- label[0] = colorbar_position_option_labels[position_i] + ", " +
- colorbar_label_option_labels[label_i];
+ axis_opts[0] = "uwtivm";
+ }
+ else
+ {
+ axis_opts[0] = "uwxvm";
+ }
+ }
- // Smaller text
- pls.schr( 0.0, 0.75 );
- // Small ticks on the vertical axis
- pls.smaj( 0.0, 0.5 );
- pls.smin( 0.0, 0.5 );
+ label[0] = colorbar_position_option_labels[position_i] + ", " +
+ colorbar_label_option_labels[label_i];
- pls.vpor( 0.20, 0.80, 0.20, 0.80 );
- pls.wind( 0.0, 1.0, 0.0, 1.0 );
- // Set interesting background colour.
- pls.scol0a( 15, 0, 0, 0, 0.20 );
- pls.colorbar( colorbar_width, colorbar_height,
- opt | PL_COLORBAR_BOUNDING_BOX | PL_COLORBAR_BACKGROUND, position,
- x, y, x_length, y_length,
- 15, 1, 1,
- low_cap_color, high_cap_color,
- cont_color, cont_width,
- label_opts, label, axis_opts,
- ticks, sub_ticks,
- n_values_array, values_array );
+ // Smaller text
+ pls.schr( 0.0, 0.75 );
+ // Small ticks on the vertical axis
+ pls.smaj( 0.0, 0.5 );
+ pls.smin( 0.0, 0.5 );
- // Reset text and tick sizes
- pls.schr( 0.0, 1.0 );
- pls.smaj( 0.0, 1.0 );
- pls.smin( 0.0, 1.0 );
- }
+ pls.vpor( 0.20, 0.80, 0.20, 0.80 );
+ pls.wind( 0.0, 1.0, 0.0, 1.0 );
+ // Set interesting background colour.
+ pls.scol0a( 15, 0, 0, 0, 0.20 );
+ pls.colorbar( colorbar_width, colorbar_height,
+ opt | PL_COLORBAR_BOUNDING_BOX | PL_COLORBAR_BACKGROUND, position,
+ x, y, x_length, y_length,
+ 15, 1, 1,
+ low_cap_color, high_cap_color,
+ cont_color, cont_width,
+ label_opts, label, axis_opts,
+ ticks, sub_ticks,
+ n_values_array, values_array );
- // Draw a page title
- title = colorbar_option_kind_labels[kind_i] + " - " +
- colorbar_cap_option_labels[cap_i];
- pls.vpor( 0.0, 1.0, 0.0, 1.0 );
- pls.wind( 0.0, 1.0, 0.0, 1.0 );
- pls.ptex( 0.5, 0.5, 0.0, 0.0, 0.5, title );
+ // Reset text and tick sizes
+ pls.schr( 0.0, 1.0 );
+ pls.smaj( 0.0, 1.0 );
+ pls.smin( 0.0, 1.0 );
+ }
+
+ // Draw a page title
+ title = colorbar_option_kind_labels[kind_i] + " - " +
+ colorbar_cap_option_labels[cap_i];
+ pls.vpor( 0.0, 1.0, 0.0, 1.0 );
+ pls.wind( 0.0, 1.0, 0.0, 1.0 );
+ pls.ptex( 0.5, 0.5, 0.0, 0.0, 0.5, title );
}
void plcolorbar_example( String palette, int kind_i, int cont_color, double cont_width, double[] values )
{
- int label_i, cap_i;
-
- // Load the color palette
- pls.spal1( palette, true );
-
- for ( label_i = 0; label_i < COLORBAR_LABELS; label_i++ )
- {
- for ( cap_i = 0; cap_i < COLORBAR_CAPS; cap_i++ )
+ int label_i, cap_i;
+
+ // Load the color palette
+ pls.spal1( palette, true );
+
+ for ( label_i = 0; label_i < COLORBAR_LABELS; label_i++ )
+ {
+ for ( cap_i = 0; cap_i < COLORBAR_CAPS; cap_i++ )
{
- plcolorbar_example_page( kind_i, label_i, cap_i,
- cont_color, cont_width,
- values );
- }
- }
+ plcolorbar_example_page( kind_i, label_i, cap_i,
+ cont_color, cont_width,
+ values );
+ }
+ }
}
@@ -888,31 +888,31 @@
null, null, null, null );
max_height = Math.max( max_height, legend_height[0] );
- // Color bar examples
- double[] values_small = { -1.0e-200, 1.0e-200 };
- double[] values_uneven = { -1.0e-200, 2.0e-200, 2.6e-200, 3.4e-200, 6.0e-200, 7.0e-200, 8.0e-200, 9.0e-200, 10.0e-200 };
- double[] values_even = { -2.0e-200, -1.0e-200, 0.0e-200, 1.0e-200, 2.0e-200, 3.0e-200, 4.0e-200, 5.0e-200, 6.0e-200 };
+ // Color bar examples
+ double[] values_small = { -1.0e-200, 1.0e-200 };
+ double[] values_uneven = { -1.0e-200, 2.0e-200, 2.6e-200, 3.4e-200, 6.0e-200, 7.0e-200, 8.0e-200, 9.0e-200, 10.0e-200 };
+ double[] values_even = { -2.0e-200, -1.0e-200, 0.0e-200, 1.0e-200, 2.0e-200, 3.0e-200, 4.0e-200, 5.0e-200, 6.0e-200 };
- // Use unsaturated green background colour to contrast with black caps.
- pls.scolbg( 70, 185, 70 );
- // Cut out the greatest and smallest bits of the color spectrum to
- // leave colors for the end caps.
- pls.scmap1_range( 0.01, 0.99 );
+ // Use unsaturated green background colour to contrast with black caps.
+ pls.scolbg( 70, 185, 70 );
+ // Cut out the greatest and smallest bits of the color spectrum to
+ // leave colors for the end caps.
+ pls.scmap1_range( 0.01, 0.99 );
- // We can only test image and gradient colorbars with two element arrays
- for ( i = 2; i < COLORBAR_KINDS; i++ )
- {
- plcolorbar_example( "cmap1_blue_yellow.pal", i, 0, 0, values_small );
- }
- // Test shade colorbars with larger arrays
- for ( i = 0; i < 2; i++ )
+ // We can only test image and gradient colorbars with two element arrays
+ for ( i = 2; i < COLORBAR_KINDS; i++ )
{
- plcolorbar_example( "cmap1_blue_yellow.pal", i, 4, 2, values_even );
- }
- for ( i = 0; i < 2; i++ )
+ plcolorbar_example( "cmap1_blue_yellow.pal", i, 0, 0, values_small );
+ }
+ // Test shade colorbars with larger arrays
+ for ( i = 0; i < 2; i++ )
{
- plcolorbar_example( "cmap1_blue_yellow.pal", i, 0, 0, values_uneven );
- }
+ plcolorbar_example( "cmap1_blue_yellow.pal", i, 4, 2, values_even );
+ }
+ for ( i = 0; i < 2; i++ )
+ {
+ plcolorbar_example( "cmap1_blue_yellow.pal", i, 0, 0, values_uneven );
+ }
pls.end();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2013-06-06 21:32:52
|
Revision: 12371
http://sourceforge.net/p/plplot/code/12371
Author: andrewross
Date: 2013-06-06 21:32:48 +0000 (Thu, 06 Jun 2013)
Log Message:
-----------
Commit patch from Steve Schwartz to fix several bugs in placement of exponential labels.
Modified Paths:
--------------
trunk/src/plbox.c
Modified: trunk/src/plbox.c
===================================================================
--- trunk/src/plbox.c 2013-06-06 20:05:05 UTC (rev 12370)
+++ trunk/src/plbox.c 2013-06-06 21:32:48 UTC (rev 12371)
@@ -1776,64 +1776,89 @@
pos = ( (PLLabelDefaults *) plsc->label_data )->exp_label_pos;
just = ( (PLLabelDefaults *) plsc->label_data )->exp_label_just;
}
- else
- {
- offset = 0.02;
- height = 2.0;
- // Left axis exponent
- if ( lny )
- {
- pos = 0.0 - offset;
- just = 1.0;
- if ( plsc->if_boxbb )
- {
- // For horizontal axes, height of zero corresponds
- // to character centred on edge so should add 0.5
- // to height to obtain bounding box edge in
- // direction away from edge if no exponent. Add
- // an additional offset to make exponent fit.
- height_mm = ( height + 1.4 ) * char_height_mm;
- plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
- plsc->ypmm + height_mm );
- string_length_mm = plstrl( string );
- pos_mm = ( plsc->vppxmi + pos *
- ( plsc->vppxma - plsc->vppxmi ) ) /
- plsc->xpmm;
- plsc->boxbb_xmin = MIN( plsc->boxbb_xmin,
- pos_mm - string_length_mm );
- }
- else
- {
- plmtex( "t", height, pos, just, string );
- }
+ if ( lvy )
+ {
+ offset = 0.1; // more space to clear labels in "v" mode
+ }
+ else
+ {
+ offset = 0.02;
+ }
+ // Left axis exponent
+ if ( lny )
+ {
+ if (!plsc->label_data)
+ {
+ height = 3.2;
+ pos = 1.0 + offset;
+ just = 0.5;
+ }
+ if ( plsc->if_boxbb )
+ {
+ // For horizontal axes, height of zero corresponds
+ // to character centred on edge so should add 0.5
+ // to height to obtain bounding box edge in
+ // direction away from edge if no exponent. Add
+ // an additional offset to make exponent fit.
+ height_mm = ( height + 1.4 ) * char_height_mm;
+ plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
+ plsc->ypmm + height_mm );
+ string_length_mm = plstrl( string );
+ pos_mm = ( plsc->vppxmi + pos *
+ ( plsc->vppxma - plsc->vppxmi ) ) /
+ plsc->xpmm;
+ plsc->boxbb_xmin = MIN( plsc->boxbb_xmin,
+ pos_mm - string_length_mm );
+ }
+ else
+ {
+ if ( lvy )
+ {
+ plmtex( "lv", height, pos, just, string );
+ }
+ else
+ {
+ plmtex( "l", height, pos, just, string );
+ }
+ }
+ }
+ // Right axis exponent.
+ if ( lmy )
+ {
+ if ( !plsc->label_data )
+ {
+ height = 3.4; // Extra space for superscript
+ pos = 1.0 + offset;
+ just = 0.5;
+ }
+ if ( plsc->if_boxbb )
+ {
+ // For horizontal axes, height of zero corresponds
+ // to character centred on edge so should add 0.5
+ // to height to obtain bounding box edge in
+ // direction away from edge if no exponent. Add
+ // an additional offset to make exponent fit.
+ height_mm = ( height + 1.4 ) * char_height_mm;
+ plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
+ plsc->ypmm + height_mm );
+ string_length_mm = plstrl( string );
+ pos_mm = ( plsc->vppxmi + pos *
+ ( plsc->vppxma - plsc->vppxmi ) ) /
+ plsc->xpmm;
+ plsc->boxbb_xmax = MAX( plsc->boxbb_xmin,
+ pos_mm + string_length_mm );
+ }
+ else
+ {
+ if ( lvy )
+ {
+ plmtex( "rv", height, pos, just, string );
+ }
+ else
+ {
+ plmtex( "r", height, pos, just, string );
+ }
}
- // Right axis exponent.
- if ( lmy )
- {
- pos = 1.0 + offset;
- just = 0.0;
- if ( plsc->if_boxbb )
- {
- // For horizontal axes, height of zero corresponds
- // to character centred on edge so should add 0.5
- // to height to obtain bounding box edge in
- // direction away from edge if no exponent. Add
- // an additional offset to make exponent fit.
- height_mm = ( height + 1.4 ) * char_height_mm;
- plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
- plsc->ypmm + height_mm );
- string_length_mm = plstrl( string );
- pos_mm = ( plsc->vppxmi + pos *
- ( plsc->vppxma - plsc->vppxmi ) ) /
- plsc->xpmm;
- plsc->boxbb_xmax = MAX( plsc->boxbb_xmin,
- pos_mm + string_length_mm );
- }
- else
- {
- plmtex( "t", height, pos, just, string );
- }
- }
}
}
}
@@ -2307,63 +2332,88 @@
pos = ( (PLLabelDefaults *) plsc->label_data )->exp_label_pos;
just = ( (PLLabelDefaults *) plsc->label_data )->exp_label_just;
}
- else
- {
- offset = 0.02;
- height = 2.0;
- // Left axis exponent.
- if ( lny )
- {
- pos = 0.0 - offset;
- just = 1.0;
- if ( plsc->if_boxbb )
- {
- // For horizontal axes, height of zero corresponds
- // to character centred on edge so should add 0.5
- // to height to obtain bounding box edge in
- // direction away from edge if no exponent. Add
- // an additional offset to make exponent fit.
- height_mm = ( height + 1.4 ) * char_height_mm;
- plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
- plsc->ypmm + height_mm );
- string_length_mm = plstrl( string );
- pos_mm = ( plsc->vppxmi + pos *
- ( plsc->vppxma - plsc->vppxmi ) ) /
- plsc->xpmm;
- plsc->boxbb_xmin = MIN( plsc->boxbb_xmin,
- pos_mm - string_length_mm );
+ if ( lvy )
+ {
+ offset = 0.1; // more space to clear labels in "v" mode
+ }
+ else
+ {
+ offset = 0.02;
+ }
+ // Left axis exponent.
+ if ( lny )
+ {
+ if (!plsc->label_data)
+ {
+ height = 3.2;
+ pos = 1.0 + offset;
+ just = 0.5;
+ }
+ if ( plsc->if_boxbb )
+ {
+ // For horizontal axes, height of zero corresponds
+ // to character centred on edge so should add 0.5
+ // to height to obtain bounding box edge in
+ // direction away from edge if no exponent. Add
+ // an additional offset to make exponent fit.
+ height_mm = ( height + 1.4 ) * char_height_mm;
+ plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
+ plsc->ypmm + height_mm );
+ string_length_mm = plstrl( string );
+ pos_mm = ( plsc->vppxmi + pos *
+ ( plsc->vppxma - plsc->vppxmi ) ) /
+ plsc->xpmm;
+ plsc->boxbb_xmin = MIN( plsc->boxbb_xmin,
+ pos_mm - string_length_mm );
+ }
+ else
+ {
+ if ( lvy )
+ {
+ plmtex( "lv", height, pos, just, string );
+ }
+ else
+ {
+ plmtex( "l", height, pos, just, string );
}
- else
- {
- plmtex( "t", height, pos, just, string );
- }
}
- // Right axis exponent.
- if ( lmy )
- {
- pos = 1.0 + offset;
- just = 0.0;
- if ( plsc->if_boxbb )
- {
- // For horizontal axes, height of zero corresponds
- // to character centred on edge so should add 0.5
- // to height to obtain bounding box edge in
- // direction away from edge if no exponent. Add
- // an additional offset to make exponent fit.
- height_mm = ( height + 1.4 ) * char_height_mm;
- plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
- plsc->ypmm + height_mm );
- string_length_mm = plstrl( string );
- pos_mm = ( plsc->vppxmi + pos *
- ( plsc->vppxma - plsc->vppxmi ) ) /
- plsc->xpmm;
- plsc->boxbb_xmax = MAX( plsc->boxbb_xmin,
- pos_mm + string_length_mm );
- }
- else
- {
- plmtex( "t", height, pos, just, string );
- }
+ }
+ // Right axis exponent.
+ if ( lmy )
+ {
+ if ( !plsc->label_data )
+ {
+ height = 3.4; // Extra space for superscript
+ pos = 1.0 + offset;
+ just = 0.5;
+ }
+ if ( plsc->if_boxbb )
+ {
+ // For horizontal axes, height of zero corresponds
+ // to character centred on edge so should add 0.5
+ // to height to obtain bounding box edge in
+ // direction away from edge if no exponent. Add
+ // an additional offset to make exponent fit.
+ height_mm = ( height + 1.4 ) * char_height_mm;
+ plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
+ plsc->ypmm + height_mm );
+ string_length_mm = plstrl( string );
+ pos_mm = ( plsc->vppxmi + pos *
+ ( plsc->vppxma - plsc->vppxmi ) ) /
+ plsc->xpmm;
+ plsc->boxbb_xmax = MAX( plsc->boxbb_xmin,
+ pos_mm + string_length_mm );
+ }
+ else
+ {
+ if ( lvy )
+ {
+ plmtex( "rv", height, pos, just, string );
+ }
+ else
+ {
+ plmtex( "r", height, pos, just, string );
+ }
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-06 20:05:09
|
Revision: 12370
http://sourceforge.net/p/plplot/code/12370
Author: airwin
Date: 2013-06-06 20:05:05 +0000 (Thu, 06 Jun 2013)
Log Message:
-----------
Make builds more platform independent. As a result of these changes,
"MinGW Makefiles" now works as well as "MSYS Makefiles" for
build_projects.
Tested by: Alan W. Irwin <ai...@us...> for the "Unix
Makefiles" default generator on Linux, and the "MinGW Makefiles" and
"MSYS Makefiles" generators on the Wine version of Windows.
Modified Paths:
--------------
trunk/cmake/build_projects/CMakeLists.txt
trunk/cmake/build_projects/ExternalProject.cmake
trunk/cmake/build_projects/libagg/ep.cmake
trunk/cmake/build_projects/libharu/ep.cmake
trunk/cmake/build_projects/libqhull/ep.cmake
trunk/cmake/build_projects/ndiff/ep.cmake
trunk/cmake/build_projects/plplot/ep.cmake
trunk/cmake/build_projects/shapelib/ep.cmake
Modified: trunk/cmake/build_projects/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/CMakeLists.txt 2013-06-06 15:09:05 UTC (rev 12369)
+++ trunk/cmake/build_projects/CMakeLists.txt 2013-06-06 20:05:05 UTC (rev 12370)
@@ -26,11 +26,6 @@
cmake_minimum_required(VERSION 2.8.10.2 FATAL_ERROR)
-# Use modified version of ExternalProject where cmake -E touch has
-# been replaced with the touch command (to work around cmake bug 14020)
-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
-include(ExternalProject)
-
set(EP_BASE ${CMAKE_BINARY_DIR}/build_projects)
message(STATUS "EP_BASE = ${EP_BASE}")
set_directory_properties(PROPERTIES EP_BASE ${EP_BASE})
@@ -48,14 +43,13 @@
# making sure unzip (necessary for some build configurations to unpack
# their packages) is installed (using mingw-get).
-set(MSYS_PLATFORM)
find_program(MINGW_GET_EXECUTABLE mingw-get)
-if(MINGW_GET_EXECUTABLE)
- find_program(BASH_EXECUTABLE bash)
- if(BASH_EXECUTABLE)
- set(MSYS_PLATFORM ON)
- endif(BASH_EXECUTABLE)
-endif(MINGW_GET_EXECUTABLE)
+find_program(BASH_EXECUTABLE bash)
+if(MINGW_GET_EXECUTABLE AND BASH_EXECUTABLE)
+ set(MSYS_PLATFORM ON)
+else(MINGW_GET_EXECUTABLE AND BASH_EXECUTABLE)
+ set(MSYS_PLATFORM OFF)
+endif(MINGW_GET_EXECUTABLE AND BASH_EXECUTABLE)
message(STATUS "WIN32 = ${WIN32}")
message(STATUS "MINGW = ${MINGW}")
message(STATUS "MSYS = ${MSYS}")
@@ -70,14 +64,41 @@
message(FATAL_ERROR "build_projects does not work correctly on Windows without the MSYS platform. Install the MSYS platform (perhaps without sh.exe depending on CMake generator) on Windows.")
endif(WIN32 AND NOT MSYS_PLATFORM)
-find_program(UNZIP_EXECUTABLE unzip)
-if(NOT UNZIP_EXECUTABLE)
- if(MSYS_PLATFORM)
- message(STATUS "unzip missing from your MSYS platform. Use mingw-get to install it.")
- endif(MSYS_PLATFORM)
- message(FATAL_ERROR "unzip must be on your PATH in order for build_projects to work correctly")
-endif(NOT UNZIP_EXECUTABLE)
+# List of executables required by build_projects CMake logic.
+set(executables_LIST
+ # ExternalProject
+ touch
+ # Unpacking
+ unzip
+ # Updating
+ mkdir
+ cp
+ patch
+ # General
+ env
+ # Not specifically required by build_projects (yet), but some
+ # individual project configurations will not work unless this is
+ # available so might as well check it here.
+ bash
+ )
+foreach(executable ${executables_LIST})
+ string(TOUPPER ${executable} EXECUTABLE)
+ find_program(${EXECUTABLE}_EXECUTABLE ${executable})
+ if(NOT ${EXECUTABLE}_EXECUTABLE)
+ if(MSYS_PLATFORM)
+ message(STATUS "${executable} missing from your MSYS platform. Use mingw-get to install it.")
+ endif(MSYS_PLATFORM)
+ message(FATAL_ERROR "${executable} must be on your PATH in order for build_projects to work correctly")
+ endif(NOT ${EXECUTABLE}_EXECUTABLE)
+endforeach(executable ${executables_LIST})
+
+# Use modified version of ExternalProject where cmake -E touch has
+# been replaced with the TOUCH_EXECUTABLE command (to work around
+# cmake bug 14020)
+set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
+include(ExternalProject)
+
# Propagate the overall CMake generator and install prefix to all CMake-based
# software project builds.
set(BP_CMAKE_COMMAND cmake "-G${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX})
Modified: trunk/cmake/build_projects/ExternalProject.cmake
===================================================================
--- trunk/cmake/build_projects/ExternalProject.cmake 2013-06-06 15:09:05 UTC (rev 12369)
+++ trunk/cmake/build_projects/ExternalProject.cmake 2013-06-06 20:05:05 UTC (rev 12370)
@@ -1020,7 +1020,7 @@
set_property(SOURCE ${stamp_file} PROPERTY SYMBOLIC 1)
set(touch)
else()
- set(touch touch ${stamp_file})
+ set(touch ${TOUCH_EXECUTABLE} ${stamp_file})
endif()
# Wrap with log script?
@@ -1676,8 +1676,8 @@
OUTPUT ${complete_outputs}
COMMENT "Completed '${name}'"
COMMAND ${CMAKE_COMMAND} -E make_directory ${cmf_dir}${cfgdir}
- COMMAND touch ${complete_stamp_file}
- COMMAND touch ${done_stamp_file}
+ COMMAND ${TOUCH_EXECUTABLE} ${complete_stamp_file}
+ COMMAND ${TOUCH_EXECUTABLE} ${done_stamp_file}
DEPENDS ${install_stamp_file}
VERBATIM
)
Modified: trunk/cmake/build_projects/libagg/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libagg/ep.cmake 2013-06-06 15:09:05 UTC (rev 12369)
+++ trunk/cmake/build_projects/libagg/ep.cmake 2013-06-06 20:05:05 UTC (rev 12370)
@@ -40,7 +40,7 @@
build_libagg
URL ${libagg_URL}
URL_MD5 ${libagg_URL_MD5}
- CONFIGURE_COMMAND env PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_libagg
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_libagg
BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
INSTALL_COMMAND ${BP_PARALLEL_BUILD_COMMAND} install
STEP_TARGETS download update_build_system configure build install
@@ -51,8 +51,9 @@
add_custom_command(
OUTPUT
${EP_BASE}/Source/build_libagg/CMakeLists.txt
- COMMAND cp -f ${CMAKE_SOURCE_DIR}/libagg/CMakeLists.txt
- ${EP_BASE}/Source/build_libagg
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/libagg/CMakeLists.txt
+ ${EP_BASE}/Source/build_libagg/CMakeLists.txt
COMMENT "Updating of libagg build system"
DEPENDS
${CMAKE_SOURCE_DIR}/libagg/CMakeLists.txt
Modified: trunk/cmake/build_projects/libharu/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libharu/ep.cmake 2013-06-06 15:09:05 UTC (rev 12369)
+++ trunk/cmake/build_projects/libharu/ep.cmake 2013-06-06 20:05:05 UTC (rev 12370)
@@ -43,7 +43,7 @@
# Note -DPOST_2.1.0=OFF is essential for the 2.1.0 version, but you
# should drop this option for anything after 2.1.0. Also note that
# -DLIBHARU_EXAMPLES=ON builds the demos, but does not test them.
- CONFIGURE_COMMAND env PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DPOST_2.1.0=OFF -DLIBHARU_EXAMPLES=ON ${EP_BASE}/Source/build_libharu
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DPOST_2.1.0=OFF -DLIBHARU_EXAMPLES=ON ${EP_BASE}/Source/build_libharu
BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
INSTALL_COMMAND ${BP_PARALLEL_BUILD_COMMAND} install
STEP_TARGETS download update_build_system configure build install test
@@ -65,28 +65,38 @@
${EP_BASE}/Source/build_libharu/include/CMakeLists.txt
# File that is patched.
${EP_BASE}/Source/build_libharu/src/hpdf_streams.c
- COMMAND mkdir -p ${EP_BASE}/Source/build_libharu/cmake/modules
- COMMAND cp -f
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${EP_BASE}/Source/build_libharu/cmake/modules
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/libharu/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu
- COMMAND cp -f
+ ${EP_BASE}/Source/build_libharu/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/libharu/demo/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/demo
- COMMAND cp -f
+ ${EP_BASE}/Source/build_libharu/demo/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/libharu/src/hpdf_page_operator.c
+ ${EP_BASE}/Source/build_libharu/src/hpdf_page_operator.c
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/libharu/src/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/src
- COMMAND cp -f
+ ${EP_BASE}/Source/build_libharu/src/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/libharu/cmake/modules/haru.cmake
+ ${EP_BASE}/Source/build_libharu/cmake/modules/haru.cmake
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/libharu/cmake/modules/summary.cmake
- ${EP_BASE}/Source/build_libharu/cmake/modules
- COMMAND cp -f
+ ${EP_BASE}/Source/build_libharu/cmake/modules/summary.cmake
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/libharu/include/hpdf_consts.h
+ ${EP_BASE}/Source/build_libharu/include/hpdf_consts.h
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/libharu/include/hpdf_config.h.cmake
+ ${EP_BASE}/Source/build_libharu/include/hpdf_config.h.cmake
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/libharu/include/hpdf.h
+ ${EP_BASE}/Source/build_libharu/include/hpdf.h
+ COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/libharu/include/CMakeLists.txt
- ${EP_BASE}/Source/build_libharu/include
- COMMAND patch -d ${EP_BASE}/Source/build_libharu -p1 < ${CMAKE_SOURCE_DIR}/libharu/include_hpdf_config.h.patch
+ ${EP_BASE}/Source/build_libharu/include/CMakeLists.txt
+ COMMAND ${PATCH_EXECUTABLE} -d ${EP_BASE}/Source/build_libharu -p1 < ${CMAKE_SOURCE_DIR}/libharu/include_hpdf_config.h.patch
COMMENT "Updating of libharu build system"
DEPENDS
${CMAKE_SOURCE_DIR}/libharu/CMakeLists.txt
Modified: trunk/cmake/build_projects/libqhull/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libqhull/ep.cmake 2013-06-06 15:09:05 UTC (rev 12369)
+++ trunk/cmake/build_projects/libqhull/ep.cmake 2013-06-06 20:05:05 UTC (rev 12370)
@@ -40,7 +40,7 @@
build_libqhull
URL ${libqhull_URL}
URL_MD5 ${libqhull_URL_MD5}
- CONFIGURE_COMMAND env PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_libqhull
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_libqhull
BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
INSTALL_COMMAND ${BP_PARALLEL_BUILD_COMMAND} install
STEP_TARGETS download update_build_system configure build install test
@@ -55,8 +55,21 @@
${EP_BASE}/Source/build_libqhull/src/libqhull.h
${EP_BASE}/Source/build_libqhull/src/mem.h
${EP_BASE}/Source/build_libqhull/src/unix.c
- COMMAND cp -f ${CMAKE_SOURCE_DIR}/libqhull/CMakeLists.txt ${EP_BASE}/Source/build_libqhull
- COMMAND cp -f ${CMAKE_SOURCE_DIR}/libqhull/src/CMakeLists.txt ${CMAKE_SOURCE_DIR}/libqhull/src/libqhull.h ${CMAKE_SOURCE_DIR}/libqhull/src/mem.h ${CMAKE_SOURCE_DIR}/libqhull/src/unix.c ${EP_BASE}/Source/build_libqhull/src
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/libqhull/CMakeLists.txt
+ ${EP_BASE}/Source/build_libqhull/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/libqhull/src/CMakeLists.txt
+ ${EP_BASE}/Source/build_libqhull/src/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/libqhull/src/libqhull.h
+ ${EP_BASE}/Source/build_libqhull/src/libqhull.h
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/libqhull/src/mem.h
+ ${EP_BASE}/Source/build_libqhull/src/mem.h
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/libqhull/src/unix.c
+ ${EP_BASE}/Source/build_libqhull/src/unix.c
COMMENT "Updating of libqhull build system"
DEPENDS
${CMAKE_SOURCE_DIR}/libqhull/CMakeLists.txt
Modified: trunk/cmake/build_projects/ndiff/ep.cmake
===================================================================
--- trunk/cmake/build_projects/ndiff/ep.cmake 2013-06-06 15:09:05 UTC (rev 12369)
+++ trunk/cmake/build_projects/ndiff/ep.cmake 2013-06-06 20:05:05 UTC (rev 12370)
@@ -44,7 +44,7 @@
build_ndiff
URL ${ndiff_URL}
URL_MD5 ${ndiff_URL_MD5}
- CONFIGURE_COMMAND env PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_ndiff
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_ndiff
BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
TEST_BEFORE_INSTALL ON
TEST_COMMAND ${BP_PARALLEL_CTEST_COMMAND}
@@ -58,7 +58,12 @@
OUTPUT
${EP_BASE}/Source/build_ndiff/CMakeLists.txt
${EP_BASE}/Source/build_ndiff/config.h.cmake
- COMMAND cp -f ${CMAKE_SOURCE_DIR}/ndiff/CMakeLists.txt ${CMAKE_SOURCE_DIR}/ndiff/config.h.cmake ${EP_BASE}/Source/build_ndiff
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/ndiff/CMakeLists.txt
+ ${EP_BASE}/Source/build_ndiff/CMakeLists.txt
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/ndiff/config.h.cmake
+ ${EP_BASE}/Source/build_ndiff/config.h.cmake
COMMENT "Updating of ndiff build system"
DEPENDS
${CMAKE_SOURCE_DIR}/ndiff/CMakeLists.txt
Modified: trunk/cmake/build_projects/plplot/ep.cmake
===================================================================
--- trunk/cmake/build_projects/plplot/ep.cmake 2013-06-06 15:09:05 UTC (rev 12369)
+++ trunk/cmake/build_projects/plplot/ep.cmake 2013-06-06 20:05:05 UTC (rev 12370)
@@ -1,3 +1,28 @@
+# plplot/ep.cmake
+# This file should be included directly or indirectly from a top-level
+# CMakeLists.txt file to configure the build and test of PLplot.
+
+# Copyright (C) 2013 Alan W. Irwin
+
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# The top-level CMakeLists.txt file that includes this file should
+# have run "include(ExternalProject)" and set EP_BASE variable (and
+# corresponding directory property) as well as various BP variables
+# used below that configure how the External_Project functions
+# operate.
# Configure build of PLplot dependencies.
include(shapelib/ep.cmake)
Modified: trunk/cmake/build_projects/shapelib/ep.cmake
===================================================================
--- trunk/cmake/build_projects/shapelib/ep.cmake 2013-06-06 15:09:05 UTC (rev 12369)
+++ trunk/cmake/build_projects/shapelib/ep.cmake 2013-06-06 20:05:05 UTC (rev 12370)
@@ -43,11 +43,11 @@
build_shapelib
URL ${shapelib_URL}
URL_MD5 ${shapelib_URL_MD5}
- CONFIGURE_COMMAND env PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DEG_DATA:PATH=${EP_BASE}/Source/build_shapelib/eg_data ${EP_BASE}/Source/build_shapelib
- BUILD_COMMAND env PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DEG_DATA:PATH=${EP_BASE}/Source/build_shapelib/eg_data ${EP_BASE}/Source/build_shapelib
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND}
TEST_BEFORE_INSTALL ON
- TEST_COMMAND env PATH=${BP_PATH} ${BP_PARALLEL_CTEST_COMMAND}
- INSTALL_COMMAND env PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
+ TEST_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_CTEST_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install
STEP_TARGETS download update_build_system get_eg_data configure build install test
)
@@ -56,7 +56,9 @@
add_custom_command(
OUTPUT
${EP_BASE}/Source/build_shapelib/CMakeLists.txt
- COMMAND cp -f ${CMAKE_SOURCE_DIR}/shapelib/CMakeLists.txt ${EP_BASE}/Source/build_shapelib
+ COMMAND ${CMAKE_COMMAND} -E copy
+ ${CMAKE_SOURCE_DIR}/shapelib/CMakeLists.txt
+ ${EP_BASE}/Source/build_shapelib/CMakeLists.txt
COMMENT "Updating of shapelib build system"
DEPENDS
${CMAKE_SOURCE_DIR}/shapelib/CMakeLists.txt
@@ -75,7 +77,7 @@
${EP_BASE}/Download/build_shapelib/shape_eg_data.zip
COMMAND ${CMAKE_COMMAND} -DURL:STRING=${shape_eg_data_URL} -DFILE:FILEPATH=${EP_BASE}/Download/build_shapelib/shape_eg_data.zip -DMD5:STRING=${shape_eg_data_URL_MD5} -P ${CMAKE_SOURCE_DIR}/download_check.cmake
COMMAND ${CMAKE_COMMAND} -E remove_directory ${EP_BASE}/Source/build_shapelib/eg_data
- COMMAND unzip -q ${EP_BASE}/Download/build_shapelib/shape_eg_data.zip -d ${EP_BASE}/Source/build_shapelib/eg_data
+ COMMAND ${UNZIP_EXECUTABLE} -q ${EP_BASE}/Download/build_shapelib/shape_eg_data.zip -d ${EP_BASE}/Source/build_shapelib/eg_data
COMMENT "getting eg_data for shapelib test"
)
ExternalProject_Add_Step(build_shapelib get_eg_data
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-06 15:09:08
|
Revision: 12369
http://sourceforge.net/p/plplot/code/12369
Author: airwin
Date: 2013-06-06 15:09:05 +0000 (Thu, 06 Jun 2013)
Log Message:
-----------
Preliminary work to make build_projects work with the "MinGW
Makefiles" generator.
Modified Paths:
--------------
trunk/cmake/build_projects/CMakeLists.txt
trunk/cmake/build_projects/libagg/ep.cmake
trunk/cmake/build_projects/libharu/ep.cmake
trunk/cmake/build_projects/libqhull/ep.cmake
trunk/cmake/build_projects/ndiff/ep.cmake
trunk/cmake/build_projects/shapelib/ep.cmake
Modified: trunk/cmake/build_projects/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/CMakeLists.txt 2013-06-05 06:54:51 UTC (rev 12368)
+++ trunk/cmake/build_projects/CMakeLists.txt 2013-06-06 15:09:05 UTC (rev 12369)
@@ -37,32 +37,72 @@
# Set build_projects variables to control builds in general
-if(NOT ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" AND NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles")
- message(FATAL_ERROR "This project only works with either the \"Unix Makefiles\" or \"MSYS Makefiles\" generators")
-endif(NOT ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" AND NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles")
-
+# Test whether there is access to the MSYS platform on the PATH. Note
+# this is a different question than whether you are using the "MSYS
+# Makefiles" generator since some other generators (e.g., "MinGW
+# Makefiles") can have MSYS on the path so long as sh.exe is renamed
+# or removed from that PATH. Note, we search for the automatic
+# installer app, mingw-get.exe and the bash.exe shell to check
+# (approximately) whether we have access to the MSYS platform, and
+# then we test that platform (very approximately) for completeness by
+# making sure unzip (necessary for some build configurations to unpack
+# their packages) is installed (using mingw-get).
+
+set(MSYS_PLATFORM)
+find_program(MINGW_GET_EXECUTABLE mingw-get)
+if(MINGW_GET_EXECUTABLE)
+ find_program(BASH_EXECUTABLE bash)
+ if(BASH_EXECUTABLE)
+ set(MSYS_PLATFORM ON)
+ endif(BASH_EXECUTABLE)
+endif(MINGW_GET_EXECUTABLE)
+message(STATUS "WIN32 = ${WIN32}")
+message(STATUS "MINGW = ${MINGW}")
+message(STATUS "MSYS = ${MSYS}")
+message(STATUS "MSYS_PLATFORM = ${MSYS_PLATFORM}")
+message(STATUS "CYGWIN = ${CYGWIN}")
+
+if(CYGWIN)
+ message(FATAL_ERROR "build_projects does not work correctly on the Cygwin platform. Use the MinGW compiler and MSYS platform instead.")
+endif(CYGWIN)
+
+if(WIN32 AND NOT MSYS_PLATFORM)
+ message(FATAL_ERROR "build_projects does not work correctly on Windows without the MSYS platform. Install the MSYS platform (perhaps without sh.exe depending on CMake generator) on Windows.")
+endif(WIN32 AND NOT MSYS_PLATFORM)
+
+find_program(UNZIP_EXECUTABLE unzip)
+if(NOT UNZIP_EXECUTABLE)
+ if(MSYS_PLATFORM)
+ message(STATUS "unzip missing from your MSYS platform. Use mingw-get to install it.")
+ endif(MSYS_PLATFORM)
+ message(FATAL_ERROR "unzip must be on your PATH in order for build_projects to work correctly")
+endif(NOT UNZIP_EXECUTABLE)
+
# Propagate the overall CMake generator and install prefix to all CMake-based
# software project builds.
set(BP_CMAKE_COMMAND cmake "-G${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX})
# The non-parallel versions are for build systems that
# apparently have race conditions for parallel builds.
-set(BP_PARALLEL_BUILD_COMMAND make -j4)
-set(BP_NON_PARALLEL_MAKE_COMMAND make)
+if(CMAKE_GENERATOR STREQUAL "MinGW Makefiles")
+ set(BP_BUILD_COMMAND mingw32-make)
+else(CMAKE_GENERATOR STREQUAL "MinGW Makefiles")
+ set(BP_BUILD_COMMAND make)
+endif(CMAKE_GENERATOR STREQUAL "MinGW Makefiles")
+set(BP_PARALLEL_BUILD_COMMAND ${BP_BUILD_COMMAND} -j4)
+set(BP_CTEST_COMMAND ctest)
set(BP_PARALLEL_CTEST_COMMAND ctest -j4)
-set(BP_NON_PARALLEL_CTEST_COMMAND ctest)
+
set(BP_ORIGINAL_NATIVE_PATH "$ENV{PATH}")
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
-if(MSYS)
+if(MSYS_PLATFORM)
# Useful function to convert Windows list of semicolon-delimited
- # paths to the equivalent list of MSYS paths (exactly like the
- # colon-delimited Unix list of paths except the driver letters are
+ # PATHs to the equivalent list of MSYS PATHs (exactly like the
+ # colon-delimited Unix list of PATHs except the driver letters are
# specified as the initial one-character component of each of the
- # paths). to MSYS path (like Unix path but with the drive letters
- # as single character initial component of the path). For example,
- # this function will will transform the Windows list of paths,
- # "z:\whatever_z;c:\whatever_c" to /z/whatever_z:/c/whatever_c.
+ # PATHs). For example, this function will transform the Windows
+ # list of PATHs, "z:\path1;c:\path2" to "/z/path1:/c/path2".
function(determine_msys_path MSYS_PATH NATIVE_PATH)
#message(STATUS "NATIVE_PATH = ${NATIVE_PATH}")
string(REGEX REPLACE "^\([a-zA-z]\):" "/\\1" PATH "${NATIVE_PATH}")
@@ -72,7 +112,7 @@
#message(STATUS "MSYS_PATH = ${PATH}")
set(${MSYS_PATH} ${PATH} PARENT_SCOPE)
endfunction(determine_msys_path)
-endif(MSYS)
+endif(MSYS_PLATFORM)
# Now include the build configurations for certain targets and their
# dependencies.
Modified: trunk/cmake/build_projects/libagg/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libagg/ep.cmake 2013-06-05 06:54:51 UTC (rev 12368)
+++ trunk/cmake/build_projects/libagg/ep.cmake 2013-06-06 15:09:05 UTC (rev 12369)
@@ -29,11 +29,11 @@
set(libagg_URL_MD5 0229a488bc47be10a2fee6cf0b2febd6)
# Data that is related to the PATH that must be used.
-if(MSYS)
+if(MSYS_PLATFORM)
#set(BP_PATH_NODLL "${BP_PATH}")
#set(BP_PATH "${EP_BASE}/Build/build_libagg/dll;${BP_PATH_NODLL}")
determine_msys_path(BP_PATH "${BP_PATH}")
-endif(MSYS)
+endif(MSYS_PLATFORM)
#message(STATUS "modified BP_PATH for libagg = ${BP_PATH}")
ExternalProject_Add(
Modified: trunk/cmake/build_projects/libharu/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libharu/ep.cmake 2013-06-05 06:54:51 UTC (rev 12368)
+++ trunk/cmake/build_projects/libharu/ep.cmake 2013-06-06 15:09:05 UTC (rev 12369)
@@ -29,11 +29,11 @@
set(libharu_URL_MD5 0623b8fb08ae1b28af08b2cdbd66b662)
# Data that is related to the PATH that must be used.
-if(MSYS)
+if(MSYS_PLATFORM)
#set(BP_PATH_NODLL "${BP_PATH}")
#set(BP_PATH "${EP_BASE}/Build/build_libharu/dll;${BP_PATH_NODLL}")
determine_msys_path(BP_PATH "${BP_PATH}")
-endif(MSYS)
+endif(MSYS_PLATFORM)
#message(STATUS "modified BP_PATH for libharu = ${BP_PATH}")
ExternalProject_Add(
Modified: trunk/cmake/build_projects/libqhull/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libqhull/ep.cmake 2013-06-05 06:54:51 UTC (rev 12368)
+++ trunk/cmake/build_projects/libqhull/ep.cmake 2013-06-06 15:09:05 UTC (rev 12369)
@@ -29,11 +29,11 @@
set(libqhull_URL_MD5 e64138470acdeb18f752a0bc2a11ceb4)
# Data that is related to the PATH that must be used.
-if(MSYS)
+if(MSYS_PLATFORM)
#set(BP_PATH_NODLL "${BP_PATH}")
#set(BP_PATH "${EP_BASE}/Build/build_libqhull/dll;${BP_PATH_NODLL}")
determine_msys_path(BP_PATH "${BP_PATH}")
-endif(MSYS)
+endif(MSYS_PLATFORM)
#message(STATUS "modified BP_PATH for libqhull = ${BP_PATH}")
ExternalProject_Add(
Modified: trunk/cmake/build_projects/ndiff/ep.cmake
===================================================================
--- trunk/cmake/build_projects/ndiff/ep.cmake 2013-06-05 06:54:51 UTC (rev 12368)
+++ trunk/cmake/build_projects/ndiff/ep.cmake 2013-06-06 15:09:05 UTC (rev 12369)
@@ -29,15 +29,15 @@
# The MD5 value below is correct for the gpg --verified version
# Use URL_MD5 because ExternalProject_Add doesn't deal with gpg --version.
-# In any case, gpg is not available for the MSYS case.
+# In any case, gpg is not available for the MSYS_PLATFORM case.
set(ndiff_URL_MD5 885548b4dc26e72c5455bebb5ba6c16d)
# Data that is related to the PATH that must be used.
-if(MSYS)
+if(MSYS_PLATFORM)
#set(BP_PATH_NODLL "${BP_PATH}")
#set(BP_PATH "${EP_BASE}/Build/build_ndiff/dll;${BP_PATH_NODLL}")
determine_msys_path(BP_PATH "${BP_PATH}")
-endif(MSYS)
+endif(MSYS_PLATFORM)
#message(STATUS "modified BP_PATH for ndiff = ${BP_PATH}")
ExternalProject_Add(
Modified: trunk/cmake/build_projects/shapelib/ep.cmake
===================================================================
--- trunk/cmake/build_projects/shapelib/ep.cmake 2013-06-05 06:54:51 UTC (rev 12368)
+++ trunk/cmake/build_projects/shapelib/ep.cmake 2013-06-06 15:09:05 UTC (rev 12369)
@@ -32,11 +32,11 @@
set(shape_eg_data_URL_MD5 36208abd5d34c5c80101d8b214109f0d)
# Data that is related to the PATH that must be used.
-if(MSYS)
+if(MSYS_PLATFORM)
set(BP_PATH_NODLL "${BP_PATH}")
set(BP_PATH "${EP_BASE}/Build/build_shapelib/dll;${BP_PATH_NODLL}")
determine_msys_path(BP_PATH "${BP_PATH}")
-endif(MSYS)
+endif(MSYS_PLATFORM)
#message(STATUS "modified BP_PATH for shapelib = ${BP_PATH}")
ExternalProject_Add(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <and...@us...> - 2013-06-05 06:54:54
|
Revision: 12368
http://sourceforge.net/p/plplot/code/12368
Author: andrewross
Date: 2013-06-05 06:54:51 +0000 (Wed, 05 Jun 2013)
Log Message:
-----------
Apply fix from Steve Schwartz for mis-alignment of the major axes and grid with time axis ("d" option).
Modified Paths:
--------------
trunk/src/plbox.c
Modified: trunk/src/plbox.c
===================================================================
--- trunk/src/plbox.c 2013-06-05 01:52:14 UTC (rev 12367)
+++ trunk/src/plbox.c 2013-06-05 06:54:51 UTC (rev 12368)
@@ -455,7 +455,7 @@
if ( ldy )
{
pldtfac( vpwymi, vpwyma, &factor, &tstart );
- tp = ytick1 * ( floor( ( vpwymi - tstart ) / ytick1 ) + 1 ) + tstart;
+ tp = ytick1 * ( floor( ( vpwyma - tstart ) / ytick1 ) + 1 ) + tstart;
}
else
tp = ytick1 * ( floor( vpwyma / ytick1 ) + 1 );
@@ -1259,11 +1259,12 @@
grid_box( const char *xopt, PLFLT xtick1, PLINT nxsub1,
const char *yopt, PLFLT ytick1, PLINT nysub1 )
{
- PLINT lgx, lhx, llx;
- PLINT lgy, lhy, lly;
+ PLINT lgx, lhx, llx, ldx;
+ PLINT lgy, lhy, lly, ldy;
PLFLT vpwxmi, vpwxma, vpwymi, vpwyma;
PLFLT vpwxmin, vpwxmax, vpwymin, vpwymax;
PLFLT tn, temp, tcrit, tspace = 0.1;
+ PLFLT tstart, factor;
PLINT i;
// Set plot options from input
@@ -1271,10 +1272,12 @@
lgx = plP_stsearch( xopt, 'g' );
lhx = plP_stsearch( xopt, 'h' );
llx = plP_stsearch( xopt, 'l' );
+ ldx = plP_stsearch( xopt, 'd' );
lgy = plP_stsearch( yopt, 'g' );
lhy = plP_stsearch( yopt, 'h' );
lly = plP_stsearch( yopt, 'l' );
+ ldy = plP_stsearch( yopt, 'd' );
plP_xgvpw( &vpwxmin, &vpwxmax, &vpwymin, &vpwymax );
// n.b. large change; vpwxmi always numerically less than vpwxma, and
@@ -1288,8 +1291,16 @@
if ( lgx )
{
- for ( tn = xtick1 * floor( vpwxmi / xtick1 );
- tn <= vpwxma; tn += xtick1 )
+ if ( ldx )
+ {
+ pldtfac( vpwxmi, vpwxma, &factor, &tstart);
+ tn = xtick1*( floor((vpwxmi-tstart )/xtick1 )) + tstart;
+ }
+ else
+ {
+ tn = xtick1*floor( vpwxmi / xtick1 );
+ }
+ for ( ; tn <= vpwxma; tn += xtick1 )
{
if ( lhx )
{
@@ -1326,9 +1337,16 @@
if ( lgy )
{
- tn = ytick1 * floor( vpwymi / ytick1 + tspace );
- for ( tn = ytick1 * floor( vpwymi / ytick1 );
- tn <= vpwyma; tn += ytick1 )
+ if ( ldy )
+ {
+ pldtfac( vpwymi, vpwyma, &factor, &tstart);
+ tn = ytick1*( floor((vpwymi-tstart )/ytick1 )) + tstart;
+ }
+ else
+ {
+ tn = ytick1*floor( vpwymi / ytick1 );
+ }
+ for ( ; tn <= vpwyma; tn += ytick1 )
{
if ( lhy )
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-05 01:52:19
|
Revision: 12367
http://sourceforge.net/p/plplot/code/12367
Author: airwin
Date: 2013-06-05 01:52:14 +0000 (Wed, 05 Jun 2013)
Log Message:
-----------
Replaced all temporary downloads with actual downloads since most of
these build subprojects are thoroughly debugged. During the test
of this change discovered that the download of the libqhull-2010.1 snapshot
was actually a different snapshot (~4 months later) than the download
I had collected before with this same filename. So I had to change
the associated MD5sum accordingly. Furthermore, the latest "2010.1"
version of libqhull continues to build without issues.
Add faux PLplot build which for now just takes care of PLplot build
dependencies for the "Build Projects" project without actually
building PLplot
Tested by: Alan W. Irwin <ai...@us...> for both Linux
and MinGW/MSYS/Wine platforms using the build_plplot target.
N.B. from the qhull notes, the gcc option -f-no-strict-aliasing must
be used for qset.c for 2010.1 This only matters if you use -O2, -O3, or
-Os. I haven't decided whether to bother with this or try to use the
latest libqhull instead where this restriction has been removed.
Modified Paths:
--------------
trunk/cmake/build_projects/CMakeLists.txt
trunk/cmake/build_projects/libagg/ep.cmake
trunk/cmake/build_projects/libharu/ep.cmake
trunk/cmake/build_projects/libqhull/ep.cmake
trunk/cmake/build_projects/ndiff/ep.cmake
trunk/cmake/build_projects/shapelib/ep.cmake
Added Paths:
-----------
trunk/cmake/build_projects/plplot/
trunk/cmake/build_projects/plplot/ep.cmake
Modified: trunk/cmake/build_projects/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/CMakeLists.txt 2013-06-04 23:40:49 UTC (rev 12366)
+++ trunk/cmake/build_projects/CMakeLists.txt 2013-06-05 01:52:14 UTC (rev 12367)
@@ -74,8 +74,13 @@
endfunction(determine_msys_path)
endif(MSYS)
-include(shapelib/ep.cmake)
+# Now include the build configurations for certain targets and their
+# dependencies.
+
+# Configure a build of ndiff. The ndiff application is not a a PLplot
+# dependency, but still this fuzzy diff is quite useful for PLplot
+# developers.
include(ndiff/ep.cmake)
-include(libqhull/ep.cmake)
-include(libharu/ep.cmake)
-include(libagg/ep.cmake)
+
+# Configure a build of PLplot and its dependencies.
+include(plplot/ep.cmake)
\ No newline at end of file
Modified: trunk/cmake/build_projects/libagg/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libagg/ep.cmake 2013-06-04 23:40:49 UTC (rev 12366)
+++ trunk/cmake/build_projects/libagg/ep.cmake 2013-06-05 01:52:14 UTC (rev 12367)
@@ -26,8 +26,6 @@
# Data that is related to downloads.
set(libagg_URL http://www.antigrain.com/agg-2.5.tar.gz)
-# TEMPORARY local version for debugging
-set(libagg_URL /home/software/libagg/agg-2.5.tar.gz)
set(libagg_URL_MD5 0229a488bc47be10a2fee6cf0b2febd6)
# Data that is related to the PATH that must be used.
Modified: trunk/cmake/build_projects/libharu/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libharu/ep.cmake 2013-06-04 23:40:49 UTC (rev 12366)
+++ trunk/cmake/build_projects/libharu/ep.cmake 2013-06-05 01:52:14 UTC (rev 12367)
@@ -26,8 +26,6 @@
# Data that is related to downloads.
set(libharu_URL http://libharu.org/files/libharu-2.1.0.tar.gz)
-# TEMPORARY local version for debugging
-set(libharu_URL /home/software/libharu/libharu-2.1.0.tar.gz)
set(libharu_URL_MD5 0623b8fb08ae1b28af08b2cdbd66b662)
# Data that is related to the PATH that must be used.
@@ -46,9 +44,7 @@
# should drop this option for anything after 2.1.0. Also note that
# -DLIBHARU_EXAMPLES=ON builds the demos, but does not test them.
CONFIGURE_COMMAND env PATH=${BP_PATH} ${BP_CMAKE_COMMAND} -DPOST_2.1.0=OFF -DLIBHARU_EXAMPLES=ON ${EP_BASE}/Source/build_libharu
- # TEMPORARY
- #BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
- BUILD_COMMAND ${BP_NON_PARALLEL_BUILD_COMMAND}
+ BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
INSTALL_COMMAND ${BP_PARALLEL_BUILD_COMMAND} install
STEP_TARGETS download update_build_system configure build install test
)
Modified: trunk/cmake/build_projects/libqhull/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libqhull/ep.cmake 2013-06-04 23:40:49 UTC (rev 12366)
+++ trunk/cmake/build_projects/libqhull/ep.cmake 2013-06-05 01:52:14 UTC (rev 12367)
@@ -26,11 +26,8 @@
# Data that is related to downloads.
set(libqhull_URL http://www.qhull.org/download/qhull-2010.1-src.tgz)
-# TEMPORARY local version for debugging
-set(libqhull_URL /home/software/qhull/qhull-2010.1-src.tgz)
+set(libqhull_URL_MD5 e64138470acdeb18f752a0bc2a11ceb4)
-set(libqhull_URL_MD5 4cda99e10a9a41365021db7eb1e79b91)
-
# Data that is related to the PATH that must be used.
if(MSYS)
#set(BP_PATH_NODLL "${BP_PATH}")
Modified: trunk/cmake/build_projects/ndiff/ep.cmake
===================================================================
--- trunk/cmake/build_projects/ndiff/ep.cmake 2013-06-04 23:40:49 UTC (rev 12366)
+++ trunk/cmake/build_projects/ndiff/ep.cmake 2013-06-05 01:52:14 UTC (rev 12367)
@@ -26,8 +26,6 @@
# Data that is related to downloads.
set(ndiff_URL ftp://ftp.math.utah.edu/pub/misc/ndiff-2.00.tar.gz)
-# TEMPORARY local version for debugging
-set(ndiff_URL /home/software/ndiff/ndiff-2.00.tar.gz)
# The MD5 value below is correct for the gpg --verified version
# Use URL_MD5 because ExternalProject_Add doesn't deal with gpg --version.
Added: trunk/cmake/build_projects/plplot/ep.cmake
===================================================================
--- trunk/cmake/build_projects/plplot/ep.cmake (rev 0)
+++ trunk/cmake/build_projects/plplot/ep.cmake 2013-06-05 01:52:14 UTC (rev 12367)
@@ -0,0 +1,20 @@
+# Configure build of PLplot dependencies.
+
+include(shapelib/ep.cmake)
+include(libqhull/ep.cmake)
+include(libharu/ep.cmake)
+include(libagg/ep.cmake)
+
+# Build PLplot itself.
+# (Not implemented yet, but create empty custom target with correct
+# target dependencies as if that target were actually a PLplot build).
+add_custom_target(build_plplot)
+add_dependencies(build_plplot
+ build_shapelib
+ build_libqhull
+ build_libharu
+ build_libagg
+ )
+
+
+
Modified: trunk/cmake/build_projects/shapelib/ep.cmake
===================================================================
--- trunk/cmake/build_projects/shapelib/ep.cmake 2013-06-04 23:40:49 UTC (rev 12366)
+++ trunk/cmake/build_projects/shapelib/ep.cmake 2013-06-05 01:52:14 UTC (rev 12367)
@@ -26,13 +26,9 @@
# Data that is related to downloads.
set(shapelib_URL http://download.osgeo.org/shapelib/shapelib-1.3.0.tar.gz)
-# TEMPORARY local version for debugging
-set(shapelib_URL /home/software/shapelib/shapelib-1.3.0.tar.gz)
set(shapelib_URL_MD5 2ff7d0b21d4b7506b452524492795f77)
set(shape_eg_data_URL http://dl.maptools.org/dl/shapelib/shape_eg_data.zip)
-# TEMPORARY local version for debugging
-set(shape_eg_data_URL file:///home/software/shapelib/eg_data/shape_eg_data.zip)
set(shape_eg_data_URL_MD5 36208abd5d34c5c80101d8b214109f0d)
# Data that is related to the PATH that must be used.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-04 23:40:51
|
Revision: 12366
http://sourceforge.net/p/plplot/code/12366
Author: airwin
Date: 2013-06-04 23:40:49 +0000 (Tue, 04 Jun 2013)
Log Message:
-----------
Add ExternalProject build configuration of libagg to "Build
Projects" project.
Tested by: Alan W. Irwin <ai...@us...> for both Linux
and MinGW/MSYS/Wine platforms using the build_libagg target.
Modified Paths:
--------------
trunk/cmake/build_projects/CMakeLists.txt
Added Paths:
-----------
trunk/cmake/build_projects/libagg/ep.cmake
Modified: trunk/cmake/build_projects/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/CMakeLists.txt 2013-06-04 23:37:22 UTC (rev 12365)
+++ trunk/cmake/build_projects/CMakeLists.txt 2013-06-04 23:40:49 UTC (rev 12366)
@@ -78,3 +78,4 @@
include(ndiff/ep.cmake)
include(libqhull/ep.cmake)
include(libharu/ep.cmake)
+include(libagg/ep.cmake)
Added: trunk/cmake/build_projects/libagg/ep.cmake
===================================================================
--- trunk/cmake/build_projects/libagg/ep.cmake (rev 0)
+++ trunk/cmake/build_projects/libagg/ep.cmake 2013-06-04 23:40:49 UTC (rev 12366)
@@ -0,0 +1,73 @@
+# libagg/ep.cmake
+# This file should be included directly or indirectly from a top-level
+# CMakeLists.txt file to configure the build and test of libagg.
+
+# Copyright (C) 2013 Alan W. Irwin
+
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# The top-level CMakeLists.txt file that includes this file should
+# have run "include(ExternalProject)" and set EP_BASE variable (and
+# corresponding directory property) as well as various BP variables
+# used below that configure how the External_Project functions
+# operate.
+
+# Data that is related to downloads.
+set(libagg_URL http://www.antigrain.com/agg-2.5.tar.gz)
+# TEMPORARY local version for debugging
+set(libagg_URL /home/software/libagg/agg-2.5.tar.gz)
+set(libagg_URL_MD5 0229a488bc47be10a2fee6cf0b2febd6)
+
+# Data that is related to the PATH that must be used.
+if(MSYS)
+ #set(BP_PATH_NODLL "${BP_PATH}")
+ #set(BP_PATH "${EP_BASE}/Build/build_libagg/dll;${BP_PATH_NODLL}")
+ determine_msys_path(BP_PATH "${BP_PATH}")
+endif(MSYS)
+#message(STATUS "modified BP_PATH for libagg = ${BP_PATH}")
+
+ExternalProject_Add(
+ build_libagg
+ URL ${libagg_URL}
+ URL_MD5 ${libagg_URL_MD5}
+ CONFIGURE_COMMAND env PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${EP_BASE}/Source/build_libagg
+ BUILD_COMMAND ${BP_PARALLEL_BUILD_COMMAND}
+ INSTALL_COMMAND ${BP_PARALLEL_BUILD_COMMAND} install
+ STEP_TARGETS download update_build_system configure build install
+ )
+
+# Use custom command approach to generate real file dependencies
+# rather than time stamps alone.
+add_custom_command(
+ OUTPUT
+ ${EP_BASE}/Source/build_libagg/CMakeLists.txt
+ COMMAND cp -f ${CMAKE_SOURCE_DIR}/libagg/CMakeLists.txt
+ ${EP_BASE}/Source/build_libagg
+ COMMENT "Updating of libagg build system"
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/libagg/CMakeLists.txt
+ )
+ExternalProject_Add_Step(build_libagg update_build_system
+ COMMENT "Updated libagg build system"
+ DEPENDEES download
+ DEPENDERS configure
+ DEPENDS
+ ${EP_BASE}/Source/build_libagg/CMakeLists.txt
+ ALWAYS OFF
+ )
+
+# Restore BP_PATH to original state.
+set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
+#message(STATUS "libagg restored original BP_PATH = ${BP_PATH}")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ai...@us...> - 2013-06-04 23:37:25
|
Revision: 12365
http://sourceforge.net/p/plplot/code/12365
Author: airwin
Date: 2013-06-04 23:37:22 +0000 (Tue, 04 Jun 2013)
Log Message:
-----------
Make this into a complete top-level CMakeList.txt file for build libagg.
Add in copyright notice.
Modified Paths:
--------------
trunk/cmake/build_projects/libagg/CMakeLists.txt
Modified: trunk/cmake/build_projects/libagg/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/libagg/CMakeLists.txt 2013-06-04 23:16:06 UTC (rev 12364)
+++ trunk/cmake/build_projects/libagg/CMakeLists.txt 2013-06-04 23:37:22 UTC (rev 12365)
@@ -1,45 +1,80 @@
-# CMakeLists.txt for the agg library
+# Top-level CMakeLists.txt for the CMake-based build and test system
+# of the AGG (Anti-Grain Geometry) library.
+
+# Copyright (C) 2006 Werner Smekal
+# Copyright (C) 2013 Alan W. Irwin
+
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; version 2 of the License.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# CMakeLists.txt for the agg 2.5 library. (AWI has double-checked that
+# the agg_LIB_SRCS and agg_LIB_HDRS lists below are consistent with that
+# version of agg.)
+# This build system currently
# only makes the agg library (static/shared) but no executables
# Put this file in the main directory, create and cd into a build directory,
# and run this cmake command:
# cmake -G "MinGW Makefiles" -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=../local ..
# or similar.
+# It is a fatal error if no working C++ compiler is available to build
+# the shapelib library and utilities
+project(shapelib CXX)
+
+message(STATUS "CMake version = ${CMAKE_VERSION}")
+message(STATUS "CMAKE_SYSTEM = ${CMAKE_SYSTEM}")
+message(STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}")
+
+cmake_minimum_required(VERSION 2.8.10.2 FATAL_ERROR)
+
+# libraries are all shared by default.
+option(BUILD_SHARED_LIBS "Build shared libraries" ON)
+
set(
agg_LIB_SRCS
src/agg_arc.cpp
- src/agg_arrowhead.cpp
+ src/agg_arrowhead.cpp
src/agg_bezier_arc.cpp
- src/agg_bspline.cpp
- src/agg_curves.cpp
- src/agg_vcgen_contour.cpp
- src/agg_vcgen_dash.cpp
- src/agg_vcgen_markers_term.cpp
- src/agg_vcgen_smooth_poly1.cpp
- src/agg_vcgen_stroke.cpp
- src/agg_vcgen_bspline.cpp
- src/agg_gsv_text.cpp
- src/agg_image_filters.cpp
- src/agg_line_aa_basics.cpp
- src/agg_line_profile_aa.cpp
- src/agg_rounded_rect.cpp
- src/agg_sqrt_tables.cpp
- src/agg_embedded_raster_fonts.cpp
- src/agg_trans_affine.cpp
- src/agg_trans_warp_magnifier.cpp
- src/agg_trans_single_path.cpp
- src/agg_trans_double_path.cpp
- src/agg_vpgen_clip_polygon.cpp
- src/agg_vpgen_clip_polyline.cpp
- src/agg_vpgen_segmentator.cpp
- src/ctrl/agg_cbox_ctrl.cpp
- src/ctrl/agg_gamma_ctrl.cpp
- src/ctrl/agg_gamma_spline.cpp
- src/ctrl/agg_rbox_ctrl.cpp
- src/ctrl/agg_slider_ctrl.cpp
- src/ctrl/agg_spline_ctrl.cpp
- src/ctrl/agg_scale_ctrl.cpp
- src/ctrl/agg_polygon_ctrl.cpp
+ src/agg_bspline.cpp
+ src/agg_curves.cpp
+ src/agg_vcgen_contour.cpp
+ src/agg_vcgen_dash.cpp
+ src/agg_vcgen_markers_term.cpp
+ src/agg_vcgen_smooth_poly1.cpp
+ src/agg_vcgen_stroke.cpp
+ src/agg_vcgen_bspline.cpp
+ src/agg_gsv_text.cpp
+ src/agg_image_filters.cpp
+ src/agg_line_aa_basics.cpp
+ src/agg_line_profile_aa.cpp
+ src/agg_rounded_rect.cpp
+ src/agg_sqrt_tables.cpp
+ src/agg_embedded_raster_fonts.cpp
+ src/agg_trans_affine.cpp
+ src/agg_trans_warp_magnifier.cpp
+ src/agg_trans_single_path.cpp
+ src/agg_trans_double_path.cpp
+ src/agg_vpgen_clip_polygon.cpp
+ src/agg_vpgen_clip_polyline.cpp
+ src/agg_vpgen_segmentator.cpp
+ src/ctrl/agg_cbox_ctrl.cpp
+ src/ctrl/agg_gamma_ctrl.cpp
+ src/ctrl/agg_gamma_spline.cpp
+ src/ctrl/agg_rbox_ctrl.cpp
+ src/ctrl/agg_slider_ctrl.cpp
+ src/ctrl/agg_spline_ctrl.cpp
+ src/ctrl/agg_scale_ctrl.cpp
+ src/ctrl/agg_polygon_ctrl.cpp
src/ctrl/agg_bezier_ctrl.cpp
gpc/gpc.c
)
@@ -212,4 +247,4 @@
${agg_LIB_HDRS}
DESTINATION
include/agg2
-)
\ No newline at end of file
+)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|