ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/boost.spec
(Generate patch)

Comparing COMP/CMSDIST/boost.spec (file contents):
Revision 1.26 by ratnik, Tue Oct 16 08:38:00 2007 UTC vs.
Revision 1.58 by elmer, Thu Aug 26 11:04:19 2010 UTC

# Line 1 | Line 1
1 < ### RPM external boost 1.33.1-CMS9
2 < # Patches and build fudging by Lassi A. Tuura <lat@iki.fi> (FIXME: contribute to boost)
1 > ### RPM external boost 1.44.0
2   %define boostver _%(echo %realversion | tr . _)
3 < Source: http://dl.sourceforge.net/sourceforge/%n/%{n}%{boostver}.tar.gz
3 > Source: http://switch.dl.sourceforge.net/project/%{n}/%{n}/%{v}/%{n}%{boostver}.tar.gz
4 > %define closingbrace )
5 > %define online %(case %cmsplatf in *onl_*_*%closingbrace echo true;; *%closingbrace echo false;; esac)
6  
7   Requires: boost-build python bz2lib
8 < %if "%{?online_release:set}" != "set"
8 > %if "%online" != "true"
9   Requires: zlib
10   %endif
11  
# Line 12 | Line 13 | Requires: zlib
13   %setup -n %{n}%{boostver}
14  
15   %build
15 # Note that some targets will fail to build (the test programs have
16 # missing symbols), causing darwin to fail to link and bjam to return
17 # an error.  So ignore the exit code from bjam on darwin to avoid
18 # RPM falsely detecting a problem.
16   PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
17   PR="PYTHON_ROOT=$PYTHON_ROOT"
18  
# Line 24 | Line 21 | PR="PYTHON_ROOT=$PYTHON_ROOT"
21   BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
22   BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
23  
24 < %if "%{?online_release:set}" != "set"
24 > %if "%online" != "true"
25   ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
26   ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
27  
28   case $(uname) in
29 <  Darwin )  bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin || true ;;
30 <  * )       bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
29 >  Darwin )  bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR toolset=darwin stage;;
30 >  * )       bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR toolset=gcc stage;;
31   esac
32   %else
33 < bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI -sTOOLS=gcc
33 > bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI toolset=gcc stage
34   %endif
35  
36   %install
40 boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
37   case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
38 < #no debug libs...
39 < #mkdir -p %i/lib/debug
40 < mkdir %i/lib
41 < #(cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
42 < (cd bin/boost; find libs -path "libs/*/release/*.$so" -exec cp  {} %i/lib/. \;)
43 < find boost -name '*.[hi]*' -print |
44 <  while read f; do
45 <    mkdir -p %i/include/$(dirname $f)
46 <    install -c $f %i/include/$f
47 <  done
48 < find libs -name '*.py' -print |
49 <  while read f; do
50 <    mkdir -p %i/lib/$(dirname $f)
51 <    install -c $f %i/lib/$f
52 <  done
53 < [ $(uname) = Darwin ] &&
54 <  for f in %i/lib/*.$so %i/lib/debug/*.$so; do
55 <    install_name_tool -id $f $f
60 <  done
38 > mkdir -p %i/lib %i/include
39 > # copy files around in their final location.
40 > # We use tar to reduce the number of processes required
41 > # and because we need to build the build hierarchy for
42 > # the files that we are copying.
43 > pushd stage/lib
44 >  find . -name "*.$so*" -type f | tar cf - -T - | (cd %i/lib; tar xfp -)
45 > popd
46 > find boost -name '*.[hi]*' | tar cf - -T - | ( cd %i/include; tar xfp -)
47 >
48 > for l in `find %i/lib -name "*.$so.*"`
49 > do
50 >  ln -s `basename $l` `echo $l | sed -e "s|[.]$so[.].*|.$so|"`
51 > done
52 >
53 > pushd libs/python/pyste/install
54 >  python setup.py install --prefix=%i
55 > popd
56  
57   # Do all manipulation with files before creating symbolic links:
58 < perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
64 < strip %i/lib/*.$so
58 > perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin -type f)
59  
60 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
61 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%realversion ; done)
62 < #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
63 < #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%realversion; done)
64 < (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
65 <
66 < # SCRAM ToolBox toolfile
67 < mkdir -p %i/etc/scram.d
68 < # boost toolfile
75 < cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
76 < <doc type=BuildSystem::ToolDoc version=1.0>
77 < <Tool name=boost version=%v>
78 < <info url="http://www.boost.org"></info>
79 < <lib name=boost_thread-gcc-mt>
80 < <lib name=boost_signals-gcc-mt>
81 < <Client>
82 < <Environment name=BOOST_BASE default="%i"></Environment>
83 < <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
84 < <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
85 < </Client>
86 < <use name=sockets>
87 < <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
88 < <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
89 < </Tool>
90 < EOF_TOOLFILE
91 <
92 < # boost_filesystem toolfile
93 < cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
94 < <doc type=BuildSystem::ToolDoc version=1.0>
95 < <Tool name=boost_filesystem version=%v>
96 < <info url="http://www.boost.org"></info>
97 < <lib name=boost_filesystem-gcc-mt>
98 < <use name=boost>
99 < </Tool>
100 < EOF_TOOLFILE
101 <
102 < # boost_program_options toolfile
103 < cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
104 < <doc type=BuildSystem::ToolDoc version=1.0>
105 < <Tool name=boost_program_options version=%v>
106 < <info url="http://www.boost.org"></info>
107 < <lib name=boost_program_options-gcc-mt>
108 < <use name=boost>
109 < </Tool>
110 < EOF_TOOLFILE
111 <
112 < # boost_python toolfile
113 < cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
114 < <doc type=BuildSystem::ToolDoc version=1.0>
115 < <Tool name=boost_python version=%v>
116 < <info url="http://www.boost.org"></info>
117 < <lib name=boost_python-gcc-mt>
118 < <Client>
119 < <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
120 < <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
121 < <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
122 < <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
123 < </Client>
124 < <use name=elementtree>
125 < <use name=gccxml>
126 < <use name=python>
127 < </Tool>
128 < EOF_TOOLFILE
129 <
130 < # boost_regex toolfile
131 < cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
132 < <doc type=BuildSystem::ToolDoc version=1.0>
133 < <Tool name=boost_regex version=%v>
134 < <info url="http://www.boost.org"></info>
135 < <lib name=boost_regex-gcc-mt>
136 < <use name=boost>
137 < </Tool>
138 < EOF_TOOLFILE
139 <
140 < # boost_signals toolfile
141 < cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
142 < <doc type=BuildSystem::ToolDoc version=1.0>
143 < <Tool name=boost_signals version=%v>
144 < <info url="http://www.boost.org"></info>
145 < <lib name=boost_signals-gcc-mt>
146 < <use name=boost>
147 < </Tool>
148 < EOF_TOOLFILE
60 > # setup dependencies environment
61 > rm -rf %i/etc/profile.d
62 > mkdir -p %i/etc/profile.d
63 > for x in %pkgreqs; do
64 >  case $x in /* ) continue ;; esac
65 >  p=%{instroot}/%{cmsplatf}/$(echo $x | sed 's/\([^+]*\)+\(.*\)+\([A-Z0-9].*\)/\1 \2 \3/' | tr ' ' '/')
66 >  echo ". $p/etc/profile.d/init.sh" >> %i/etc/profile.d/dependencies-setup.sh
67 >  echo "source $p/etc/profile.d/init.csh" >> %i/etc/profile.d/dependencies-setup.csh
68 > done
69  
70   %post
71 < %{relocateConfig}etc/scram.d/boost
72 < %{relocateConfig}etc/scram.d/boost_filesystem
153 < %{relocateConfig}etc/scram.d/boost_program_options
154 < %{relocateConfig}etc/scram.d/boost_python
155 < %{relocateConfig}etc/scram.d/boost_regex
156 < %{relocateConfig}etc/scram.d/boost_signals
71 > %{relocateConfig}etc/profile.d/dependencies-setup.sh
72 > %{relocateConfig}etc/profile.d/dependencies-setup.csh

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines