Skip to content
This repository was archived by the owner on Apr 20, 2020. It is now read-only.

Commit a6851ed

Browse files
committed
try with patches
1 parent d35c4c9 commit a6851ed

3 files changed

Lines changed: 52 additions & 1 deletion

File tree

build_tarballs.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,22 @@ version = v"1.8.5" # also change in raw script string
88
sources = [
99
"http://download.osgeo.org/libspatialindex/spatialindex-src-$version.tar.bz2" =>
1010
"31ec0a9305c3bd6b4ad60a5261cba5402366dd7d1969a8846099717778e9a50a",
11+
"./patches"
1112
]
1213

1314
# Bash recipe for building across all platforms
1415
script = raw"""
1516
cd $WORKSPACE/srcdir
17+
1618
cd spatialindex-src-1.8.5/
1719
20+
patch < ${WORKSPACE}/srcdir/makefile.patch
21+
rm Makefile.am.orig
22+
23+
if [ $target = "x86_64-w64-mingw32" ] || [ $target = "i686-w64-mingw32"]; then
24+
patch < ${WORKSPACE}/srcdir/header-check.patch
25+
fi
26+
1827
# Show options in the log
1928
./configure --help
2029
@@ -25,7 +34,7 @@ make install
2534

2635
# These are the platforms we will build for by default, unless further
2736
# platforms are passed in on the command line
28-
platforms = supported_platforms()
37+
platforms = [Windows(:x86_64)] #supported_platforms()
2938

3039
# The products that we will ensure are always built
3140
products(prefix) = [

patches/header-check.patch

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
This file is part of MXE. See LICENSE.md for licensing information.
2+
3+
Contains ad hoc patches for cross building.
4+
5+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
6+
From: Luke Potgieter <fried.roadkill+ght@gmail.com>
7+
Date: Thu, 24 Aug 2017 10:53:39 +0200
8+
Subject: [PATCH 1/1] Remove explicit header check - mingw does not ship with
9+
this header.
10+
11+
12+
diff --git a/configure.ac b/configure.ac
13+
index 1111111..2222222 100644
14+
--- a/configure.ac
15+
+++ b/configure.ac
16+
@@ -38,7 +38,7 @@ AC_CHECK_HEADERS(pthread.h, [
17+
LIBS="$LIBS -lpthread"
18+
#endif])
19+
20+
-AC_CHECK_HEADERS(sys/resource.h,, [AC_MSG_ERROR([cannot find sys/resource.h, bailing out])])
21+
+#AC_CHECK_HEADERS(sys/resource.h,, [AC_MSG_ERROR([cannot find sys/resource.h, bailing out])])
22+
AC_CHECK_HEADERS(sys/time.h,, [AC_MSG_ERROR([cannot find sys/time.h, bailing out])])
23+
AC_CHECK_HEADERS(stdint.h,, [AC_MSG_ERROR([cannot find stdint.h, bailing out])])
24+
AC_CHECK_HEADERS(features.h)

patches/makefile.patch

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--- Makefile.am.orig
2+
+++ Makefile.am
3+
@@ -18,8 +18,13 @@
4+
libspatialindex.la \
5+
src/capi/libsidxc.la
6+
7+
-libspatialindex_la_LDFLAGS = -version-info 4:1:0 -no-undefined -lstdc++
8+
-libspatialindex_c_la_LDFLAGS = -version-info 4:1:0 -no-undefined -lstdc++
9+
+# Dummy file to force C++ linking, see this page for more details:
10+
+# https://www.gnu.org/software/automake/manual/html_node/Libtool-Convenience-Libraries.html
11+
+nodist_EXTRA_libspatialindex_la_SOURCES = dummy.cxx
12+
+nodist_EXTRA_libspatialindex_c_la_SOURCES = dummy.cxx
13+
+
14+
+libspatialindex_la_LDFLAGS = -version-info 4:1:0 -no-undefined
15+
+libspatialindex_c_la_LDFLAGS = -version-info 4:1:0 -no-undefined
16+
17+
EXTRA_DIST = INSTALL.WIN \
18+
spatialindex.sln \

0 commit comments

Comments
 (0)