From aa0fb08eaaf8b93c279f6add0a5c3a3ef1ff1c14 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 4 Nov 2006 17:29:37 +0000 Subject: [PATCH] Really fix autoconf-2.60 misery: - don't run autoheader if we don't have config.h (Thanks flameeyes!) - clean up mess with errors and warnings so we actually see what's happening - make sure we abort mission if autoconfing the bunch fails - require autoconf 2.60 now, as we changed the configure script to do it's dirty voodoo based on the output of 2.60, which is different from its predecessor(s) svn path=/main/branches/prefix/; revision=4936 --- autogen.sh | 16 ++++++++++------ configure.in | 15 ++++----------- tarball.sh | 27 +++++++++++---------------- 3 files changed, 25 insertions(+), 33 deletions(-) diff --git a/autogen.sh b/autogen.sh index f933363cd..137425d81 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,13 +1,17 @@ #!/bin/sh -autoheader || { echo "failed autoheader"; exit 1; }; -aclocal-1.8 || { echo "failed aclocal"; exit 1; }; +die() { + echo "!!! $*" > /dev/stderr + exit -1 +} + +#autoheader || { echo "failed autoheader"; exit 1; }; +aclocal-1.8 || die "failed aclocal" [ "`type -t glibtoolize`" == "file" ] && alias libtoolize=glibtoolize -libtoolize --automake -c -f || { echo "failed libtoolize"; exit 1; } -autoconf || { echo "failed autoconf"; exit 1; } +libtoolize --automake -c -f || die "failed libtoolize" +autoconf || die "failed autoconf" touch ChangeLog -automake-1.8 -a -c || { "echo failed automake"; exit 1; } -rm config.h.in +automake-1.8 -a -c || die "failed automake" if [ -x ./test.sh ] ; then exec ./test.sh "$@" diff --git a/configure.in b/configure.in index 9a7681fcf..13b95e642 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,8 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(portage, 2.1.20, grobian@gentoo.org, portage-prefix) +AC_PREREQ([2.60]) + dnl Define our precious vars dnl AC_ARG_VAR(prefix, the location portage will be installed to) dnl AC_ARG_VAR(offset-prefix, the location all packages will be installed to) @@ -21,7 +23,6 @@ AC_CANONICAL_TARGET AM_INIT_AUTOMAKE dnl AM_CONFIG_HEADER(config.h) -AC_CONFIG_HEADERS([config.h]) dnl Checks for programs. dnl store clfags prior, otherwise it's not propogaed. @@ -258,8 +259,7 @@ AM_CONDITIONAL(BUILD_MISSINGOS, test x$enable_missingos = xtrue) #AM_CONDITIONAL(BUILD_FILTER_ENV, test x$enable_filter_env = xtrue) AC_MSG_CHECKING([for a list of variables known by configure]) -rm -f subst-install.vars.in.in.tmp -pt_configvars=`grep '^s,@' ${srcdir}/configure | sed -e 's|^s,@\([[^@]][[^@]]*\)@.*$|\1|'` +pt_configvars=`sed -n -e "/^ac_subst_vars='/,/'$/p" ${srcdir}/configure | sed -e "s/^ac_subst_vars='//" -e "s/'$//"` { pt_all_configurevars= for pt_configvar in ${pt_configvars} @@ -270,14 +270,7 @@ pt_configvars=`grep '^s,@' ${srcdir}/configure | sed -e 's|^s,@\([[^@]][[^@]]*\) echo "all_configurevars='${pt_all_configurevars}'" -} > subst-install.vars.in.in.tmp -diff ${srcdir}/subst-install.vars.in.in subst-install.vars.in.in.tmp >/dev/null -if [[ $? != 0 ]] -then - rm -f ${srcdir}/subst-install.vars.in.in - cp subst-install.vars.in.in.tmp ${srcdir}/subst-install.vars.in.in -fi -rm -f subst-install.vars.in.in.tmp +} > subst-install.vars.in.in $as_unset pt_configvar pt_configvars pt_all_configurevars AC_MSG_RESULT([ok]) diff --git a/tarball.sh b/tarball.sh index 894bf92e5..4d18a9896 100755 --- a/tarball.sh +++ b/tarball.sh @@ -17,35 +17,30 @@ export PREVEB="2.0.49_pre2" ./tabcheck.py bin/emerge `find ./ -type f -name '*.py'` -if [ -e $TMP/${PKG}-${V} ]; then +if [ -e ${DEST} ]; then echo EXISTS ALREADY exit 1 fi -rm -rf ${DEST} install -d -m0755 ${DEST} cp -pPR . ${DEST} -cp ${DEST}/pym/portage.py ${DEST}/pym/portage.py.orig -sed '/^VERSION=/s/^.*$/VERSION="'${V}'"/' < ${DEST}/pym/portage.py.orig > ${DEST}/pym/portage.py -cp ${DEST}/man/emerge.1 ${DEST}/man/emerge.1.orig -sed "s/##VERSION##/${V}/g" < ${DEST}/man/emerge.1.orig > ${DEST}/man/emerge.1 -rm ${DEST}/pym/portage.py.orig ${DEST}/man/emerge.1.orig -rm ${DEST}/man/*.eclass.5 +sed -i -e '/^VERSION=/s/^.*$/VERSION="'${V}'"/' ${DEST}/pym/portage.py +sed -i -e "s/##VERSION##/${V}/g" ${DEST}/man/emerge.1 +#rm ${DEST}/man/*.eclass.5 -sed -i -e "s:\t: :g" ChangeLog -cp ChangeLog ${DEST} +#sed -i -e "s:\t: :g" ${DEST}/ChangeLog cd ${DEST} -find -name CVS -exec rm -rf {} \; -find -name '.svn' -type d -exec rm -rf {} \; -find -name '*~' -exec rm -rf {} \; -find -name '*.pyc' -exec rm -rf {} \; -find -name '*.pyo' -exec rm -rf {} \; +find -name CVS -type d | xargs --no-run-if-empty rm -rf +find -name '.svn' -type d | xargs --no-run-if-empty rm -rf +find -name '*~' | xargs --no-run-if-empty rm -f +find -name '*.pyc' | xargs --no-run-if-empty rm -f +find -name '*.pyo' | xargs --no-run-if-empty rm -f #chown -R root:0 ${DEST} cd $TMP rm -f ${PKG}-${V}/bin/emerge.py ${PKG}-${V}/bin/{pmake,sandbox} ${PKG}-${V}/{bin,pym}/'.#'* ${PKG}-${V}/{bin,pym}/*.{orig,diff} ${PKG}-${V}/{bin,pym}/*.py[oc] cd $TMP/${PKG}-${V} -chmod a+x autogen.sh && ./autogen.sh +chmod a+x autogen.sh && ./autogen.sh || { echo "autogen failed!"; exit -1; }; rm -f AUTHORS NEWS autogen.sh make-man-tarball.sh tabcheck.py tarball.sh ChangeLog.000 COPYING cd $TMP tar cjvf ${TMP}/${PKG}-${V}.tar.bz2 ${PKG}-${V} -- 2.26.2