wip update
[nyanlinux.git] / builders / fvwm-1 / builder.sh
blobe9f880f85b76e75378762002ef62e35862555de6
1 src_name=fvwm
2 version=2.6.8
3 archive_name=$src_name-$version.tar.gz
4 url0=https://github.com/fvwmorg/fvwm/releases/download/$version/$archive_name
6 src_dir=$src_dir_root/$src_name-$version
7 rm -Rf $src_dir
8 cd $src_dir_root
9 tar xf $archive_name
11 build_dir=$builds_dir_root/$pkg_name-$version
12 rm -Rf $build_dir
13 mkdir -p $build_dir
14 cd $build_dir
16 export "PKG_CONFIG_PATH=\
17 /nyan/expat/current/lib/pkgconfig:\
18 /nyan/nyanuuid/current/lib/pkgconfig:\
19 /nyan/fontconfig/current/lib/pkgconfig:\
20 /nyan/libXft/current/lib/pkgconfig:\
21 /nyan/libXfixes/current/lib/pkgconfig:\
22 /nyan/libSM/current/lib/pkgconfig:\
23 /nyan/libICE/current/lib/pkgconfig:\
24 /nyan/libXt/current/lib/pkgconfig:\
25 /nyan/zlib/current/lib/pkgconfig:\
26 /nyan/freetype/current/lib/pkgconfig:\
27 /nyan/libpng/current/lib/pkgconfig:\
28 /nyan/libXcursor/current/lib/pkgconfig:\
29 /nyan/libXrandr/current/lib/pkgconfig:\
30 /nyan/libXrender/current/lib/pkgconfig:\
31 /nyan/libXext/current/lib/pkgconfig:\
32 /nyan/libXau/current/lib/pkgconfig:\
33 /nyan/libpthread-stubs/current/lib/pkgconfig:\
34 /nyan/libxcb/current/lib/pkgconfig:\
35 /nyan/xorgproto/current/share/pkgconfig:\
36 /nyan/libX11/current/lib/pkgconfig"
38 # configure runs some programs
39 OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
40 export "LD_LIBRARY_PATH=\
41 /nyan/libX11/current/lib:\
42 /nyan/libxcb/current/lib:\
43 /nyan/libXau/current/lib:\
44 /nyan/libXext/current/lib:\
45 /nyan/libXrandr/current/lib:\
46 /nyan/libXrender/current/lib:\
47 /nyan/libXcursor/current/lib:\
48 /nyan/libXfixes/current/lib:\
49 /nyan/libXft/current/lib:\
50 /nyan/fontconfig/current/lib:\
51 /nyan/freetype/current/lib:\
52 /nyan/libpng/current/lib:\
53 $LD_LIBRARY_PATH"
55 export "CPPFLAGS=$(pkg-config --cflags-only-I x11 fontconfig xt xext xcursor)"
56 export "CC=gcc -B/nyan/glibc/current/lib -L/nyan/glibc/current/lib -static-libgcc \
57 -Wl,-rpath-link,\
58 /nyan/libpng/current/lib:\
59 /nyan/fontconfig/current/lib:\
60 /nyan/freetype/current/lib:\
61 /nyan/libXrender/current/lib:\
62 /nyan/libXau/current/lib:\
63 /nyan/libxcb/current/lib:\
64 /nyan/libXfixes/current/lib:\
65 /nyan/glibc/current/lib"
66 export "CFLAGS=-O2 -pipe -fPIC $(pkg-config --cflags-only-other x11)"
67 export "LDFLAGS=$(pkg-config --libs x11 xext xrandr xrender xcursor xft)"
68 export FT2_CONFIG=/nyan/freetype/current/bin/freetype-config
69 $src_dir/configure \
70 --prefix=/nyan/fvwm/1 \
71 --disable-dmalloc \
72 --disable-efence \
73 --disable-command-log \
74 --disable-debug-msgs \
75 --disable-mandoc \
76 --disable-htmldoc \
77 --disable-sm \
78 --enable-shape \
79 --enable-shm \
80 --disable-xinerama \
81 --disable-xinerama-emulation \
82 --enable-xrender \
83 --enable-xcursor \
84 --enable-xft \
85 --disable-freetypetest \
86 --disable-fontconfigtest \
87 --disable-xfttest \
88 --enable-png \
89 --disable-rsvg \
90 --enable-iconv \
91 --disable-bidi \
92 --disable-perllib \
93 --disable-nls \
94 --disable-imlibtest
95 unset FT2_CONFIG
96 unset LDFLAGS
97 unset CFLAGS
98 unset CC
99 unset CPPFLAGS
100 unset PKG_CONFIG_PATH
101 export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH
103 make -j $threads_n
104 make install
106 # cleanup and tidying
107 rm -Rf /nyan/$src_name/1/share/man
108 find /nyan/$src_name/1 -type f | while read f; do if file $f | egrep 'ELF.+(shared|executable)' >/dev/null; then strip -s $f; fi; done
110 rm -Rf $build_dir $src_dir