ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
Revision: 1.68
Committed: Mon Mar 12 09:02:23 2012 UTC (13 years, 1 month ago) by davidlt
Branch: MAIN
CVS Tags: sm20120404-60X-gcc470, davidlt_20120403_1455-60X-gcc470, davidlt_20120327_1112-51X-gcc470, davidlt_1-51X-gcc470, sm20120327-60X-gcc470, davidlt_20120315_1325-60X-gcc470, davidlt_20120314_1407-60X-gcc470, BOOTSTRAP_slc5_amd64_gcc470, davidlt_60X_gcc470_2, davidlt_60X_gcc470
Changes since 1.67: +9 -0 lines
Log Message:
Add patch[*gcc47*]: boost-1.47.0-fix-gcc47.patch

File Contents

# User Rev Content
1 eulisse 1.65 ### RPM external boost 1.47.0
2 elmer 1.17 %define boostver _%(echo %realversion | tr . _)
3 elmer 1.58 Source: http://switch.dl.sourceforge.net/project/%{n}/%{n}/%{v}/%{n}%{boostver}.tar.gz
4 eulisse 1.65 %define online %(case %cmsplatf in (*onl_*_*) echo true;; (*) echo false;; esac)
5 argiro 1.1
6 eulisse 1.65 Requires: python bz2lib
7 muzaffar 1.45 %if "%online" != "true"
8 ratnik 1.25 Requires: zlib
9     %endif
10 eulisse 1.66 Patch0: boost-1.47.0-fix-strict-overflow
11 eulisse 1.67 Patch1: boost-1.47.0-fix-unused
12 davidlt 1.68 Patch2: boost-1.47.0-fix-gcc47
13 ratnik 1.25
14 argiro 1.1 %prep
15     %setup -n %{n}%{boostver}
16 eulisse 1.66 %patch0 -p1
17 eulisse 1.67 %patch1 -p1
18 eulisse 1.66
19 davidlt 1.68 case %cmsplatf in
20     *gcc47*)
21     %patch2 -p1
22     ;;
23     *)
24     ;;
25     esac
26    
27 eulisse 1.64 perl -p -i -e 's/-no-cpp-precomp//' tools/build/v2/tools/darwin.jam \
28     tools/build/v2/tools/darwin.py
29 argiro 1.1
30     %build
31 eulisse 1.65 case %cmsos in
32     osx*) TOOLSET=darwin ;;
33     *) TOOLSET=gcc ;;
34     esac
35    
36     pushd tools/build/v2
37    
38     sh bootstrap.sh $TOOLSET
39     popd
40    
41 ratnik 1.25 PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
42 argiro 1.1 PR="PYTHON_ROOT=$PYTHON_ROOT"
43 ratnik 1.25
44 elmer 1.17 # The following line assumes a version of the form x.y.z-XXXX, where the
45     # "-XXXX" part represents some CMS rebuild of version x.y.z
46     BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
47 ratnik 1.25 BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
48    
49 eulisse 1.65 if [ ! X%online = "Xtrue" ]
50     then
51     ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
52     ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
53     fi
54 eulisse 1.8
55 eulisse 1.65 tools/build/v2/bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI ${ZLIBR+-s$ZLIBR} ${ZLIBI+-s$ZLIBI} toolset=$TOOLSET stage
56 argiro 1.1
57     %install
58 eulisse 1.65 case %cmsos in osx*) so=dylib ;; *) so=so ;; esac
59 eulisse 1.52 mkdir -p %i/lib %i/include
60     # copy files around in their final location.
61     # We use tar to reduce the number of processes required
62     # and because we need to build the build hierarchy for
63     # the files that we are copying.
64     pushd stage/lib
65     find . -name "*.$so*" -type f | tar cf - -T - | (cd %i/lib; tar xfp -)
66     popd
67     find boost -name '*.[hi]*' | tar cf - -T - | ( cd %i/include; tar xfp -)
68 ratnik 1.19
69 eulisse 1.42 for l in `find %i/lib -name "*.$so.*"`
70     do
71     ln -s `basename $l` `echo $l | sed -e "s|[.]$so[.].*|.$so|"`
72     done
73 ratnik 1.31
74 eulisse 1.52 pushd libs/python/pyste/install
75     python setup.py install --prefix=%i
76     popd
77    
78     # Do all manipulation with files before creating symbolic links:
79     perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin -type f)
80 ratnik 1.16
81 diego 1.59 # Generate dependencies-setup.{sh,csh} so init.{sh,csh} picks full environment.
82 diego 1.54 mkdir -p %i/etc/profile.d
83 diego 1.59 : > %i/etc/profile.d/dependencies-setup.sh
84     : > %i/etc/profile.d/dependencies-setup.csh
85     for tool in $(echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'); do
86     root=$(echo $tool | tr a-z- A-Z_)_ROOT; eval r=\$$root
87     if [ X"$r" != X ] && [ -r "$r/etc/profile.d/init.sh" ]; then
88     echo "test X\$$root != X || . $r/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
89     echo "test X\$$root != X || source $r/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
90     fi
91 diego 1.54 done
92 diego 1.53
93 muzaffar 1.21 %post
94 diego 1.59 %{relocateConfig}etc/profile.d/dependencies-setup.*sh