File boost-jam.spec of Package boost-jam

#
# spec file for package boost-jam (Version 3.1.17)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           boost-jam
License:        BSD 3-Clause
Group:          Development/Tools/Building
AutoReqProv:    on
Version:        3.1.17
Release:        1
Summary:        An Enhanced Make Replacement
Source:         %{name}-%{version}.tar.bz2
# From http://boost.cvs.sourceforge.net/boost/boost/tools/jam/test/:
Source2:        test.tar.gz 
Url:            http://www.boost.org/
Patch1:         boost-jam-cflags_for_build.diff
Patch2:         boost-jam-codecleanup.diff
Patch3:         boost-jam-jam0_use_passed_cflags.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Boost Jam is a build tool based on FTJam, which in turn is based on
Perforce Jam. It contains significant improvements made to facilitate
its use in the Boost Build System, but should be backward compatible
with Perforce Jam.



Authors:
--------
    Perforce Jam : Cristopher Seiwald
    FT Jam    : David Turner
    Boost Jam : David Abrahams

%prep
%setup -q
find . -type f|xargs chmod -R u+w
%patch1
%patch2
%patch3
chmod -x images/*.png

%build
%ifarch s390
#export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -O1"
%endif
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wall -fno-strict-aliasing"
export CFLAGS="$RPM_OPT_FLAGS"
LOCATE_TARGET=bin ./build.sh gcc --symbols
# Trivial test: -- Documented used of bjam -v: Print the version of jam and exit:
bin/bjam -v
ln  -s bin bin.linux
cd ..
tar xvf %{SOURCE2}
ln -s %{name}-%{version} src
cd test
sh test.sh || if [ $? -gt 5 ]; then sh test.sh;fi

%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
install -m 755 bin/bjam %{buildroot}%{_bindir}/bjam-%{version}
ln -sf bjam-%{version} %{buildroot}%{_bindir}/bjam
ln -sf bjam-%{version} %{buildroot}%{_bindir}/jam

%files
%defattr(-,root,root)
%attr(755,root,root) %{_bindir}/*
%doc *.html images

%clean
rm -rf %{buildroot}

%changelog
* Fri Feb 13 2009 pth@suse.de
- Use -fno-strict-aliasing to make the program run on SLES9.
* Tue Feb 10 2009 pth@suse.de
- Update to 3.1.17:
  * Reflect the results of calling bjam from Python.
  * Try to work around at least one compiler bug with GCC and variable
  aliasing that causes crashes with hashing file cache entries.
  * Isolate running of bjam tests to individual bjam instances to prevent
  possible spillover errors from one test affecting another test.
  Separate the bjam used to run the tests vs. the bjam being tested. And
  add automatic re-building of the bjam being tested.
  * Fix some possible overrun issues revealed by Fortify build. Thanks to
  Steven Robbins for pointing out the issues.
  * Handle \n and \r escape sequences.
  * Minor edits to remove -Wall warnings.
  * Dynamically adjust pwd buffer query size to allow for when PATH_MAX is
  default defined instead of being provided by the system C library.
  * Minor perf improvement for bjam by replacing hash function with faster
  version. Only 1%% diff for Boost tree.
  * Updated Boost Jam's error location reporting when parsing Jamfiles. Now
  it reports the correct error location information when encountering an
  unexpected EOF. It now also reports where an invalid lexical token
  being read started instead of finished which makes it much easier to
  find errors like unclosed quotes or curly braces.
  * Removed the -xarch=generic architecture from build.jam as this option is
  unknown to the Sun compilers on Linux.
  * Fixed a bug with T_FATE_ISTMP getting reported as T_FATE_ISTMP &
  T_FATE_NEEDTMP at the same time due to a missing break in a switch
  statement.
  * Fixed a Boost Jam bug causing it to sometimes trigger actions depending
  on targets that have not been built yet.
  * Added missing documentation for Boost Jam's :T variable expansion
  modifier which converts all back-slashes ('\') to forward slashed ('/').
  * Corrected a potential memory leak in Boost Jam's builtin_shell()
  function that would appear should Boost Jam ever start to release its
  allocated string objects.
  * Made all Boost Jam's ECHO commands automatically flush the standard
  output to make that output more promptly displayed to the user.
  * Made Boost Jam tests quote their bjam executable name when calling it
  allowing those executables to contain spaces in their name and/or path.
  * Change execunix.c to always use fork() instead of vfork() on the Mac.
  This works around known issues with bjam on PPC under Tiger and a
  problem reported by Rene with bjam on x86 under Leopard.
  * Corrected a bug in Boost Jam's base Jambase script causing it to trim
  the error message displayed when its boost-build rule gets called
  multiple times.
  * When importing from Python into an module with empty string as name,
  import into root module.
  * Patch for the NORMALIZE_PATH builtin Boost Jam rule as well as an
  appropriate update for the path.jam Boost Build module where that rule
  was being used to implement path join and related operations.
  * Fixed a bug causing Boost Jam not to handle target file names specified
  as both short and long file names correctly.
  * Relaxed test, ignoring case of drive letter.
  * Implemented a patch contributed by Igor Nazarenko reimplementing the
  list_sort() function to use a C qsort() function instead of a
  hand-crafted merge-sort algorithm.  Makes some list sortings (e.g.
  1,2,1,2,1,2,1,2, ...) extremely faster, in turn significantly speeding
  up some project builds.
  * Solved the problem with bjam going into an active wait state, hogging up
  processor resources, when waiting for one of its child processes to
  terminate while not all of its available child process slots are being
  used.
  * Solved a race condition between bjam's output reading/child process
  termination detection and the child process's output
  generation/termination which could have caused bjam not to collect the
  terminated process's final output.
  * Code reformatting and cleanups.
  * Implement ISFILE built-in.
* Fri Sep 05 2008 pth@suse.de
- Update to 3.1.16:
  * Plug memory leak when closing out actions.
  * Various improvements to __TIMINGRULE_ and __ACTIONRULE_ target
  variable hooks.
  * Change JAMDATE to use common ISO date format.
  * Add test for result status values of simple actions, i.e.
  empty actions.
  * Fix buffer overrun bug in expanding @() subexpressions.
  * Check empty string invariants, instead of assuming all strings
  are allocated. And reset strings when they are freed.
  * Add OSPLAT=PARISC for HP-UX PA-RISC. -- Boris G.
  * Make quietly actions really quiet by not printing the command
  output. The output for the quietly actions is still available
  through __ACTIONRULE_.
  * When setting OSPLAT, check __ia64 macro.
  * Get the unix timing working correctly.
  * Add -fno-strict-aliasing to compilation with gcc. Which works
  around GCC-4.2 crash problems.
  * Increased support for Python integration.
  * Allow specifying options with quotes, i.e. --with-python=xyz,
  to work around the CMD shell using = as an argument separator.
  * Add values of variables specified with -s to .EVNRION module,
  so that we can override environment on command line.
  * Make NORMALIZE_PATH convert to /.
* Fri Jul 27 2007 pth@suse.de
- Directly pass CFLAGS and RPM_OPTFLAGS to jam0 when bootstrapping
  (obsoletes the fix from Daniel Schepler) and pass
  -fno-strict-aliasing to gcc to fix the bjam segfault.
- Build optimized binary but don't strip it.
* Tue Jul 24 2007 bk@suse.de
- fix early bjam segfault with gcc-4.2 (fix from Daniel Schepler)
- add testsuite from today's boost CVS and allow a maxium of 5 fails
- build debug binary by default, adds debuginfo package(thanks pth)
* Thu Jul 19 2007 pth@suse.de
- Update to 3.1.14. Changes since 3.1.4:
  * Implement NATIVE_FILE builtin and several native rules.
  * Use default value of BOOST_BUILD_PATH is not is set in environment.
* Sat May 27 2006 schwab@suse.de
- Don't strip binaries.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Oct 31 2005 dmueller@suse.de
- don't build as root
* Wed May 26 2004 ro@suse.de
- added -fno-strict-aliasing
* Fri May 07 2004 uli@suse.de
- honor RPM_OPT_FLAGS not only when bootstrapping
- build with -O1 on s390 (fixes boost)
* Wed Jul 09 2003 pthomas@suse.de
- Initial package creation.
openSUSE Build Service is sponsored by