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} \ |
453 |
cat ${doc} | gzip -9c > ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/$(basename ${doc}).gz || die "gzipping +installing ${doc}." |
cat ${doc} | gzip -9c > ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/$(basename ${doc}).gz || die "gzipping +installing ${doc}." |
454 |
chmod 0644 ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/$(basename ${doc}).gz || die "fixing permissions of ${doc}." |
chmod 0644 ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/$(basename ${doc}).gz || die "fixing permissions of ${doc}." |
455 |
else |
else |
456 |
install -m 0644 ${SRCDIR}/${i} ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "installing ${doc}." |
install -m 0644 ${doc} ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "installing ${doc}." |
457 |
fi |
fi |
458 |
fi |
fi |
459 |
done |
done |
465 |
|
|
466 |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
467 |
[[ -z ${STRIP_DYN_LIB} ]] && STRIP_DYN_LIB="--strip-debug" |
[[ -z ${STRIP_DYN_LIB} ]] && STRIP_DYN_LIB="--strip-debug" |
468 |
find ${stripdir} ! -type d | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_LIB} 2> /dev/null |
find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_LIB} 2> /dev/null |
469 |
} |
} |
470 |
|
|
471 |
mstripbins() |
mstripbins() |
474 |
|
|
475 |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
476 |
[[ -z ${STRIP_DYN_BIN} ]] && STRIP_DYN_BIN="--strip-debug" |
[[ -z ${STRIP_DYN_BIN} ]] && STRIP_DYN_BIN="--strip-debug" |
477 |
find ${stripdir} ! -type d | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_BIN} 2> /dev/null |
find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep "executable" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_BIN} 2> /dev/null |
478 |
} |
} |
479 |
|
|
480 |
mstripstatic() |
mstripstatic() |
483 |
|
|
484 |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
485 |
[[ -z ${STRIP_STATIC_LIB} ]] && STRIP_STATIC_LIB="--strip-debug" |
[[ -z ${STRIP_STATIC_LIB} ]] && STRIP_STATIC_LIB="--strip-debug" |
486 |
find ${stripdir} ! -type d | xargs file | grep "ar archive" | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_STATIC_LIB} 2> /dev/null |
find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep "ar archive" | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_STATIC_LIB} 2> /dev/null |
487 |
} |
} |
488 |
|
|
489 |
mstriplibtoolarchive() |
mstriplibtoolarchive() |
491 |
local stripdir="$@" |
local stripdir="$@" |
492 |
|
|
493 |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
494 |
find ${stripdir} ! -type d -name \*.la | xargs | grep "libtool library" | cut -f 1 -d : | xargs --no-run-if-empty rm -f -- 2> /dev/null |
find ${stripdir} ! -type d -name \*.la | xargs --no-run-if-empty file | grep "libtool library" | cut -f 1 -d : | xargs --no-run-if-empty rm -f -- 2> /dev/null |
495 |
} |
} |
496 |
|
|
497 |
mpurgetargets() |
mpurgetargets() |
1429 |
# auto regen mage tree if requested |
# auto regen mage tree if requested |
1430 |
regen_mage_tree |
regen_mage_tree |
1431 |
|
|
1432 |
if mqueryfeature "srcpkg" |
if mqueryfeature "srcpkgbuild" |
1433 |
then |
then |
1434 |
if [[ -d ${SOURCEDIR}/${PNAME} ]] |
if [[ -d ${SOURCEDIR}/${PNAME} ]] |
1435 |
then |
then |
1782 |
fi |
fi |
1783 |
|
|
1784 |
# build src-pkg-tarball if requested |
# build src-pkg-tarball if requested |
1785 |
if mqueryfeature "srcpkg" |
if mqueryfeature "srcpkgbuild" |
1786 |
then |
then |
1787 |
run_resume srcpkgbuild || source_pkg_build ${SMAGENAME} |
run_resume srcpkgbuild || source_pkg_build ${SMAGENAME} |
1788 |
resume_stamp srcpkgbuild |
resume_stamp srcpkgbuild |