-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathappveyor-before-build.sh
117 lines (107 loc) · 4.11 KB
/
appveyor-before-build.sh
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/usr/bin/env bash
set -e
set -x
export PKG_CONFIG_PATH=$HOME/install/lib/pkgconfig
export PATH=$HOME/install/bin:$PATH
#export GTKMM_PLPLOT_BRANCH=master
export GTKMM_PLPLOT_STABLE=2.5
#export XRAYLIB_BRANCH=master
export XRAYLIB_STABLE=4.1.0
export EASYRNG_STABLE=1.2
# install xraylib
if [ -n "$XRAYLIB_BRANCH" ] ; then
git clone -b $XRAYLIB_BRANCH --single-branch --depth=1 https://github.com/tschoonj/xraylib.git
cd xraylib
autoreconf -i
else
curl -L -s -O https://xraylib.tomschoonjans.eu/xraylib-${XRAYLIB_STABLE}.tar.gz
tar xfz xraylib-${XRAYLIB_STABLE}.tar.gz
cd xraylib-${XRAYLIB_STABLE}
fi
./configure --prefix=$HOME/install --disable-static --enable-python --enable-python-integration --enable-python-numpy --disable-ruby --disable-lua --enable-fortran2003
make -j2
make install
cd ..
if test $RNG = "fgsl" ; then
#install gsl
pacman --ask 20 --noconfirm -Su mingw-w64-$MSYS2_ARCH-fgsl
elif test $RNG = "easyRNG" ; then
curl -L -s -O https://github.com/tschoonj/easyRNG/releases/download/easyRNG-${EASYRNG_STABLE}/easyRNG-${EASYRNG_STABLE}.tar.gz
tar xfz easyRNG-${EASYRNG_STABLE}.tar.gz
cd easyRNG-${EASYRNG_STABLE}
./configure --prefix=$HOME/install --disable-static
make -j2
make install
cd ..
else
exit 1
fi
if test -z ${PLOT+x} ; then
# do nothing
:
elif test $PLOT = "gtkmm-plplot" ; then
pacman --ask 20 --noconfirm -Su mingw-w64-$MSYS2_ARCH-gtkmm3
pacman --ask 20 --noconfirm -Su mingw-w64-$MSYS2_ARCH-boost
pacman --ask 20 --noconfirm -Su mingw-w64-$MSYS2_ARCH-cmake
pacman --ask 20 --noconfirm -Su mingw-w64-$MSYS2_ARCH-libpeas
# install plplot from master
#git clone --depth 1 -q git@github.com:PLplot/PLplot.git
#cd plplot
# fix pango.pc
#echo "Requires: gobject-2.0" >> /mingw64/lib/pkgconfig/pango.pc
curl -L -s -O https://downloads.sourceforge.net/project/plplot/plplot/5.15.0%20Source/plplot-5.15.0.tar.gz
tar xfz plplot-5.15.0.tar.gz
cd plplot-5.15.0
cmake -G "MSYS Makefiles" -DENABLE_fortran=OFF -DENABLE_tcl=OFF -DENABLE_tk=OFF -DENABLE_DYNDRIVERS=OFF -DPLD_wingcc=OFF -DCMAKE_INSTALL_PREFIX=$HOME/install .
make -j2
make install
cd ..
# install gtkmm-plplot
if [ -n "$GTKMM_PLPLOT_BRANCH" ] ; then
git clone -b $GTKMM_PLPLOT_BRANCH --single-branch --depth=1 https://github.com/tschoonj/gtkmm-plplot.git
cd gtkmm-plplot
autoreconf -i
else
curl -L -s -O https://github.com/tschoonj/gtkmm-plplot/releases/download/gtkmm-plplot-${GTKMM_PLPLOT_STABLE}/gtkmm-plplot-${GTKMM_PLPLOT_STABLE}.tar.gz
tar xfz gtkmm-plplot-${GTKMM_PLPLOT_STABLE}.tar.gz
cd gtkmm-plplot-${GTKMM_PLPLOT_STABLE}
fi
./configure --prefix=$HOME/install --disable-static
make -j2
make install
cd ..
if test $UPDATER = "true" ; then
pacman --ask 20 --noconfirm -Su mingw-w64-$MSYS2_ARCH-json-glib
fi
fi
if test -n "${GOOGLE_ANALYTICS}" ; then
pushd /usr/local
curl -L -s -O https://www.dropbox.com/s/l6pw1dupx81ulzv/opencl-win64-devel.tar.gz
tar xfz opencl-win64-devel.tar.gz
popd
fi
# install hdf5
curl -L -s -O https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.12/src/hdf5-1.8.12.tar.gz
tar xfz hdf5-1.8.12.tar.gz
cd hdf5-1.8.12
# add support for UTF-8 filenames
curl -H 'Cache-Control: no-cache' -L -s -O https://www.dropbox.com/s/gowzeo6vdhjpxnw/hdf5_1.8.12.diff
patch -p1 < hdf5_1.8.12.diff
autoreconf -i
./configure --disable-fortran --disable-cxx --disable-hl --prefix=$HOME/install --disable-static CPPFLAGS=-D_GNU_SOURCE=1
# patch hdf5 -> https://tschoonj.github.io/blog/2014/01/29/building-a-64-bit-version-of-hdf5-with-mingw-w64/
echo "#ifndef H5_HAVE_WIN32_API" >> src/H5pubconf.h
echo "#ifdef WIN32 /* defined for all windows systems */" >> src/H5pubconf.h
echo "#define H5_HAVE_WIN32_API 1" >> src/H5pubconf.h
echo "#endif" >> src/H5pubconf.h
echo "#endif" >> src/H5pubconf.h
echo "#ifndef H5_HAVE_MINGW" >> src/H5pubconf.h
echo "#ifdef __MINGW32__ /*defined for all MinGW compilers */" >> src/H5pubconf.h
echo "#define H5_HAVE_MINGW 1" >> src/H5pubconf.h
echo "#define H5_HAVE_WINDOWS 1" >> src/H5pubconf.h
echo "#endif" >> src/H5pubconf.h
echo "#endif" >> src/H5pubconf.h
echo "#define H5_BUILT_AS_DYNAMIC_LIB 1" >> src/H5pubconf.h
make -j2
make install
cd ..