264 |
local libdir="${ABI_DEFAULT_LIBDIR}" |
local libdir="${ABI_DEFAULT_LIBDIR}" |
265 |
[[ ${ARCH} = i686 ]] && libdir="${ABI_X86_LIBDIR}" |
[[ ${ARCH} = i686 ]] && libdir="${ABI_X86_LIBDIR}" |
266 |
[[ ${ARCH} = x86_64 ]] && libdir="${ABI_X86_64_LIBDIR}" |
[[ ${ARCH} = x86_64 ]] && libdir="${ABI_X86_64_LIBDIR}" |
267 |
|
[[ ${MABI} = m32 ]] && libdir="${ABI_X86_LIBDIR}" |
268 |
|
[[ ${MABI} = m64 ]] && libdir="${ABI_X86_64_LIBDIR}" |
269 |
[[ -n ${ABI_LIBDIR} ]] && libdir="${ABI_LIBDIR}" |
[[ -n ${ABI_LIBDIR} ]] && libdir="${ABI_LIBDIR}" |
270 |
|
|
271 |
echo "${libdir}" |
echo "${libdir}" |
273 |
|
|
274 |
mconfigure() |
mconfigure() |
275 |
{ |
{ |
276 |
|
local configure_exec="./configure" |
277 |
|
|
278 |
|
if [[ ! -z ${MCONFIGURE_EXEC} ]] |
279 |
|
then |
280 |
|
if [ -x ${MCONFIGURE_EXEC} ] |
281 |
|
then |
282 |
|
echo -e "${COLBLUE}*** ${COLGREEN}Using '${MCONFIGURE_EXEC}' as configure script${COLDEFAULT}" |
283 |
|
configure_exec="${MCONFIGURE_EXEC}" |
284 |
|
else |
285 |
|
die "MCONFIGURE_EXEC '${MCONFIGURE_EXEC}' not executable" |
286 |
|
fi |
287 |
|
fi |
288 |
|
|
289 |
|
if [ ! -x ${configure_exec} ] |
290 |
|
then |
291 |
|
die "${configure_exec} not executable" |
292 |
|
fi |
293 |
|
|
294 |
local myopts |
local myopts |
295 |
if [[ ! -z ${CTARGET} ]] |
if [[ ! -z ${CTARGET} ]] |
296 |
then |
then |
297 |
myopts+=" --target=${CTARGET}" |
myopts+=" --target=${CTARGET}" |
298 |
fi |
fi |
299 |
|
|
300 |
if [ -x ./configure ] |
# if requested disable-static |
301 |
|
if [[ ! -z $(${configure_exec} --help | grep -- '--.*able-static') ]] |
302 |
then |
then |
303 |
# if requested disable-static |
if mqueryfeature '!static' |
|
if [[ ! -z $(./configure --help | grep -- '--.*able-static') ]] |
|
304 |
then |
then |
305 |
if mqueryfeature '!static' |
myopts+=" --disable-static" |
306 |
then |
else |
307 |
myopts+=" --disable-static" |
myopts+=" --enable-static" |
|
else |
|
|
myopts+=" --enable-static" |
|
|
fi |
|
|
fi |
|
|
|
|
|
# always enable shared by default but not for waf configure |
|
|
if [[ ! -z $(./configure --help | grep -- '--.*able-shared') ]] && |
|
|
[[ -z $(./configure --version | grep waf) ]] |
|
|
then |
|
|
myopts+=" --enable-shared" |
|
308 |
fi |
fi |
309 |
|
fi |
310 |
|
|
311 |
./configure \ |
# always enable shared by default but not for waf configure |
312 |
--prefix=/usr \ |
if [[ ! -z $(${configure_exec} --help | grep -- '--.*able-shared') ]] && |
313 |
--host=${CHOST} \ |
[[ -z $(${configure_exec} --version | grep waf) ]] |
314 |
--build=${CHOST} \ |
then |
315 |
--mandir=/usr/share/man \ |
myopts+=" --enable-shared" |
|
--infodir=/usr/share/info \ |
|
|
--datadir=/usr/share \ |
|
|
--sysconfdir=/etc \ |
|
|
--localstatedir=/var/lib \ |
|
|
--libdir=/usr/$(mlibdir) \ |
|
|
${myopts} \ |
|
|
"$@" || die "mconfigure failed" |
|
|
else |
|
|
echo "configure is not an executable ..." |
|
|
exit 1 |
|
316 |
fi |
fi |
317 |
|
|
318 |
|
${configure_exec} \ |
319 |
|
--prefix=/usr \ |
320 |
|
--host=${CHOST} \ |
321 |
|
--build=${CHOST} \ |
322 |
|
--mandir=/usr/share/man \ |
323 |
|
--infodir=/usr/share/info \ |
324 |
|
--datadir=/usr/share \ |
325 |
|
--sysconfdir=/etc \ |
326 |
|
--localstatedir=/var/lib \ |
327 |
|
--libdir=/usr/$(mlibdir) \ |
328 |
|
${myopts} \ |
329 |
|
"$@" || die "mconfigure failed" |
330 |
} |
} |
331 |
|
|
332 |
minstall() |
minstall() |
412 |
IFTAR="${IFTAR##*.}" |
IFTAR="${IFTAR##*.}" |
413 |
if [[ ${IFTAR} = tar ]] |
if [[ ${IFTAR} = tar ]] |
414 |
then |
then |
415 |
tar --no-same-owner -xvf --lzip ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} || die ".tar.lz unpack failed." |
tar --no-same-owner --lzip -xvf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} || die ".tar.lz unpack failed." |
416 |
else |
else |
417 |
pushd ${DEST} > /dev/null |
pushd ${DEST} > /dev/null |
418 |
lzip -dc ${SOURCEDIR}/${PNAME}/${SRCFILE} > ${DEST}/$(basename ${SRCFILE} .xz) || die ".lz unpack failed." |
lzip -dc ${SOURCEDIR}/${PNAME}/${SRCFILE} > ${DEST}/$(basename ${SRCFILE} .lz) || die ".lz unpack failed." |
419 |
popd > /dev/null |
popd > /dev/null |
420 |
fi |
fi |
421 |
;; |
;; |