first stage of new bootstrap
[nyanlinux.git] / builders / libepoxy / builder.sh
blob4dd6c0bdda363ce0a021712ada5e391d131f552f
1 src_name=libepoxy
2 mkdir /nyan/$src_name
3 mkdir /nyan/$src_name/$slot
4 git_url0=git://github.com/anholt/$src_name
6 src_dir=$src_dir_root/$src_name
7 pkg_dir=$pkgs_dir_root/$pkg_name
8 rm -Rf $pkg_dir
9 cp -r $src_dir $pkg_dir
11 cd $pkg_dir
13 PATH_SAVED=$PATH
14 export PATH="\
15 /opt/toolchains/x64/elf/binutils-gcc/current/bin:\
16 /nyan/git/current/bin:\
17 $PATH\
20 if test x$git_commit != x; then
21 git checkout --force $git_commit
22 git reset --hard
25 # install our custom mini build system
26 cp -r $nyan_root/builders/$pkg_name/contrib ./
28 build_dir=$builds_dir_root/$pkg_name
29 rm -Rf $build_dir
30 mkdir $build_dir
31 cd $build_dir
33 cat >$build_dir/local_conf.sh <<EOF
34 inc_store_dir=/nyan/$src_name/$slot/include
35 inc_store_virtual_dir=/nyan/$src_name/$slot/include
36 lib_store_dir=/nyan/$src_name/$slot/lib
37 lib_store_virtual_dir=/nyan/$src_name/$slot/lib
38 runtime_lib_dir=/nyan/$src_name/$slot/lib
40 libx11_inc_dir=/nyan/libX11/current/include
41 xorgproto_inc_dir=/nyan/xorgproto/current/include
42 mesa_gl_inc_dir=/nyan/mesa-gl/current/include
44 python3=/nyan/python/current/bin/python3
45 dslibepoxy_cc='gcc -ftls-model=global-dynamic -fpic -static-libgcc -O2 -pipe -fPIC -fvisibility=hidden -c -isystem /nyan/glibc/current/include -isystem /nyan/linux-headers/current/include'
46 dslibepoxy_ccld='gcc -B/nyan/glibc/current/lib -L/nyan/glibc/current/lib -Wl,-s -Wl,-rpath-link,/nyan/glibc/current/lib -static-libgcc -shared -Wl,-soname,\$soname -Bsymbolic -Wl,--no-undefined'
47 EOF
49 $pkg_dir/contrib/make.gnulinux
51 cp -rf $build_dir/install_root/nyan/$src_name/$slot/* /nyan/$src_name/$slot
53 export PATH=$PATH_SAVED
54 unset PATH_SAVED
55 rm -Rf $build_dir $pkg_dir