blob: 61e874d2bfaee5646210d5bde000994646e6718b (
plain)
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
|
parse_with_pkg_name ${2} gmp mpfr mpc libelf binutils;
[ -n "${_pkg_CC}" ] && export CC="${_pkg_CC}";
[ -n "${_pkg_CFLAGS}" ] && export CFLAGS="${_pkg_CFLAGS}";
if is_build_script_done finished; then
exit 212;
else
fetch ${_pkg_url} ${_pkg_sha256sum};
set_build_dir ${_pkg_subdir} native;
fi;
if ! is_build_script_done extracted; then
rm_if_exists ${_pkg_subdir};
tar -axf ${_pkg_fname};
set_build_script_done extracted -patched;
fi;
if ! is_build_script_done patched; then
patch -d ${_pkg_subdir} -p1 \
< portage/${_pkg_subdir}.midipix.patch;
if [ ${_pkg_no_libtool_midipix:-0} -eq 0 ]; then
cp -a portage/libtool.midipix ${_pkg_subdir}/;
fi;
set_build_script_done patched -configured;
fi;
if ! is_build_script_done configured; then
rm_if_exists -m -c ${_build_dir};
../${_pkg_subdir}/configure \
${_pkg_configure_extra_args} \
--host=${HOST_NATIVE} \
--prefix=${_pkg_prefix:-/} \
--target=${TARGET};
set_build_script_done configured -built;
else
cd ${_build_dir};
fi;
if ! is_build_script_done built; then
make;
set_build_script_done configured built -installed1;
fi;
if ! is_build_script_done installed1; then
make DESTDIR=${PREFIX_NATIVE} install;
set_build_script_done configured installed1 -installed2 -finished;
fi;
if [ -n "${_pkg_prefix_extra}" ]; then
if ! is_build_script_done installed2; then
make DESTDIR=${_pkg_prefix_extra} install;
set_build_script_done configured installed2 -finished;
fi;
elif [ "x${_pkg_name}" = "xlibelf" ]; then
if ! is_build_script_done installed2; then
rm -f lib/libelf.def;
echo EXPORTS > lib/libelf.def;
perk -e lib/libelf.so >> lib/libelf.def;
${HOST_NATIVE}-dlltool \
--output-lib lib/libelf.lib.a \
--dllname libelf.so \
--input-def lib/libelf.def;
cp lib/libelf.lib.a ${PREFIX}/lib;
set_build_script_done configured installed2 -finished;
fi;
fi;
set_build_script_done finished;
# vim:filetype=sh
|