4 export WINEPATH='/home/blp/pspp/mingw/inst/bin;/usr/x86_64-w64-mingw32/lib;/usr/lib/gcc/x86_64-w64-mingw32/10-win32;/home/blp/pspp/mingw/inst/bin'
7 base=/home/blp/pspp/mingw-build
8 cache=/home/blp/pspp/cache
11 local url=$1 file=$cache/$(basename $1)
12 if test ! -f "$file"; then
14 wget -O "$file" "$url" || exit 1
22 file=$(fetch "$url") || return 1
23 tar xf "$file" || return 1
25 dir=$(tar tf "$file" | head -1)
30 test -x config.status || mingw-configure "$@"
33 (enter https://ftp.gnu.org/pub/gnu/gsl/gsl-1.16.tar.gz
38 (enter https://github.com/win-iconv/win-iconv/archive/v0.0.8.tar.gz
39 mingw-cmake -DBUILD_STATIC=1 .
42 (enter https://ftp.gnu.org/pub/gnu/gettext/gettext-0.21.tar.gz
47 (enter ftp://xmlsoft.org/libxml2/libxml2-2.9.10.tar.gz
48 : fetch ftp://xmlsoft.org/libxml2/libxml2-2.9.10.tar.gz.asc
49 : gpg libxml2-2.9.10.tar.gz.asc
50 mingw_configure --without-python
53 (enter https://download.sourceforge.net/libpng/libpng-1.6.37.tar.xz
57 (enter https://www.cairographics.org/releases/pixman-0.40.0.tar.gz
61 (enter https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz
65 (enter https://download.gnome.org/sources/glib/2.64/glib-2.64.5.tar.xz
68 (enter https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz
69 test -f autogen.sh || patch -p1 < $cache/bzip2-1.0.5-autoconfiscated.patch
70 grep -q fdopen bzlib.h || patch -p1 < $cache/bzip2-use-cdecl-calling-convention.patch
72 test -x configure || ./autogen.sh
76 (enter https://download.savannah.gnu.org/releases/freetype/freetype-2.10.2.tar.xz
83 --enable-freetype-config \
87 (enter https://www.cairographics.org/releases/cairo-1.16.0.tar.xz
88 if grep -q font-variations test/Makefile.sources; then
89 sed -i '/font-variations/d' test/Makefile.sources
90 NOCONFIGURE=: ./autogen.sh
92 mingw_configure --enable-gobject
94 sed -i.bak '/^Libs:/s/^\(.*\)$/\1 -lpixman-1 -lgdi32 -lssp/' ~/pspp/mingw/inst/lib/pkgconfig/cairo.pc)
96 (enter https://fontconfig.org/release/fontconfig-2.13.1.tar.bz2
97 grep -q ENABLE_TESTS configure.ac || patch -p1 < $cache/fontconfig_tests.patch
98 grep -q ENABLE_TESTS configure || autoreconf -ifv
99 mingw_configure --disable-docs --disable-tests --with-arch=x86_64 --enable-libxml2
102 (enter https://github.com/harfbuzz/harfbuzz/releases/download/2.6.8/harfbuzz-2.6.8.tar.xz
103 mingw_configure --enable-shared --enable-static --enable-delay-load
104 make -j128 install LDFLAGS=-lpthread)
106 (enter https://ftp.gnome.org/pub/GNOME/sources/pango/1.46/pango-1.46.0.tar.xz
107 mingw-mesonbuild -Dintrospection=false -Dgtk_doc=false -Dc_link_args='-L/home/blp/pspp/mingw/inst/lib -fstack-protector -lssp -lpixman-1 -lpng -lz')
109 (enter https://github.com/GNOME/atk/archive/ATK_2_36_0.tar.gz
110 mingw-mesonbuild --default-library=both -Dintrospection=false -Dgtk_doc=false)
112 (enter https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/archive/2.40.0/gdk-pixbuf-2.40.0.tar.gz
113 mingw-mesonbuild -Dgir=false -Drelocatable=true -Djasper=true -Dx11=false \
114 -Dbuiltin_loaders=bmp,gif,ico,jpeg,tiff,png)
116 (enter https://github.com/anholt/libepoxy/releases/download/1.5.4/libepoxy-1.5.4.tar.xz
119 (enter https://download.gnome.org/sources/gtk+/3.24/gtk+-3.24.21.tar.xz
120 mingw_configure --disable-cups GLIB_COMPILE_RESOURCES=glib-compile-resources GLIB_COMPILE_SCHEMAS=glib-compile-schemas
123 (enter https://download.gnome.org/sources/gtksourceview/3.24/gtksourceview-3.24.11.tar.xz
124 mingw_configure --disable-static --disable-gtk-doc --disable-introspection
126 # Most recent step: add -L/usr/lib/gcc/x86_64-w64-mingw32/10-win32 to mingw-configure LDFLAGS
128 (enter https://download.gnome.org/sources/librsvg/2.50/librsvg-2.50.0.tar.xz
129 ln -s ~/pspp/mingw/inst/bin/gdk-pixbuf-query-loaders.exe gdk-pixbuf-query-loaders
131 RUST_TARGET=x86_64-pc-windows-gnu RUST_TARGET_SUBDIR=$RUST_TARGET/release mingw-configure --without-pic --enable-introspection=no
132 RUST_TARGET=x86_64-pc-windows-gnu RUST_TARGET_SUBDIR=$RUST_TARGET/release PKG_CONFIG_PATH=/home/blp/pspp/mingw/inst/lib/pkgconfig CARGO_TARGET_ARGS=--target=x86_64-pc-windows-gnu make -j128 -e V=1 LIBS='-luserenv'
135 (enter https://ftp.gnu.org/pub/gnu/termcap/termcap-1.3.1.tar.gz
139 x86_64-w64-mingw32-gcc -shared -Wl,--out-implib,libtermcap.dll.a \
140 -o libtermcap-0.dll termcap.o tparam.o version.o
141 make install prefix=/home/blp/pspp/mingw/inst exec_prefix=/home/blp/pspp/mingw/inst oldincludedir=
142 install -m755 libtermcap-0.dll /home/blp/pspp/mingw/inst/bin
143 install -m755 libtermcap.dll.a /home/blp/pspp/mingw/inst/lib/)
145 (enter https://ftp.gnu.org/pub/gnu/readline/readline-8.0.tar.gz
149 (enter http://alpha.gnu.org/gnu/ssw/spread-sheet-widget-0.6.tar.gz
153 (enter https://icon-theme.freedesktop.org/releases/hicolor-icon-theme-0.17.tar.xz
157 (enter https://download.gnome.org/sources/adwaita-icon-theme/3.37/adwaita-icon-theme-3.37.92.tar.xz