swig: pull in latest upstream stable

Upgraded dev-lang/swig to version 2.0.4-r1 on amd64, arm, x86

Needed for newer python (to drop virtual/python requirement).

BUG=chromium-os:31032
TEST=`cbuildbot chromiumos-sdk {amd64,arm,x86}-generic-full` worked

Change-Id: Ic411e89bee77ae3eefb92ff541967bbb1b206701
Reviewed-on: https://gerrit.chromium.org/gerrit/28862
Reviewed-by: Ryan Cui <rcui@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
Mike Frysinger 2012-07-31 18:06:10 -04:00 committed by Gerrit
parent a93f7a5ae0
commit 4917b39b5c
7 changed files with 100 additions and 108 deletions

View File

@ -1 +1 @@
DIST swig-1.3.36.tar.gz 4604982 RMD160 bd57f6837de1dc3aebefd9ad23a52235deefcd33 SHA1 eed715da3200f45cfe688a64ab6630eadf118ae4 SHA256 47439796e3332dd6f5f9e2a45a26c5dc2a6bc93461c2e009d7cb493d1816dc1f DIST swig-2.0.4.tar.gz 5148567 RMD160 7e5314de2b2443a76ea484909072ca63b2b1f1f7 SHA1 ace563563a8f6f367ba82236e5bea240adea0d94 SHA256 763a117730d26f8e5ed67f5718c6c0761fbb8461680fc20269db8c0839e1ec8a

View File

@ -1,11 +0,0 @@
--- swig-1.3.36/configure.in 2008-06-24 00:26:07.000000000 +0400
+++ swig-1.3.36-nu/configure.in 2008-08-24 12:45:05.000000000 +0400
@@ -1082,7 +1082,7 @@
if test -n "$MZSCHEME"; then
AC_MSG_CHECKING(for MzScheme dynext object)
-MZDYNOBJ=`$MZSCHEME --mute-banner --version --eval '(begin (require (lib "link.ss" "dynext")) (with-handlers (((lambda args #t) (lambda args #f))) (for-each (lambda (x) (display x) (display " ")) ((current-make-standard-link-libraries)))) (with-handlers (((lambda args #t) (lambda args #f))) (for-each (lambda (x) (display x) (display " ")) (expand-for-link-variant (current-standard-link-libraries)))))'`
+MZDYNOBJ=`$MZSCHEME --eval '(begin (require dynext/link) (with-handlers (((lambda args #t) (lambda args #f))) (for-each (lambda (x) (printf "~a " x)) (expand-for-link-variant (current-standard-link-libraries)))))'`
AC_MSG_RESULT($MZDYNOBJ)
fi
fi

View File

@ -0,0 +1,46 @@
Index: Source/Swig/stype.c
===================================================================
--- Source/Swig/stype.c (Revision 12813)
+++ Source/Swig/stype.c (Revision 12814)
@@ -823,7 +823,8 @@
Insert(result, 0, "(");
Append(result, ")");
}
- isreference = 1;
+ if (!isfunction)
+ isreference = 1;
} else if (SwigType_isarray(element)) {
DOH *size;
if (firstarray && !isreference) {
@@ -869,10 +870,8 @@
cast = NewStringf("(%s)", result);
}
if (name) {
- if (!isfunction) {
- if (isreference) {
- Append(cast, "*");
- }
+ if (isreference) {
+ Append(cast, "*");
}
Append(cast, name);
}
Index: Examples/test-suite/funcptr_cpp.i
===================================================================
--- Examples/test-suite/funcptr_cpp.i (Revision 12813)
+++ Examples/test-suite/funcptr_cpp.i (Revision 12814)
@@ -20,3 +20,14 @@
%constant int (*ADD_BY_VALUE)(const int &, int) = addByValue;
%constant int * (*ADD_BY_POINTER)(const int &, int) = addByPointer;
%constant int & (*ADD_BY_REFERENCE)(const int &, int) = addByReference;
+
+
+%inline %{
+typedef int AddByValueTypedef(const int &a, int b);
+typedef int * AddByPointerTypedef(const int &a, int b);
+typedef int & AddByReferenceTypedef(const int &a, int b);
+void *typedef_call1(AddByValueTypedef *& precallback, AddByValueTypedef * postcallback) { return 0; }
+void *typedef_call2(AddByPointerTypedef *& precallback, AddByPointerTypedef * postcallback) { return 0; }
+void *typedef_call3(AddByReferenceTypedef *& precallback, AddByReferenceTypedef * postcallback) { return 0; }
+%}
+

View File

@ -1,83 +0,0 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/swig/swig-1.3.36.ebuild,v 1.7 2009/03/02 19:05:23 armin76 Exp $
inherit flag-o-matic mono eutils #48511
DESCRIPTION="Simplified Wrapper and Interface Generator"
HOMEPAGE="http://www.swig.org/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="as-is"
SLOT="0"
KEYWORDS="alpha amd64 arm ~hppa ia64 ppc ~ppc64 s390 sh sparc x86 ~x86-fbsd"
IUSE="chicken clisp doc guile java lua mono mzscheme ocaml octave perl php pike python R ruby tcl tk" #gcj
RESTRICT="test"
DEPEND="
chicken? ( dev-scheme/chicken )
clisp? ( dev-lisp/clisp )
guile? ( dev-scheme/guile )
java? ( virtual/jdk )
lua? ( dev-lang/lua )
mono? ( dev-lang/mono )
mzscheme? ( dev-scheme/plt-scheme )
perl? ( dev-lang/perl )
php? ( virtual/php )
pike? ( dev-lang/pike )
python? ( virtual/python )
R? ( dev-lang/R )
ocaml? ( dev-lang/ocaml )
octave? ( sci-mathematics/octave )
ruby? ( virtual/ruby )
tcl? ( dev-lang/tcl )
tk? ( dev-lang/tk )
"
# gcj? ( sys-devel/gcc[+gcj] )
src_unpack() {
unpack ${A};cd "${S}"
if has_version '>=dev-scheme/plt-scheme-4'; then
epatch "${FILESDIR}"/fix-for-PLT4.patch
./autogen.sh
fi
}
src_compile() {
strip-flags
local myconf
if use ruby ; then
local rubyver=$(ruby --version | cut -d '.' -f 1,2)
export RUBY="/usr/$(get_libdir)/ruby/${rubyver/ruby /}/"
fi
econf \
$(use_with chicken) \
$(use_with clisp) \
$(use_with guile) \
$(use_with java java "${JAVA_HOME}") \
$(use_with java javaincl "${JAVA_HOME}/include") \
$(use_with lua) \
$(use_with mono csharp) \
$(use_with mzscheme) \
$(use_with ocaml) \
$(use_with octave) \
$(use_with perl perl5 /usr/bin/perl) \
$(use_with php php4) \
$(use_with pike) \
$(use_with python) \
$(use_with R r) \
$(use_with ruby ruby /usr/bin/ruby) \
$(use_with tk x) \
$(use_with tcl) \
|| die
emake || die
}
src_install() {
emake install DESTDIR="${D}" || die
dodoc ANNOUNCE CHANGES CHANGES.current FUTURE NEW README TODO
use doc && dohtml -r Doc/{Devel,Manual}
}

View File

@ -0,0 +1,39 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/swig/swig-2.0.4-r1.ebuild,v 1.10 2012/04/26 20:39:51 aballier Exp $
EAPI=3
inherit base
DESCRIPTION="Simplified Wrapper and Interface Generator"
HOMEPAGE="http://www.swig.org/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-3 as-is"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="ccache doc pcre"
RESTRICT="test"
DEPEND="pcre? ( dev-libs/libpcre )
ccache? ( sys-libs/zlib )"
RDEPEND="${DEPEND}"
PATCHES=( "${FILESDIR}"/${P}-typedef.patch )
src_configure() {
econf \
--disable-dependency-tracking \
$(use_enable ccache) \
$(use_with pcre)
}
src_install() {
emake DESTDIR="${D}" install || die
dodoc ANNOUNCE CHANGES CHANGES.current README TODO || die
if use doc; then
dohtml -r Doc/{Devel,Manual} || die
fi
}

View File

@ -1,13 +0,0 @@
DEFINED_PHASES=compile install unpack
DEPEND=chicken? ( dev-scheme/chicken ) clisp? ( dev-lisp/clisp ) guile? ( dev-scheme/guile ) java? ( virtual/jdk ) lua? ( dev-lang/lua ) mono? ( dev-lang/mono ) mzscheme? ( dev-scheme/plt-scheme ) perl? ( dev-lang/perl ) php? ( virtual/php ) pike? ( dev-lang/pike ) python? ( virtual/python ) R? ( dev-lang/R ) ocaml? ( dev-lang/ocaml ) octave? ( sci-mathematics/octave ) ruby? ( virtual/ruby ) tcl? ( dev-lang/tcl ) tk? ( dev-lang/tk )
DESCRIPTION=Simplified Wrapper and Interface Generator
HOMEPAGE=http://www.swig.org/
IUSE=chicken clisp doc guile java lua mono mzscheme ocaml octave perl php pike python R ruby tcl tk
KEYWORDS=alpha amd64 arm ~hppa ia64 ppc ~ppc64 s390 sh sparc x86 ~x86-fbsd
LICENSE=as-is
RDEPEND=chicken? ( dev-scheme/chicken ) clisp? ( dev-lisp/clisp ) guile? ( dev-scheme/guile ) java? ( virtual/jdk ) lua? ( dev-lang/lua ) mono? ( dev-lang/mono ) mzscheme? ( dev-scheme/plt-scheme ) perl? ( dev-lang/perl ) php? ( virtual/php ) pike? ( dev-lang/pike ) python? ( virtual/python ) R? ( dev-lang/R ) ocaml? ( dev-lang/ocaml ) octave? ( sci-mathematics/octave ) ruby? ( virtual/ruby ) tcl? ( dev-lang/tcl ) tk? ( dev-lang/tk )
RESTRICT=test
SLOT=0
SRC_URI=mirror://sourceforge/swig/swig-1.3.36.tar.gz
_eclasses_=eutils 33ef77a15337022e05342d2c772a7a5a flag-o-matic 01a8b1eb019305bc4b4a8bd0b04e4cd8 mono 1b3a5799422dfe677c9d09f162d99cc0 multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 6526ac6fc9aedf391efb91fcd75ace68 user 9e552f935106ff0bc92af16da64b4b29
_md5_=28d3ee79e54da860ce909881d2352d18

View File

@ -0,0 +1,14 @@
DEFINED_PHASES=compile configure install prepare unpack
DEPEND=pcre? ( dev-libs/libpcre ) ccache? ( sys-libs/zlib )
DESCRIPTION=Simplified Wrapper and Interface Generator
EAPI=3
HOMEPAGE=http://www.swig.org/
IUSE=ccache doc pcre
KEYWORDS=alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris
LICENSE=GPL-3 as-is
RDEPEND=pcre? ( dev-libs/libpcre ) ccache? ( sys-libs/zlib )
RESTRICT=test
SLOT=0
SRC_URI=mirror://sourceforge/swig/swig-2.0.4.tar.gz
_eclasses_=base fc89786f3f7e7bcf03334359bd5b639b eutils 33ef77a15337022e05342d2c772a7a5a multilib 5f4ad6cf85e365e8f0c6050ddd21659e portability 0be430f759a631e692678ed796e09f5c toolchain-funcs 6526ac6fc9aedf391efb91fcd75ace68 user 9e552f935106ff0bc92af16da64b4b29
_md5_=9d0664987e89b1341dbdd77c159640cf