From 0134bc9dbd9285d433c1ee98c2f00d98207c9573 Mon Sep 17 00:00:00 2001 From: Andrew Sun Date: Wed, 1 May 2019 19:38:09 -0400 Subject: [PATCH] swig: update to 4.0.0 --- mingw-w64-swig/001-relocate.patch | 42 ++++++++++++------------ mingw-w64-swig/002-fix-python-find.patch | 22 ++++++------- mingw-w64-swig/PKGBUILD | 21 ++++++------ 3 files changed, 43 insertions(+), 42 deletions(-) diff --git a/mingw-w64-swig/001-relocate.patch b/mingw-w64-swig/001-relocate.patch index 2d82c022ea..63611ddf7c 100644 --- a/mingw-w64-swig/001-relocate.patch +++ b/mingw-w64-swig/001-relocate.patch @@ -1,19 +1,19 @@ -diff -Naur swig-3.0.2-orig/configure.ac swig-3.0.2/configure.ac ---- swig-3.0.2-orig/configure.ac 2014-06-04 16:00:18.000000000 +0400 -+++ swig-3.0.2/configure.ac 2014-10-02 11:06:43.267800000 +0400 -@@ -2643,6 +2643,8 @@ - esac - AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, ["$SWIG_LIB_WIN_UNIX"], [Directory for SWIG system-independent libraries (Unix install on native Windows)]) +diff -Naur swig-4.0.0.orig/configure.ac swig-4.0.0/configure.ac +--- swig-4.0.0.orig/configure.ac 2019-05-01 18:28:41.445071500 -0400 ++++ swig-4.0.0/configure.ac 2019-05-01 18:56:39.400174900 -0400 +@@ -2765,6 +2765,8 @@ + fi + AC_SUBST(SWIG_LIB_SET) +AC_DEFINE_DIR(SWIG_BINDIR, [bindir], [Swig binary instalation directory]) + AC_CONFIG_FILES([ Makefile swig.spec -diff -Naur swig-3.0.2-orig/Source/Makefile.am swig-3.0.2/Source/Makefile.am ---- swig-3.0.2-orig/Source/Makefile.am 2014-06-04 16:00:18.000000000 +0400 -+++ swig-3.0.2/Source/Makefile.am 2014-10-02 10:55:01.357600000 +0400 -@@ -84,6 +84,7 @@ +diff -Naur swig-4.0.0.orig/Source/Makefile.am swig-4.0.0/Source/Makefile.am +--- swig-4.0.0.orig/Source/Makefile.am 2019-05-01 18:29:03.716208300 -0400 ++++ swig-4.0.0/Source/Makefile.am 2019-05-01 18:56:39.400174900 -0400 +@@ -88,6 +88,7 @@ Swig/misc.c \ Swig/naming.c \ Swig/parms.c \ @@ -21,9 +21,9 @@ diff -Naur swig-3.0.2-orig/Source/Makefile.am swig-3.0.2/Source/Makefile.am Swig/scanner.c \ Swig/stype.c \ Swig/symbol.c \ -diff -Naur swig-3.0.2-orig/Source/Modules/main.cxx swig-3.0.2/Source/Modules/main.cxx ---- swig-3.0.2-orig/Source/Modules/main.cxx 2014-06-04 16:00:18.000000000 +0400 -+++ swig-3.0.2/Source/Modules/main.cxx 2014-10-02 10:59:19.896400000 +0400 +diff -Naur swig-4.0.0.orig/Source/Modules/main.cxx swig-4.0.0/Source/Modules/main.cxx +--- swig-4.0.0.orig/Source/Modules/main.cxx 2019-05-01 18:29:03.606830700 -0400 ++++ swig-4.0.0/Source/Modules/main.cxx 2019-05-01 18:56:39.415856300 -0400 @@ -25,6 +25,8 @@ #include #include // for INT_MAX @@ -33,7 +33,7 @@ diff -Naur swig-3.0.2-orig/Source/Modules/main.cxx swig-3.0.2/Source/Modules/mai // Global variables static Language *lang = 0; // Language method -@@ -199,6 +201,25 @@ +@@ -210,6 +212,25 @@ static List *libfiles = 0; static List *all_output_files = 0; @@ -59,7 +59,7 @@ diff -Naur swig-3.0.2-orig/Source/Modules/main.cxx swig-3.0.2/Source/Modules/mai /* ----------------------------------------------------------------------------- * check_extension() * -@@ -918,7 +939,7 @@ +@@ -943,7 +964,7 @@ SwigLib = NewStringf(""); // Unexpected error } if (Len(SWIG_LIB_WIN_UNIX) > 0) @@ -68,9 +68,9 @@ diff -Naur swig-3.0.2-orig/Source/Modules/main.cxx swig-3.0.2/Source/Modules/mai #else SwigLib = NewString(SWIG_LIB); #endif -diff -Naur swig-3.0.2-orig/Source/Swig/pathtools.c swig-3.0.2/Source/Swig/pathtools.c ---- swig-3.0.2-orig/Source/Swig/pathtools.c 1970-01-01 03:00:00.000000000 +0300 -+++ swig-3.0.2/Source/Swig/pathtools.c 2014-08-29 00:01:04.000000000 +0400 +diff -Naur swig-4.0.0.orig/Source/Swig/pathtools.c swig-4.0.0/Source/Swig/pathtools.c +--- /dev/null 1969-12-31 19:00:00.000000000 -0500 ++++ swig-4.0.0/Source/Swig/pathtools.c 2019-05-01 18:56:39.431426100 -0400 @@ -0,0 +1,499 @@ +/* + .Some useful path tools. @@ -571,9 +571,9 @@ diff -Naur swig-3.0.2-orig/Source/Swig/pathtools.c swig-3.0.2/Source/Swig/pathto + free ((void*)arr); + return result; +} -diff -Naur swig-3.0.2-orig/Source/Swig/pathtools.h swig-3.0.2/Source/Swig/pathtools.h ---- swig-3.0.2-orig/Source/Swig/pathtools.h 1970-01-01 03:00:00.000000000 +0300 -+++ swig-3.0.2/Source/Swig/pathtools.h 2014-10-02 11:26:27.136600000 +0400 +diff -Naur swig-4.0.0.orig/Source/Swig/pathtools.h swig-4.0.0/Source/Swig/pathtools.h +--- /dev/null 1969-12-31 19:00:00.000000000 -0500 ++++ swig-4.0.0/Source/Swig/pathtools.h 2019-05-01 18:56:39.431426100 -0400 @@ -0,0 +1,56 @@ +/* + .Some useful path tools. diff --git a/mingw-w64-swig/002-fix-python-find.patch b/mingw-w64-swig/002-fix-python-find.patch index 8f6ee0f311..7621f434c1 100644 --- a/mingw-w64-swig/002-fix-python-find.patch +++ b/mingw-w64-swig/002-fix-python-find.patch @@ -1,32 +1,32 @@ ---- swig-3.0.12/configure.ac.orig 2017-01-28 02:52:02.000000000 +0300 -+++ swig-3.0.12/configure.ac 2017-03-09 09:12:31.784759400 +0300 -@@ -628,7 +628,13 @@ +--- swig-4.0.0.orig/configure.ac 2019-05-01 18:28:41.445071500 -0400 ++++ swig-4.0.0/configure.ac 2019-05-01 18:32:33.610678900 -0400 +@@ -622,7 +622,13 @@ PYEPREFIX=`($PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)") 2>/dev/null` AC_MSG_RESULT($PYEPREFIX) -- if test x"$PYOSNAME" = x"nt"; then +- if test x"$PYOSNAME" = x"nt" -a x"$PYSEPARATOR" = x"\\"; then + case $host in + *-*-mingw*) PYTHON_SO=.pyd + IS_MINGW=true + ;; + *)IS_MINGW=false;; + esac -+ if test x"$PYOSNAME" = x"nt" && test x"$IS_MINGW" = x"false"; then - # Windows installations are quite different to posix installations ++ if test x"$PYOSNAME" = x"nt" -a x"$PYSEPARATOR" = x"\\" && test x"$IS_MINGW" = x"false"; then + # Windows installations are quite different to posix installations (MinGW path separator is a forward slash) PYPREFIX=`echo "$PYPREFIX" | sed -e 's,\\\\,/,g'` # Forward slashes are easier to use and even work on Windows most of the time PYTHON_SO=.pyd -@@ -777,7 +783,13 @@ - PY3OSNAME=`($PYTHON3 -c "import sys, os; sys.stdout.write(os.name)")` - AC_MSG_RESULT($PY3OSNAME) +@@ -774,7 +780,13 @@ + PYSEPARATOR=`($PYTHON3 -c "import sys, os; sys.stdout.write(os.sep)") 2>/dev/null` + AC_MSG_RESULT($PYSEPARATOR) -- if test x"$PY3OSNAME" = x"nt"; then +- if test x"$PY3OSNAME" = x"nt" -a x"$PYSEPARATOR" = x"\\"; then + case $host in + *-*-mingw*) PYTHON_SO=.pyd + IS_MINGW=true + ;; + *)IS_MINGW=false;; + esac -+ if test x"$PY3OSNAME" = x"nt" && test x"$IS_MINGW" = x"false"; then ++ if test x"$PY3OSNAME" = x"nt" -a x"$PYSEPARATOR" = x"\\" && test x"$IS_MINGW" = x"false"; then # Windows installations are quite different to posix installations # There is no python-config to use AC_MSG_CHECKING(for Python 3.x prefix) diff --git a/mingw-w64-swig/PKGBUILD b/mingw-w64-swig/PKGBUILD index d0167d1409..927c4175f3 100644 --- a/mingw-w64-swig/PKGBUILD +++ b/mingw-w64-swig/PKGBUILD @@ -3,7 +3,7 @@ _realname=swig pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=3.0.12 +pkgver=4.0.0 pkgrel=1 pkgdesc="Generate scripting interfaces to C/C++ code (mingw-w64)" arch=('any') @@ -19,12 +19,13 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" source=(https://downloads.sourceforge.net/${_realname}/${_realname}-${pkgver}.tar.gz 001-relocate.patch 002-fix-python-find.patch) -sha256sums=('7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d' - 'b620efcd725546ed74ade96c26b56c4709fc34af3394d8419159ef2cdcc39036' - '360df7813522ab9f3a56588032b8e33b6396a9f3e61a3d08909bd42bb63dd5fe') +sha256sums=('e8a39cd6437e342cdcbd5af27a9bf11b62dc9efec9248065debcb8276fcbb925' + '89ebd0d68f13eb9889e995329d8e686b1ac8c66c65a08631231fede6a3400656' + '057f0a306aee0d28a5bb6538b569c650e47c05b9848c9477cdeb7bb8c792944d') prepare() { - cd ${_realname}-${pkgver} + cd "${srcdir}/${_realname}-${pkgver}" + rm -f Source/Swig/pathtools.c Source/Swig/pathtools.h > /dev/null 2>&1 || true patch -p1 -i ${srcdir}/001-relocate.patch patch -p1 -i ${srcdir}/002-fix-python-find.patch @@ -32,8 +33,8 @@ prepare() { } build() { - [[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST} - mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} + [[ -d "${srcdir}/build-${MINGW_CHOST}" ]] && rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" ../${_realname}-${pkgver}/configure\ --prefix=${MINGW_PREFIX} \ --build=${MINGW_CHOST} \ @@ -45,8 +46,8 @@ build() { } package() { - cd build-${MINGW_CHOST} + cd "${srcdir}/build-${MINGW_CHOST}" make DESTDIR="${pkgdir}" install - install -D -m644 ${srcdir}/${_realname}-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE - install -D -m644 ${srcdir}/${_realname}-${pkgver}/LICENSE-UNIVERSITIES "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE-UNIVERSITIES + install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE + install -Dm644 ${srcdir}/${_realname}-${pkgver}/LICENSE-UNIVERSITIES "${pkgdir}${MINGW_PREFIX}"/share/licenses/${_realname}/LICENSE-UNIVERSITIES }