177 |
fi |
fi |
178 |
|
|
179 |
echo -e "${COLBLUE}==>${COLGREEN} fetching ${uri}${COLDEFAULT}" |
echo -e "${COLBLUE}==>${COLGREEN} fetching ${uri}${COLDEFAULT}" |
180 |
|
# always use verbose mode for source downloads |
181 |
|
FVERBOSE=off msetfeature "verbose" |
182 |
# do not die here, mchecksum catches download errors |
# do not die here, mchecksum catches download errors |
183 |
mdownload --uri "${uri}" --dir "${outputdir}" |
mdownload --uri "${uri}" --dir "${outputdir}" |
184 |
|
|
242 |
local myopts |
local myopts |
243 |
if [[ ! -z ${CTARGET} ]] |
if [[ ! -z ${CTARGET} ]] |
244 |
then |
then |
245 |
myopts="--target=${CTARGET}" |
myopts+=" --target=${CTARGET}" |
246 |
fi |
fi |
247 |
|
|
248 |
if [ -x ./configure ] |
if [ -x ./configure ] |
249 |
then |
then |
250 |
|
# if requested disable-static |
251 |
|
if [[ ! -z $(./configure --help | grep -- '--.*able-static') ]] |
252 |
|
then |
253 |
|
if mqueryfeature '!static' |
254 |
|
then |
255 |
|
myopts+=" --disable-static" |
256 |
|
else |
257 |
|
myopts+=" --enable-static" |
258 |
|
fi |
259 |
|
fi |
260 |
|
|
261 |
|
# always enable shared by default |
262 |
|
if [[ ! -z $(./configure --help | grep -- '--.*able-shared') ]] |
263 |
|
then |
264 |
|
myopts+=" --enable-shared" |
265 |
|
fi |
266 |
|
|
267 |
./configure \ |
./configure \ |
268 |
--prefix=/usr \ |
--prefix=/usr \ |
269 |
--host=${CHOST} \ |
--host=${CHOST} \ |
1165 |
resume_stamp() |
resume_stamp() |
1166 |
{ |
{ |
1167 |
local step="$1" |
local step="$1" |
1168 |
touch ${BUILDDIR}/.smage-${PKGNAME}-${step} |
[[ ! -d ${BUILDDIR}/.stamps ]] && install -d ${BUILDDIR}/.stamps |
1169 |
|
touch ${BUILDDIR}/.stamps/smage-${PKGNAME}-${step} |
1170 |
} |
} |
1171 |
|
|
1172 |
run_resume() |
run_resume() |
1173 |
{ |
{ |
1174 |
local step="$1" |
local step="$1" |
1175 |
|
|
1176 |
if mqueryfeature "resume" && [[ -f ${BUILDDIR}/.smage-${PKGNAME}-${step} ]] |
if mqueryfeature "resume" && [[ -f ${BUILDDIR}/.stamps/smage-${PKGNAME}-${step} ]] |
1177 |
then |
then |
1178 |
echo -e "${COLMAGENTA}${step} already processed; doing nothing${COLDEFAULT}" |
echo -e "${COLMAGENTA}${step} already processed; doing nothing${COLDEFAULT}" |
1179 |
return 0 |
return 0 |
1506 |
rm -rf ${BUILDDIR}/${PKGNAME} |
rm -rf ${BUILDDIR}/${PKGNAME} |
1507 |
fi |
fi |
1508 |
|
|
1509 |
|
# clean up stamps dir |
1510 |
|
if [ -d ${BUILDDIR}/.stamps ] |
1511 |
|
then |
1512 |
|
rm -rf ${BUILDDIR}/.stamps |
1513 |
|
fi |
1514 |
|
|
1515 |
# setup build logging |
# setup build logging |
1516 |
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
1517 |
echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log |
echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log |
1784 |
# build src-pkg-tarball if requested |
# build src-pkg-tarball if requested |
1785 |
if mqueryfeature "srcpkg" |
if mqueryfeature "srcpkg" |
1786 |
then |
then |
1787 |
resume_stamp srcpkgbuild || source_pkg_build ${SMAGENAME} |
run_resume srcpkgbuild || source_pkg_build ${SMAGENAME} |
1788 |
resume_stamp srcpkgbuild |
resume_stamp srcpkgbuild |
1789 |
fi |
fi |
1790 |
fi |
fi |