-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·64 lines (48 loc) · 1.59 KB
/
build.sh
File metadata and controls
executable file
·64 lines (48 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cd src
curl https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.3.0a.tar.gz | tar -xz
cd libspatialite-4.3.0a
if [[ `uname -s` == MINGW* ]]; then
sed -i configure.ac -e "s|mingw32|${MINGW_CHOST}|g"
curl -O https://raw.githubusercontent.com/msys2/MINGW-packages/5051440a86a02aef20bf54dfcbbf3e0a3171bf51/mingw-w64-libspatialite/01-fix-pkgconfig.patch
patch -p1 -i 01-fix-pkgconfig.patch
autoreconf
configureArgs="--host=${MINGW_CHOST} --target=${MINGW_CHOST} --build=${MINGW_CHOST} --prefix=${MINGW_PREFIX}"
elif [[ `uname -s` == Darwin* ]]; then
sed -i "" "s/shrext_cmds='\`test \\.\$module = .yes && echo .so \\|\\| echo \\.dylib\`'/shrext_cmds='.dylib'/g" configure
fi
mkdir build
cd build
../configure ${configureArgs} \
--disable-proj \
--disable-freexl \
--disable-libxml2 \
--disable-examples
make
make install-strip
if [[ `uname -s` == MINGW* ]]; then
cd ../../..
mkdir artifacts
cd artifacts
mkdir runtimes
cd runtimes
rid="win-x64"
if [ $MSYSTEM = "MINGW32" ]; then
rid="win-x86"
fi
mkdir ${rid}
cd ${rid}
mkdir native
cd native
if [ $MSYSTEM = "MINGW32" ]; then
cp /mingw32/bin/libgcc_s_dw2-1.dll .
else
cp /mingw64/bin/libgcc_s_seh-1.dll .
fi
cp ${MINGW_PREFIX}/bin/libgeos.dll .
cp ${MINGW_PREFIX}/bin/libgeos_c.dll .
cp ${MINGW_PREFIX}/bin/libiconv-2.dll .
cp ${MINGW_PREFIX}/bin/libstdc++-6.dll .
cp ${MINGW_PREFIX}/bin/libwinpthread-1.dll .
cp ${MINGW_PREFIX}/lib/mod_spatialite.dll .
cp ${MINGW_PREFIX}/bin/zlib1.dll .
fi