Tue, 29 Mar 2011 20:04:34 +0200
Rework package yet again, correcting and introducing new buildconf logic:
Conditionally disable bootstrap stage comparison correctly, correct
english grammar, better find system as(1) and ld(1), indotruce detailed
optimization option messages, more completely guess cpu types, allow
profiled bootstrapping without a preinstalled GCC because many other
compilers have long since implemented 64-bit arithmetic, instruct make
to build sequentially (not in sparallel) when building a profiled
bootstrap as GCC online documents recommend, and generally improve
comment blocks.
The single most important correction in this changeset relates to the
GCC changed optimization policy since at least GCC 4.5, in which -march
is always passed and not always correctly guessed. In the case of this
package, allowing GCC to guess the architecture leads to wild build
errors at various subcomponents (zlib, libgcc, libiberty...) and
bootstrap stages. It seems quite platform specific, and the safest
approach to correcting this seems to be explicitly always specifying the
-march argument when bootstrapping GCC. Because the best choice 'native'
is not available when bootstrapping using a foreign (non GCC) compiler,
a guess is made according to rpmmacros l_platform in that case.
It is questionable as to whether these recent optimization changes
on the part of GCC or this package are compatible with each other,
or if either are complete or correct at all. At least applying these
corrections allows this package to build again in most cases test.
michael@11 | 1 | ## |
michael@11 | 2 | ## autoconf.spec -- OpenPKG RPM Package Specification |
michael@11 | 3 | ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@11 | 4 | ## |
michael@11 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@11 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@11 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@11 | 8 | ## copies. |
michael@11 | 9 | ## |
michael@11 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@11 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@11 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@11 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@11 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@11 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@11 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@11 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@11 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@11 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@11 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@11 | 21 | ## SUCH DAMAGE. |
michael@11 | 22 | ## |
michael@11 | 23 | |
michael@11 | 24 | # version numbers |
michael@11 | 25 | %define V_latest 2.63 |
michael@11 | 26 | %define V_latest_comp 263 |
michael@11 | 27 | %define V_older 2.59 |
michael@11 | 28 | %define V_older_comp 259 |
michael@11 | 29 | %define V_ancient 2.13 |
michael@11 | 30 | %define V_ancient_comp 213 |
michael@11 | 31 | %define V_acx_macros 2008-11-07 |
michael@11 | 32 | |
michael@11 | 33 | # package information |
michael@11 | 34 | Name: autoconf |
michael@11 | 35 | Summary: GNU Source Autoconfiguration |
michael@11 | 36 | URL: http://www.gnu.org/software/autoconf/ |
michael@11 | 37 | Vendor: Free Software Foundation |
michael@11 | 38 | Packager: OpenPKG Foundation e.V. |
michael@11 | 39 | Distribution: OpenPKG Community |
michael@11 | 40 | Class: CORE |
michael@11 | 41 | Group: Building |
michael@11 | 42 | License: GPL |
michael@11 | 43 | Version: %{V_latest} |
michael@43 | 44 | Release: 20090106 |
michael@11 | 45 | |
michael@11 | 46 | # build options |
michael@11 | 47 | %option with_acx_macros yes |
michael@11 | 48 | |
michael@11 | 49 | # list of sources |
michael@11 | 50 | Source0: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_latest}.tar.gz |
michael@11 | 51 | Source1: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_older}.tar.gz |
michael@11 | 52 | Source2: ftp://ftp.gnu.org/gnu/autoconf/autoconf-%{V_ancient}.tar.gz |
michael@11 | 53 | Source3: http://autoconf-archive.cryp.to/autoconf-archive-%{V_acx_macros}.tar.bz2 |
michael@11 | 54 | Patch0: autoconf.patch |
michael@11 | 55 | |
michael@11 | 56 | # build information |
michael@11 | 57 | Prefix: %{l_prefix} |
michael@11 | 58 | BuildRoot: %{l_buildroot} |
michael@11 | 59 | BuildPreReq: OpenPKG, openpkg >= 20040130, m4 >= 1.4, perl, make |
michael@11 | 60 | PreReq: OpenPKG, openpkg >= 20040130, m4 >= 1.4, perl |
michael@11 | 61 | AutoReq: no |
michael@11 | 62 | AutoReqProv: no |
michael@11 | 63 | |
michael@11 | 64 | %description |
michael@11 | 65 | Autoconf is an extensible package of m4 macros that produce shell |
michael@11 | 66 | scripts to automatically configure software source code packages. |
michael@11 | 67 | These scripts can adapt the packages to many kinds of UNIX-like |
michael@11 | 68 | systems without manual user intervention. Autoconf creates a |
michael@11 | 69 | configuration script for a package from a template file that lists |
michael@11 | 70 | the operating system features that the package can use, in the form |
michael@11 | 71 | of m4 macro calls. |
michael@11 | 72 | |
michael@11 | 73 | This OpenPKG packages provides the following Autoconf versions: |
michael@11 | 74 | - GNU Autoconf %{V_latest} (latest version, the default) |
michael@11 | 75 | - GNU Autoconf %{V_older} (older version, as an alternative) |
michael@11 | 76 | - GNU Autoconf %{V_ancient} (ancient version, for backward-compatibility) |
michael@11 | 77 | |
michael@11 | 78 | %track |
michael@11 | 79 | prog autoconf = { |
michael@11 | 80 | version = %{version} |
michael@11 | 81 | url = ftp://ftp.gnu.org/gnu/autoconf/ |
michael@11 | 82 | regex = autoconf-(__VER__)\.tar\.gz |
michael@11 | 83 | } |
michael@11 | 84 | |
michael@11 | 85 | %prep |
michael@11 | 86 | %setup -q -c -n autoconf-%{V_latest} |
michael@11 | 87 | %setup -q -T -D -a 1 |
michael@11 | 88 | %setup -q -T -D -a 2 |
michael@11 | 89 | %patch -p0 |
michael@11 | 90 | %if "%{with_acx_macros}" == "yes" |
michael@11 | 91 | %setup -q -T -D -a 3 |
michael@11 | 92 | cp \ |
michael@11 | 93 | autoconf-archive-%{V_acx_macros}/m4/acx_pthread.m4 \ |
michael@11 | 94 | autoconf-%{V_latest}/lib/autoconf/ |
michael@11 | 95 | ( cd autoconf-%{V_latest}/lib/autoconf |
michael@11 | 96 | cp autoconf.m4 autoconf.m4.tmp |
michael@11 | 97 | cat autoconf.m4.tmp | %{l_sed} -e '72a\ |
michael@11 | 98 | m4_include([autoconf/acx_pthread.m4])' >autoconf.m4 |
michael@11 | 99 | rm autoconf.m4.tmp |
michael@11 | 100 | ) || exit $? |
michael@11 | 101 | %endif |
michael@11 | 102 | |
michael@11 | 103 | %build |
michael@11 | 104 | # configure and build Autoconf (deprecated version) |
michael@11 | 105 | ( cd autoconf-%{V_ancient} |
michael@11 | 106 | CC="%{l_cc}" \ |
michael@11 | 107 | CFLAGS="%{l_cflags -O}" \ |
michael@11 | 108 | ./configure \ |
michael@11 | 109 | --prefix=%{l_prefix} \ |
michael@11 | 110 | --program-suffix="-%{V_ancient_comp}" |
michael@11 | 111 | %{l_shtool} subst \ |
michael@11 | 112 | -e 's;\(acdatadir = $(datadir)/autoconf\);\1/%{V_ancient_comp};' \ |
michael@11 | 113 | Makefile |
michael@11 | 114 | %{l_make} %{l_mflags} |
michael@11 | 115 | ) || exit $? |
michael@11 | 116 | |
michael@11 | 117 | # configure and build Autoconf (older version) |
michael@11 | 118 | ( cd autoconf-%{V_older} |
michael@11 | 119 | %{l_shtool} subst \ |
michael@11 | 120 | -e 's;^\(PACKAGE_STRING=.GNU Autoconf [0-9.]*\)\(.\);\1 (%{l_openpkg_release})\2;g' \ |
michael@11 | 121 | configure |
michael@11 | 122 | %{l_shtool} subst \ |
michael@11 | 123 | -e 's;^\(pkgdatadir.=..(datadir)\)/@PACKAGE@;\1;' \ |
michael@11 | 124 | Makefile.in */Makefile.in */*/Makefile.in |
michael@11 | 125 | CC="%{l_cc}" \ |
michael@11 | 126 | CFLAGS="%{l_cflags -O}" \ |
michael@11 | 127 | ACLOCAL=true \ |
michael@11 | 128 | AUTOMAKE=true \ |
michael@11 | 129 | AUTOCONF=true \ |
michael@11 | 130 | AUTOHEADER=true \ |
michael@11 | 131 | MAKEINFO=true \ |
michael@11 | 132 | GREP=grep \ |
michael@11 | 133 | ./configure \ |
michael@11 | 134 | --prefix=%{l_prefix} \ |
michael@11 | 135 | --datadir=%{l_prefix}/share/autoconf/%{V_older_comp} \ |
michael@11 | 136 | --program-suffix="-%{V_older_comp}" |
michael@11 | 137 | %{l_make} %{l_mflags} |
michael@11 | 138 | ) || exit $? |
michael@11 | 139 | |
michael@11 | 140 | # configure and build Autoconf (current version) |
michael@11 | 141 | ( cd autoconf-%{V_latest} |
michael@11 | 142 | %{l_shtool} subst \ |
michael@11 | 143 | -e 's;^\(PACKAGE_STRING=.GNU Autoconf [0-9.]*\)\(.\);\1 (%{l_openpkg_release})\2;g' \ |
michael@11 | 144 | configure |
michael@11 | 145 | %{l_shtool} subst \ |
michael@11 | 146 | -e 's;^\(pkgdatadir.=..(datadir)\)/@PACKAGE@;\1;' \ |
michael@11 | 147 | Makefile.in */Makefile.in */*/Makefile.in |
michael@11 | 148 | CC="%{l_cc}" \ |
michael@11 | 149 | CFLAGS="%{l_cflags -O}" \ |
michael@11 | 150 | ACLOCAL=true \ |
michael@11 | 151 | AUTOMAKE=true \ |
michael@11 | 152 | AUTOCONF=true \ |
michael@11 | 153 | AUTOHEADER=true \ |
michael@11 | 154 | MAKEINFO=true \ |
michael@11 | 155 | GREP=grep \ |
michael@11 | 156 | ./configure \ |
michael@11 | 157 | --prefix=%{l_prefix} \ |
michael@11 | 158 | --mandir=%{l_prefix}/man \ |
michael@11 | 159 | --datadir=%{l_prefix}/share/autoconf/%{V_latest_comp} \ |
michael@11 | 160 | --infodir=%{l_prefix}/info |
michael@11 | 161 | %{l_make} %{l_mflags} |
michael@11 | 162 | ) || exit $? |
michael@11 | 163 | |
michael@11 | 164 | %install |
michael@11 | 165 | rm -rf $RPM_BUILD_ROOT |
michael@11 | 166 | |
michael@11 | 167 | # configure and build Autoconf (deprecated version) |
michael@11 | 168 | ( cd autoconf-%{V_ancient} |
michael@11 | 169 | %{l_make} %{l_mflags} install \ |
michael@11 | 170 | prefix=$RPM_BUILD_ROOT%{l_prefix} |
michael@11 | 171 | mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \ |
michael@11 | 172 | $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-%{V_ancient_comp}.info |
michael@11 | 173 | ) || exit $? |
michael@11 | 174 | |
michael@11 | 175 | # configure and build Autoconf (older version) |
michael@11 | 176 | ( cd autoconf-%{V_older} |
michael@11 | 177 | %{l_make} %{l_mflags} install \ |
michael@11 | 178 | prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
michael@11 | 179 | datadir=$RPM_BUILD_ROOT%{l_prefix}/share/autoconf/%{V_older_comp} \ |
michael@11 | 180 | mandir=$RPM_BUILD_ROOT%{l_prefix}/man \ |
michael@11 | 181 | infodir=$RPM_BUILD_ROOT%{l_prefix}/info |
michael@11 | 182 | mv $RPM_BUILD_ROOT%{l_prefix}/info/autoconf.info \ |
michael@11 | 183 | $RPM_BUILD_ROOT%{l_prefix}/info/autoconf-%{V_older_comp}.info |
michael@11 | 184 | ) || exit $? |
michael@11 | 185 | |
michael@11 | 186 | # configure and build Autoconf (current version) |
michael@11 | 187 | ( cd autoconf-%{V_latest} |
michael@11 | 188 | %{l_make} %{l_mflags} install \ |
michael@11 | 189 | prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
michael@11 | 190 | datadir=$RPM_BUILD_ROOT%{l_prefix}/share/autoconf/%{V_latest_comp} \ |
michael@11 | 191 | mandir=$RPM_BUILD_ROOT%{l_prefix}/man \ |
michael@11 | 192 | infodir=$RPM_BUILD_ROOT%{l_prefix}/info |
michael@11 | 193 | ) || exit $? |
michael@11 | 194 | |
michael@11 | 195 | %if "%{with_acx_macros}" == "yes" |
michael@11 | 196 | cp \ |
michael@11 | 197 | autoconf-archive-%{V_acx_macros}/m4/acx_pthread.m4 \ |
michael@11 | 198 | $RPM_BUILD_ROOT%{l_prefix}/share/autoconf/ |
michael@11 | 199 | %endif |
michael@11 | 200 | |
michael@11 | 201 | # strip down installation |
michael@11 | 202 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs |
michael@11 | 203 | rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir |
michael@11 | 204 | |
michael@11 | 205 | # determine installation files |
michael@11 | 206 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@11 | 207 | |
michael@11 | 208 | %files -f files |
michael@11 | 209 | |
michael@11 | 210 | %clean |
michael@11 | 211 | rm -rf $RPM_BUILD_ROOT |
michael@11 | 212 |