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@75 | 1 | ## |
michael@75 | 2 | ## id3lib.spec -- OpenPKG RPM Specification |
michael@75 | 3 | ## Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com> |
michael@75 | 4 | ## |
michael@75 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@75 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@75 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@75 | 8 | ## copies. |
michael@75 | 9 | ## |
michael@75 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@75 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@75 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@75 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@75 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@75 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@75 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@75 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@75 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@75 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@75 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@75 | 21 | ## SUCH DAMAGE. |
michael@75 | 22 | ## |
michael@75 | 23 | |
michael@75 | 24 | |
michael@75 | 25 | # package information |
michael@75 | 26 | Name: id3lib |
michael@75 | 27 | Summary: ID3v1 and ID3v2 SDK |
michael@75 | 28 | URL: http://id3lib.sourceforge.net/ |
michael@75 | 29 | Vendor: Thijmen Klok |
michael@75 | 30 | Packager: Michael Schloh von Bennewitz |
michael@75 | 31 | Distribution: Michael Schloh von Bennewitz |
michael@75 | 32 | Class: EVAL |
michael@75 | 33 | Group: Audio |
michael@75 | 34 | License: LGPL |
michael@75 | 35 | Version: 3.8.3 |
michael@75 | 36 | Release: 20090106 |
michael@75 | 37 | |
michael@75 | 38 | # list of sources |
michael@75 | 39 | Source0: http://switch.dl.sourceforge.net/id3lib/id3lib-%{version}.tar.gz |
michael@75 | 40 | |
michael@75 | 41 | # build information |
michael@75 | 42 | Prefix: %{l_prefix} |
michael@75 | 43 | BuildRoot: %{l_buildroot} |
michael@85 | 44 | BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc, gcc::with_cxx = yes |
michael@75 | 45 | PreReq: OpenPKG, openpkg >= 20040130 |
michael@75 | 46 | AutoReq: no |
michael@75 | 47 | AutoReqProv: no |
michael@75 | 48 | |
michael@75 | 49 | %description |
michael@75 | 50 | id3lib is an Opensource, cross platform software development library |
michael@75 | 51 | for reading, writing, and manipulating ID3v1 and ID3v2 tags. It is |
michael@75 | 52 | an ongoing project whose primary goals are full compliance with the |
michael@75 | 53 | ID3v2 standard, portability across several platforms, and providing |
michael@75 | 54 | a powerful and feature rich API with a highly stable and efficient |
michael@75 | 55 | implementation. |
michael@75 | 56 | |
michael@75 | 57 | %track |
michael@75 | 58 | prog id3lib = { |
michael@75 | 59 | version = %{version} |
michael@75 | 60 | url = http://switch.dl.sourceforge.net/id3lib/ |
michael@75 | 61 | regex = id3lib-(__VER__)\.tar\.gz |
michael@75 | 62 | } |
michael@75 | 63 | |
michael@75 | 64 | %prep |
michael@75 | 65 | # unpack sources |
michael@75 | 66 | %setup -q |
michael@75 | 67 | |
michael@75 | 68 | %build |
michael@75 | 69 | # prepare configuration |
michael@75 | 70 | CC="%{l_cc}" \ |
michael@75 | 71 | CXX="%{l_cxx}" \ |
michael@75 | 72 | CFLAGS="%{l_cflags -O}" \ |
michael@75 | 73 | CXXFLAGS="%{l_cxxflags -O}" \ |
michael@75 | 74 | CPPFLAGS="%{l_cppflags}" \ |
michael@75 | 75 | LDFLAGS="%{l_ldflags}" \ |
michael@75 | 76 | ./configure \ |
michael@75 | 77 | --prefix=%{l_prefix} \ |
michael@75 | 78 | --disable-shared |
michael@75 | 79 | |
michael@75 | 80 | # build using parallel make |
michael@75 | 81 | %{l_make} %{l_mflags -O} |
michael@75 | 82 | |
michael@75 | 83 | %install |
michael@75 | 84 | # remove previously existing installations |
michael@75 | 85 | rm -rf $RPM_BUILD_ROOT |
michael@75 | 86 | |
michael@75 | 87 | # run the native installation logic |
michael@75 | 88 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@75 | 89 | |
michael@75 | 90 | # strip binaries of symbols |
michael@75 | 91 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@75 | 92 | |
michael@75 | 93 | # determine installation files |
michael@75 | 94 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@75 | 95 | |
michael@75 | 96 | %files -f files |
michael@75 | 97 | |
michael@75 | 98 | %clean |
michael@75 | 99 | rm -rf $RPM_BUILD_ROOT |
michael@75 | 100 |