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.7 by eulisse, Thu Apr 13 23:35:14 2006 UTC vs.
Revision 1.43 by eulisse, Mon Feb 16 18:45:22 2009 UTC

# Line 1 | Line 1
1 < ### RPM external boost 1.33.1
2 < # Patches and build fudging by Lassi A. Tuura <lat@iki.fi> (FIXME: contribute to boost)
3 < # define boostver -%v <-- for 1.30.2
4 < %define boostver _%(echo %v | tr . _)
5 < Requires: boost-build python
6 < Source: http://dl.sourceforge.net/sourceforge/%n/%{n}%{boostver}.tar.gz
7 < #Patch: boost
1 > ### RPM external boost 1.38.0
2 > %define boostver _%(echo %realversion | tr . _)
3 > Source: http://internap.dl.sourceforge.net/sourceforge/%{n}/%{n}%{boostver}.tar.gz
4 >
5 > Requires: boost-build python bz2lib
6 > %if "%cmsplatf" == "slc4onl_ia32_gcc346"
7 > %else
8 > Requires: zlib
9 > %endif
10  
11   %prep
12   %setup -n %{n}%{boostver}
11 #%patch
13  
14   %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.
19 + PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
20   PR="PYTHON_ROOT=$PYTHON_ROOT"
21 < PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*$//')"
21 >
22 > # The following line assumes a version of the form x.y.z-XXXX, where the
23 > # "-XXXX" part represents some CMS rebuild of version x.y.z
24 > BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
25 > BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
26 >
27 > %if "%cmsplatf" != "slc4onl_ia32_gcc346"
28 > ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
29 > ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
30 >
31   case $(uname) in
32 <  Darwin )  bjam -s$PR -s$PV -sTOOLS=darwin || true ;;
33 <  * )       bjam -s$PR -s$PV -sTOOLS=gcc ;;
32 >  Darwin )  bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin --toolset=darwin || true ;;
33 >  * )       bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
34   esac
35 + %else
36 + bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI -sTOOLS=gcc
37 + %endif
38  
39   %install
26 boost_abi=$(echo %boostver | sed 's/^_//; s/_0$//')
40   case $(uname) in Darwin ) so=dylib ;; * ) so=so ;; esac
41 < mkdir -p %i/lib/debug
42 < (cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
43 < (cd bin/boost; find libs -path "libs/*/release/*.$so" -exec cp {} %i/lib \;)
41 > #no debug libs...
42 > #mkdir -p %i/lib/debug
43 > mkdir %i/lib
44 > #(cd bin/boost; find libs -path "libs/*/debug/*.$so" -exec cp {} %i/lib/debug \;)
45 > # Perhaps the following could be done with a wildcard for the darwin/gcc dir
46 > case %cmsplatf in
47 >  osx*)
48 >    (cd bin.v2; find libs -path "libs/*/build/darwin*/release/*.$so*" -exec cp  {} %i/lib/. \;)
49 >    ;;
50 >  * )
51 >    (cd bin.v2; find libs -path "libs/*/build/gcc*/release/*.$so*" -exec cp  {} %i/lib/. \;)
52 >    ;;
53 > esac
54 >
55   find boost -name '*.[hi]*' -print |
56    while read f; do
57      mkdir -p %i/include/$(dirname $f)
# Line 38 | Line 62 | find libs -name '*.py' -print |
62      mkdir -p %i/lib/$(dirname $f)
63      install -c $f %i/lib/$f
64    done
41 [ $(uname) = Darwin ] &&
42  for f in %i/lib/*.$so %i/lib/debug/*.$so; do
43    install_name_tool -id $f $f
44  done
65  
66 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
67 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%v ; done)
68 < (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
69 < (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%v; done)
66 > # Do all manipulation with files before creating symbolic links:
67 > perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
68 > #strip %i/lib/*.$so
69 >
70 > for l in `find %i/lib -name "*.$so.*"`
71 > do
72 >  ln -s `basename $l` `echo $l | sed -e "s|[.]$so[.].*|.$so|"`
73 > done
74 >
75   (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
76 +
77 + getLibName()
78 + {
79 +  libname=`find %i/lib -name "libboost_$1*mt*.$so" -exec basename {} \;`
80 +  echo $libname | sed -e 's|[.][^-]*$||;s|^lib||'
81 + }
82 +
83 + export BOOST_THREAD_LIB=`getLibName thread`
84 + export BOOST_SIGNALS_LIB=`getLibName signals`
85 + export BOOST_FILESYSTEM_LIB=`getLibName filesystem`
86 + export BOOST_PROGRAM_OPTIONS_LIB=`getLibName program_options`
87 + export BOOST_PYTHON_LIB=`getLibName python`
88 + export BOOST_REGEX_LIB=`getLibName regex`
89 +
90 + # SCRAM ToolBox toolfile
91 + mkdir -p %i/etc/scram.d
92 + # boost toolfile
93 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
94 + <doc type=BuildSystem::ToolDoc version=1.0>
95 + <Tool name=boost version=%v>
96 + <info url="http://www.boost.org"></info>
97 + <lib name="@BOOST_THREAD_LIB@">
98 + <lib name="@BOOST_SIGNALS_LIB@">
99 + <Client>
100 + <Environment name=BOOST_BASE default="%i"></Environment>
101 + <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
102 + <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
103 + </Client>
104 + <use name=sockets>
105 + <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
106 + <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
107 + </Tool>
108 + EOF_TOOLFILE
109 +
110 + # boost_filesystem toolfile
111 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
112 + <doc type=BuildSystem::ToolDoc version=1.0>
113 + <Tool name=boost_filesystem version=%v>
114 + <info url="http://www.boost.org"></info>
115 + <lib name="@BOOST_FILESYSTEM_LIB@">
116 + <use name=boost>
117 + </Tool>
118 + EOF_TOOLFILE
119 +
120 + # boost_program_options toolfile
121 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
122 + <doc type=BuildSystem::ToolDoc version=1.0>
123 + <Tool name=boost_program_options version=%v>
124 + <info url="http://www.boost.org"></info>
125 + <lib name="@BOOST_PROGRAM_OPTIONS_LIB@">
126 + <use name=boost>
127 + </Tool>
128 + EOF_TOOLFILE
129 +
130 + # boost_python toolfile
131 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
132 + <doc type=BuildSystem::ToolDoc version=1.0>
133 + <Tool name=boost_python version=%v>
134 + <info url="http://www.boost.org"></info>
135 + <lib name="@BOOST_PYTHON_LIB@">
136 + <Client>
137 + <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
138 + <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
139 + <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
140 + <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
141 + </Client>
142 + <use name=elementtree>
143 + <use name=gccxml>
144 + <use name=python>
145 + </Tool>
146 + EOF_TOOLFILE
147 +
148 + # boost_regex toolfile
149 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
150 + <doc type=BuildSystem::ToolDoc version=1.0>
151 + <Tool name=boost_regex version=%v>
152 + <info url="http://www.boost.org"></info>
153 + <lib name="@BOOST_REGEX_LIB@">
154 + <use name=boost>
155 + </Tool>
156 + EOF_TOOLFILE
157 +
158 + # boost_signals toolfile
159 + cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
160 + <doc type=BuildSystem::ToolDoc version=1.0>
161 + <Tool name=boost_signals version=%v>
162 + <info url="http://www.boost.org"></info>
163 + <lib name="@BOOST_SIGNALS_LIB@">
164 + <use name=boost>
165 + </Tool>
166 + EOF_TOOLFILE
167 +
168 + perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/*
169 +
170 + %post
171 + %{relocateConfig}etc/scram.d/boost
172 + %{relocateConfig}etc/scram.d/boost_filesystem
173 + %{relocateConfig}etc/scram.d/boost_program_options
174 + %{relocateConfig}etc/scram.d/boost_python
175 + %{relocateConfig}etc/scram.d/boost_regex
176 + %{relocateConfig}etc/scram.d/boost_signals

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines