|
From: <ai...@us...> - 2013-10-13 00:56:31
|
Revision: 12595
http://sourceforge.net/p/plplot/code/12595
Author: airwin
Date: 2013-10-13 00:56:24 +0000 (Sun, 13 Oct 2013)
Log Message:
-----------
Add swig build configuration.
Tested by: Alan W. Irwin <ai...@us...> by
using the cmake option -DBUILD_THE_BUILDTOOLS=ON and building
the resulting build_swig target on both Linux and MSYS/Wine.
Modified Paths:
--------------
trunk/cmake/build_projects/CMakeLists.txt
trunk/cmake/build_projects/add_packages.xml
Added Paths:
-----------
trunk/cmake/build_projects/swig/
trunk/cmake/build_projects/swig/bp.cmake
Modified: trunk/cmake/build_projects/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/CMakeLists.txt 2013-10-13 00:51:13 UTC (rev 12594)
+++ trunk/cmake/build_projects/CMakeLists.txt 2013-10-13 00:56:24 UTC (rev 12595)
@@ -252,7 +252,7 @@
#cmake
pkg-config
#subversion
- libpcre
+ swig
)
else(BUILD_THE_BUILDTOOLS)
# List of all configurations. Order doesn't matter because multiple
Modified: trunk/cmake/build_projects/add_packages.xml
===================================================================
--- trunk/cmake/build_projects/add_packages.xml 2013-10-13 00:51:13 UTC (rev 12594)
+++ trunk/cmake/build_projects/add_packages.xml 2013-10-13 00:56:24 UTC (rev 12595)
@@ -41,7 +41,13 @@
<autotools id="ragel">
<branch hash="sha256:dd7f7d22f3a58147379bda61334d341c2caa0caf9f71897e3e4ec05c8f398764" module="ragel/ragel-6.8.tar.gz" repo="http://www.complang.org/" size="1211146" version="6.8"/>
</autotools>
- <autotools autogenargs="--enable-unicode-properties --enable-pcre16 --enable-pcre32 --enable-pcregrep-libz --disable-static" id="libpcre">
+ <autotools autogenargs="--enable-unicode-properties --enable-pcre16 --enable-pcre32 --disable-static" id="libpcre">
<branch hash="md5:21514018448ac10062ece7a668fca949" module="pcre/pcre-8.33.tar.bz2" repo="http://downloads.sourceforge.net/" size="1211146" version="8.33"/>
</autotools>
+ <autotools autogenargs="--with-pcre-prefix=${BP_CMAKE_INSTALL_PREFIX}" id="swig">
+ <branch hash="sha256:63780bf29f53937ad399a1f68bccb3730c90f65746868c4cdfc25cafcd0a424e" module="swig/swig/swig-2.0.11/swig-2.0.11.tar.gz" repo="http://downloads.sourceforge.net/" size="1211146" version="6.8"/>
+ <dependencies>
+ <dep package="libpcre"/>
+ </dependencies>
+ </autotools>
</moduleset>
Added: trunk/cmake/build_projects/swig/bp.cmake
===================================================================
--- trunk/cmake/build_projects/swig/bp.cmake (rev 0)
+++ trunk/cmake/build_projects/swig/bp.cmake 2013-10-13 00:56:24 UTC (rev 12595)
@@ -0,0 +1,96 @@
+# swig/bp.cmake
+# N.B. this file is generated so if you edit it you will lose all your
+# changes the next time it is generated (typically by running
+# either/both the update_added_packages.sh or update_pango_packages.sh
+# scripts). If those scripts do not provide good results, then
+# consider changing their source files (e.g., by editing the files
+# used in those scripts) or add a patch to be run by those scripts).
+
+# This file should be included directly or indirectly from a top-level
+# CMakeLists.txt file to configure the build of swig.
+
+# 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.
+
+# Protect against configuring a build twice in one CMake call
+if(swig_configured)
+ return()
+endif(swig_configured)
+set(swig_configured ON)
+
+# List of dependencies (most of which are build tools) which should be
+# ignored.
+set(BP_ignored_dependencies_LIST pkg-config;bison;flex;python2-devel;libXft ${extra_ignored_dependencies_list})
+
+set(swig_dependencies_LIST libpcre)
+# Remove dependencies that should be ignored.
+if(swig_dependencies_LIST)
+ list(REMOVE_ITEM swig_dependencies_LIST ${BP_ignored_dependencies_LIST})
+endif(swig_dependencies_LIST)
+
+set(swig_dependencies_targets)
+foreach(build_configuration ${swig_dependencies_LIST})
+ if(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake)
+ include(${build_configuration}/bp.cmake)
+ list(APPEND swig_dependencies_targets build_${build_configuration})
+ else(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake)
+ message(STATUS "Warning: A build_configuration for ${build_configuration} does not exist so it is assumed this dependency of swig has been installed another way.")
+ endif(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake)
+endforeach(build_configuration ${swig_dependences_LIST})
+
+# This can be safely done only after above includes.
+set(BP_PACKAGE swig)
+
+# Data that is related to downloads.
+set(${BP_PACKAGE}_URL http://downloads.sourceforge.net/swig/swig/swig-2.0.11/swig-2.0.11.tar.gz)
+set(${BP_PACKAGE}_DOWNLOAD_HASH_TYPE SHA256)
+set(${BP_PACKAGE}_DOWNLOAD_HASH 63780bf29f53937ad399a1f68bccb3730c90f65746868c4cdfc25cafcd0a424e)
+
+# 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}")
+ set(${BP_PACKAGE}_SET_CFLAGS "CFLAGS=$ENV{CFLAGS}")
+else(MSYS_PLATFORM)
+ set(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}")
+ set(${BP_PACKAGE}_SET_CFLAGS "CFLAGS=$ENV{CFLAGS}")
+endif(MSYS_PLATFORM)
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
+
+ExternalProject_Add(
+ build_${BP_PACKAGE}
+ DEPENDS ${${BP_PACKAGE}_dependencies_targets}
+ URL ${${BP_PACKAGE}_URL}
+ URL_HASH ${${BP_PACKAGE}_DOWNLOAD_HASH_TYPE}=${${BP_PACKAGE}_DOWNLOAD_HASH}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${${BP_PACKAGE}_SET_CFLAGS} ${source_PATH}/${BP_CONFIGURE_COMMAND} --with-pcre-prefix=${BP_CMAKE_INSTALL_PREFIX}
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND}
+ BUILD_IN_SOURCE OFF
+ 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.
|