Lines 583-589
Link Here
|
583 |
fi |
583 |
fi |
584 |
} |
584 |
} |
585 |
|
585 |
|
586 |
pkg_nofetch() { |
586 |
default_pkg_nofetch() { |
587 |
[ -z "${SRC_URI}" ] && return |
587 |
[ -z "${SRC_URI}" ] && return |
588 |
|
588 |
|
589 |
echo "!!! The following are listed in SRC_URI for ${PN}:" |
589 |
echo "!!! The following are listed in SRC_URI for ${PN}:" |
Lines 593-614
Link Here
|
593 |
done |
593 |
done |
594 |
} |
594 |
} |
595 |
|
595 |
|
596 |
src_unpack() { |
596 |
default_src_unpack() { |
597 |
[[ -n ${A} ]] && unpack ${A} |
597 |
[[ -n ${A} ]] && unpack ${A} |
598 |
} |
598 |
} |
599 |
|
599 |
|
600 |
src_compile() { |
600 |
default_src_configure() { |
601 |
if [ "${EAPI:-0}" == 0 ] ; then |
601 |
if [ "${EAPI:-0}" == 0 ] ; then |
602 |
[ -x ./configure ] && econf |
602 |
[ -x ./configure ] && econf |
603 |
elif [ -x "${ECONF_SOURCE:-.}/configure" ] ; then |
603 |
elif [ -x "${ECONF_SOURCE:-.}/configure" ] ; then |
604 |
econf |
604 |
econf |
605 |
fi |
605 |
fi |
|
|
606 |
} |
607 |
|
608 |
default_src_compile() { |
606 |
if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
609 |
if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then |
607 |
emake || die "emake failed" |
610 |
emake || die "emake failed" |
608 |
fi |
611 |
fi |
609 |
} |
612 |
} |
610 |
|
613 |
|
611 |
src_test() { |
614 |
default_src_test() { |
612 |
if emake -j1 check -n &> /dev/null; then |
615 |
if emake -j1 check -n &> /dev/null; then |
613 |
vecho ">>> Test phase [check]: ${CATEGORY}/${PF}" |
616 |
vecho ">>> Test phase [check]: ${CATEGORY}/${PF}" |
614 |
if ! emake -j1 check; then |
617 |
if ! emake -j1 check; then |
Lines 626-631
Link Here
|
626 |
fi |
629 |
fi |
627 |
} |
630 |
} |
628 |
|
631 |
|
|
|
632 |
pkg_nofetch() { |
633 |
default_pkg_nofetch |
634 |
} |
635 |
|
636 |
src_unpack() { |
637 |
default_src_unpack |
638 |
} |
639 |
|
640 |
src_configure() { |
641 |
default_src_configure |
642 |
} |
643 |
|
644 |
src_compile() { |
645 |
if [[ "${EAPI:-0}" == [01] ]] ; then |
646 |
default_src_configure |
647 |
fi |
648 |
default_src_compile |
649 |
} |
650 |
|
651 |
src_test() { |
652 |
default_src_test |
653 |
} |
654 |
|
629 |
ebuild_phase() { |
655 |
ebuild_phase() { |
630 |
[ "$(type -t ${1})" == "function" ] && qa_call ${1} |
656 |
[ "$(type -t ${1})" == "function" ] && qa_call ${1} |
631 |
} |
657 |
} |
Lines 822-827
Link Here
|
822 |
trap SIGINT SIGQUIT |
848 |
trap SIGINT SIGQUIT |
823 |
} |
849 |
} |
824 |
|
850 |
|
|
|
851 |
abort_configure() { |
852 |
abort_handler "src_configure" $1 |
853 |
rm -f "${PORTAGE_BUILDDIR}/.configured" |
854 |
exit 1 |
855 |
} |
856 |
|
825 |
abort_compile() { |
857 |
abort_compile() { |
826 |
abort_handler "src_compile" $1 |
858 |
abort_handler "src_compile" $1 |
827 |
rm -f "${PORTAGE_BUILDDIR}/.compiled" |
859 |
rm -f "${PORTAGE_BUILDDIR}/.compiled" |
Lines 840-845
Link Here
|
840 |
exit 1 |
872 |
exit 1 |
841 |
} |
873 |
} |
842 |
|
874 |
|
|
|
875 |
dyn_configure() { |
876 |
if [[ "${EAPI:-0}" != [01] ]] ; then |
877 |
trap "abort_configure" SIGINT SIGQUIT |
878 |
|
879 |
[ "$(type -t pre_src_configure)" == "function" ] && qa_call pre_src_configure |
880 |
|
881 |
[ "${CFLAGS-unset}" != "unset" ] && export CFLAGS |
882 |
[ "${CXXFLAGS-unset}" != "unset" ] && export CXXFLAGS |
883 |
[ "${LIBCFLAGS-unset}" != "unset" ] && export LIBCFLAGS |
884 |
[ "${LIBCXXFLAGS-unset}" != "unset" ] && export LIBCXXFLAGS |
885 |
[ "${LDFLAGS-unset}" != "unset" ] && export LDFLAGS |
886 |
[ "${ASFLAGS-unset}" != "unset" ] && export ASFLAGS |
887 |
|
888 |
LIBDIR_VAR="LIBDIR_${ABI}" |
889 |
if [ -z "${PKG_CONFIG_PATH}" -a -n "${ABI}" -a -n "${!LIBDIR_VAR}" ]; then |
890 |
export PKG_CONFIG_PATH="/usr/${!LIBDIR_VAR}/pkgconfig" |
891 |
fi |
892 |
unset LIBDIR_VAR |
893 |
|
894 |
if hasq noauto $FEATURES && [ ! -f ${PORTAGE_BUILDDIR}/.unpacked ]; then |
895 |
echo |
896 |
echo "!!! We apparently haven't unpacked... This is probably not what you" |
897 |
echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume" |
898 |
echo "!!! that you know what you are doing... You have 5 seconds to abort..." |
899 |
echo |
900 |
|
901 |
local x |
902 |
for x in 1 2 3 4 5 6 7 8; do |
903 |
echo -ne "\a" |
904 |
LC_ALL=C sleep 0.25 |
905 |
done |
906 |
|
907 |
sleep 3 |
908 |
fi |
909 |
|
910 |
local srcdir=${PORTAGE_BUILDDIR} |
911 |
cd "${PORTAGE_BUILDDIR}" |
912 |
if [ ! -e "build-info" ]; then |
913 |
mkdir build-info |
914 |
fi |
915 |
cp "${EBUILD}" "build-info/${PF}.ebuild" |
916 |
|
917 |
if [[ ${PORTAGE_BUILDDIR}/.configured -nt ${WORKDIR} ]] ; then |
918 |
vecho ">>> It appears that '${PF}' is already configured; skipping." |
919 |
vecho ">>> Remove '${PORTAGE_BUILDDIR}/.configured' to force configuration." |
920 |
trap SIGINT SIGQUIT |
921 |
[ "$(type -t post_src_configure)" == "function" ] && qa_call post_src_configure |
922 |
return |
923 |
fi |
924 |
if [ -d "${S}" ]; then |
925 |
srcdir=${S} |
926 |
else |
927 |
srcdir=${WORKDIR} |
928 |
fi |
929 |
cd "${srcdir}" |
930 |
#our custom version of libtool uses $S and $D to fix |
931 |
#invalid paths in .la files |
932 |
export S D |
933 |
#some packages use an alternative to $S to build in, cause |
934 |
#our libtool to create problematic .la files |
935 |
export PWORKDIR="$WORKDIR" |
936 |
vecho ">>> Configuring source in ${srcdir} ..." |
937 |
ebuild_phase src_configure |
938 |
vecho ">>> Source configured." |
939 |
#|| abort_configure "fail" |
940 |
cd "${PORTAGE_BUILDDIR}" |
941 |
touch .configured |
942 |
[ "$(type -t post_src_configure)" == "function" ] && qa_call post_src_configure |
943 |
|
944 |
trap SIGINT SIGQUIT |
945 |
fi |
946 |
} |
947 |
|
843 |
dyn_compile() { |
948 |
dyn_compile() { |
844 |
trap "abort_compile" SIGINT SIGQUIT |
949 |
trap "abort_compile" SIGINT SIGQUIT |
845 |
|
950 |
|
Lines 864-883
Link Here
|
864 |
fi |
969 |
fi |
865 |
unset LIBDIR_VAR |
970 |
unset LIBDIR_VAR |
866 |
|
971 |
|
867 |
if hasq noauto $FEATURES && [ ! -f ${PORTAGE_BUILDDIR}/.unpacked ]; then |
972 |
if [[ "${EAPI:-0}" == [01] ]] ; then |
868 |
echo |
973 |
if hasq noauto $FEATURES && [ ! -f ${PORTAGE_BUILDDIR}/.unpacked ]; then |
869 |
echo "!!! We apparently haven't unpacked... This is probably not what you" |
974 |
echo |
870 |
echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume" |
975 |
echo "!!! We apparently haven't unpacked... This is probably not what you" |
871 |
echo "!!! that you know what you are doing... You have 5 seconds to abort..." |
976 |
echo "!!! want to be doing... You are using FEATURES=noauto so I'll assume" |
872 |
echo |
977 |
echo "!!! that you know what you are doing... You have 5 seconds to abort..." |
|
|
978 |
echo |
873 |
|
979 |
|
874 |
local x |
980 |
local x |
875 |
for x in 1 2 3 4 5 6 7 8; do |
981 |
for x in 1 2 3 4 5 6 7 8; do |
876 |
echo -ne "\a" |
982 |
echo -ne "\a" |
877 |
LC_ALL=C sleep 0.25 |
983 |
LC_ALL=C sleep 0.25 |
878 |
done |
984 |
done |
879 |
|
985 |
|
880 |
sleep 3 |
986 |
sleep 3 |
|
|
987 |
fi |
881 |
fi |
988 |
fi |
882 |
|
989 |
|
883 |
local srcdir=${PORTAGE_BUILDDIR} |
990 |
local srcdir=${PORTAGE_BUILDDIR} |
Lines 1059-1066
Link Here
|
1059 |
echo " digest : create a manifest file for the package" |
1166 |
echo " digest : create a manifest file for the package" |
1060 |
echo " manifest : create a manifest file for the package" |
1167 |
echo " manifest : create a manifest file for the package" |
1061 |
echo " unpack : unpack/patch sources (auto-fetch if needed)" |
1168 |
echo " unpack : unpack/patch sources (auto-fetch if needed)" |
1062 |
echo " compile : compile sources (auto-fetch/unpack if needed)" |
1169 |
echo " configure : configure sources (auto-fetch/unpack if needed)" |
1063 |
echo " test : test package (auto-fetch/unpack/compile if needed)" |
1170 |
echo " compile : compile sources (auto-fetch/unpack/configure if needed)" |
|
|
1171 |
echo " test : test package (auto-fetch/unpack/configure/compile if needed)" |
1064 |
echo " preinst : execute pre-install instructions" |
1172 |
echo " preinst : execute pre-install instructions" |
1065 |
echo " postinst : execute post-install instructions" |
1173 |
echo " postinst : execute post-install instructions" |
1066 |
echo " install : install the package to the temporary install directory" |
1174 |
echo " install : install the package to the temporary install directory" |
Lines 1786-1792
Link Here
|
1786 |
) |
1894 |
) |
1787 |
fi |
1895 |
fi |
1788 |
;; |
1896 |
;; |
1789 |
unpack|compile|test|clean|install) |
1897 |
unpack|configure|compile|test|clean|install) |
1790 |
if [ "${SANDBOX_DISABLED="0"}" == "0" ]; then |
1898 |
if [ "${SANDBOX_DISABLED="0"}" == "0" ]; then |
1791 |
export SANDBOX_ON="1" |
1899 |
export SANDBOX_ON="1" |
1792 |
else |
1900 |
else |