Merge branch 'master' into tmp
Conflicts: .travis.yml Examples/Makefile.in Examples/test-suite/director_nspace.i Examples/test-suite/nspace.i Examples/test-suite/nspace_extend.i Source/Modules/lang.cxx configure.ac
This commit is contained in:
commit
a234542543
871 changed files with 29690 additions and 7800 deletions
25
Tools/brew-install
Executable file
25
Tools/brew-install
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Wrapper around 'brew install' emitting a message every minute if the command is still running.
|
||||
# This is used on Travis to ensure the install isn't killed when there is no output over a long period (10 minutes).
|
||||
# Usage: brew-install package, where package is the name of the package for brew to install.
|
||||
|
||||
seconds=0
|
||||
minutes=0
|
||||
brew install $1 &
|
||||
while true; do
|
||||
ps -p$! 2>& 1>/dev/null
|
||||
if [ $? = 0 ]; then
|
||||
if [ $seconds = 60 ]; then
|
||||
let seconds=0
|
||||
let minutes=minutes+1
|
||||
echo "brew install $1 still running ($minutes min)"
|
||||
fi
|
||||
sleep 1
|
||||
let seconds=seconds+1
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
wait $!
|
||||
exit $?
|
||||
|
|
@ -4,7 +4,7 @@ dnl Set the maximum warning verbosity according to C and C++ compiler used.
|
|||
dnl Currently supports g++ and gcc.
|
||||
dnl
|
||||
dnl The compiler options are always added CFLAGS and CXXFLAGS even if
|
||||
dnl these are overidden at configure time. Removing the maximum warning
|
||||
dnl these are overridden at configure time. Removing the maximum warning
|
||||
dnl flags can be removed with --without-maximum-compile-warnings. For example:
|
||||
dnl
|
||||
dnl ./configure --without-maximum-compile-warnings CFLAGS= CXXFLAGS=
|
||||
|
|
|
|||
121
Tools/config/ax_cxx_compile_stdcxx_11.m4
Normal file
121
Tools/config/ax_cxx_compile_stdcxx_11.m4
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
# ============================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
|
||||
# ============================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_COMPILE_STDCXX_11([ext|noext], [nostop])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Check for baseline language coverage in the compiler for the C++11
|
||||
# standard; if necessary, add switches to CXXFLAGS to enable support.
|
||||
# CXX11FLAGS will also contain any necessary switches to enable support.
|
||||
# HAVE_CXX11_COMPILER will additionally be set to yes if there is support.
|
||||
# If the second argument is not specified, errors out if no mode that
|
||||
# supports C++11 baseline syntax can be found. The first argument, if
|
||||
# specified, indicates whether you insist on an extended mode
|
||||
# (e.g. -std=gnu++11) or a strict conformance mode (e.g. -std=c++11).
|
||||
# If neither is specified, you get whatever works, with preference for an
|
||||
# extended mode.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
|
||||
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
|
||||
# Copyright (c) 2012 William Fulton <wsf@fultondesigns.co.uk>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 1
|
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [
|
||||
template <typename T>
|
||||
struct check
|
||||
{
|
||||
static_assert(sizeof(int) <= sizeof(T), "not big enough");
|
||||
};
|
||||
|
||||
typedef check<check<bool>> right_angle_brackets;
|
||||
|
||||
int a;
|
||||
decltype(a) b;
|
||||
|
||||
typedef check<int> check_type;
|
||||
check_type c;
|
||||
check_type&& cr = static_cast<check_type&&>(c);
|
||||
])
|
||||
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
|
||||
m4_if([$1], [], [],
|
||||
[$1], [ext], [],
|
||||
[$1], [noext], [],
|
||||
[m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl
|
||||
m4_if([$2], [], [],
|
||||
[$2], [nostop], [],
|
||||
[m4_fatal([invalid argument `$2' to AX_CXX_COMPILE_STDCXX_11])])dnl
|
||||
AC_LANG_ASSERT([C++])dnl
|
||||
ac_success=no
|
||||
CXX11FLAGS=
|
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features by default,
|
||||
ax_cv_cxx_compile_cxx11,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
|
||||
[ax_cv_cxx_compile_cxx11=yes],
|
||||
[ax_cv_cxx_compile_cxx11=no])])
|
||||
if test x$ax_cv_cxx_compile_cxx11 = xyes; then
|
||||
ac_success=yes
|
||||
fi
|
||||
|
||||
m4_if([$1], [noext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for switch in -std=gnu++11 -std=gnu++0x; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
CXX11FLAGS=$switch
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
|
||||
m4_if([$1], [ext], [], [dnl
|
||||
if test x$ac_success = xno; then
|
||||
for switch in -std=c++11 -std=c++0x; do
|
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
|
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
|
||||
$cachevar,
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
|
||||
[eval $cachevar=yes],
|
||||
[eval $cachevar=no])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"])
|
||||
if eval test x\$$cachevar = xyes; then
|
||||
CXXFLAGS="$CXXFLAGS $switch"
|
||||
CXX11FLAGS=$switch
|
||||
ac_success=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi])
|
||||
|
||||
if test x$ac_success = xno; then
|
||||
if test x$2 != xnostop; then
|
||||
AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.])
|
||||
fi
|
||||
else
|
||||
HAVE_CXX11_COMPILER=yes
|
||||
fi
|
||||
])
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
# This script builds a swig-x.y.z distribution.
|
||||
# Usage : mkdist.py version, where version should be x.y.z
|
||||
# Usage: mkdist.py version branch, where version should be x.y.z and branch is normally 'master'
|
||||
|
||||
import sys
|
||||
import string
|
||||
|
|
@ -16,10 +16,16 @@ def failed():
|
|||
try:
|
||||
version = sys.argv[1]
|
||||
dirname = "swig-" + version
|
||||
branch = sys.argv[2]
|
||||
except:
|
||||
print "Usage: mkdist.py version, where version should be x.y.z"
|
||||
print "Usage: mkdist.py version branch, where version should be x.y.z and branch is normally 'master'"
|
||||
sys.exit(1)
|
||||
|
||||
if sys.version_info[0:2] < (2, 7):
|
||||
print "Error: Python 2.7 is required"
|
||||
sys.exit(3)
|
||||
|
||||
|
||||
# Check name matches normal unix conventions
|
||||
if string.lower(dirname) != dirname:
|
||||
print "directory name ("+dirname+") should be in lowercase"
|
||||
|
|
@ -38,7 +44,7 @@ os.system("rm -f "+dirname+".tar")
|
|||
# Grab the code from git
|
||||
|
||||
print "Checking git repository is in sync with remote repository"
|
||||
os.system("git remote update") == 0 or failed()
|
||||
os.system("git remote update origin") == 0 or failed()
|
||||
command = ["git", "status", "--porcelain", "-uno"]
|
||||
out = subprocess.check_output(command)
|
||||
if out.strip() != "":
|
||||
|
|
@ -47,7 +53,7 @@ if out.strip() != "":
|
|||
print out
|
||||
sys.exit(3)
|
||||
|
||||
command = ["git", "log", "--oneline", "master..origin/master"]
|
||||
command = ["git", "log", "--oneline", branch + "..origin/" + branch]
|
||||
out = subprocess.check_output(command)
|
||||
if out.strip() != "":
|
||||
print "Remote repository has additional modifications to local repository"
|
||||
|
|
@ -55,7 +61,7 @@ if out.strip() != "":
|
|||
print out
|
||||
sys.exit(3)
|
||||
|
||||
command = ["git", "log", "--oneline", "origin/master..master"]
|
||||
command = ["git", "log", "--oneline", "origin/" + branch + ".." + branch]
|
||||
out = subprocess.check_output(command)
|
||||
if out.strip() != "":
|
||||
print "Local repository has modifications not pushed to the remote repository"
|
||||
|
|
|
|||
|
|
@ -15,9 +15,10 @@ def failed(message):
|
|||
|
||||
try:
|
||||
version = sys.argv[1]
|
||||
username = sys.argv[2]
|
||||
branch = sys.argv[2]
|
||||
username = sys.argv[3]
|
||||
except:
|
||||
print "Usage: python mkrelease.py version username"
|
||||
print "Usage: python mkrelease.py version branch username"
|
||||
print "where version should be x.y.z and username is your SF username"
|
||||
sys.exit(1)
|
||||
|
||||
|
|
@ -25,7 +26,7 @@ print "Looking for rsync"
|
|||
os.system("which rsync") and failed("rsync not installed/found. Please install.")
|
||||
|
||||
print "Making source tarball"
|
||||
os.system("python ./mkdist.py " + version) and failed("")
|
||||
os.system("python ./mkdist.py " + version + " " + branch) and failed("")
|
||||
|
||||
print "Build Windows package"
|
||||
os.system("./mkwindows.sh " + version) and failed("")
|
||||
|
|
@ -45,4 +46,4 @@ os.system("rsync --archive --verbose -P --times -e ssh " + "swigwin-" + version
|
|||
|
||||
print "Finished"
|
||||
|
||||
print "Now log in to SourceForge and set the operating systems applicable to the newly uploaded tarball and zip file. Also remember to do a 'git push'."
|
||||
print "Now log in to SourceForge and set the operating systems applicable to the newly uploaded tarball and zip file. Also remember to do a 'git push --tags'."
|
||||
|
|
|
|||
26
Tools/obs-update
Executable file
26
Tools/obs-update
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Update SWIG tarball on openSUSE Build Service to contain the latest from master
|
||||
# Requires the openSUSE Build Service command-line tool (osc)
|
||||
# See http://openbuildservice.org/download/
|
||||
# And these packages: obs-service-tar_scm obs-service-recompress obs-service-set_version
|
||||
|
||||
# Results appear at https://build.opensuse.org/package/show/home:kwk:swig/swig-raw
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
rm -rf home-kwk-swig/swig-raw
|
||||
mkdir -p home-kwk-swig
|
||||
cd home-kwk-swig
|
||||
# check out 'swig-raw'
|
||||
osc co -o swig-raw home:kwk:swig swig-raw
|
||||
cd swig-raw
|
||||
# remove existing tarball
|
||||
osc rm swig*tar.bz2
|
||||
# fetch latest master branch from git and create tarball
|
||||
osc service disabledrun
|
||||
# add new tarball
|
||||
osc addremove
|
||||
# check changes into build service, triggers build
|
||||
osc ci
|
||||
Loading…
Add table
Add a link
Reference in a new issue