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.10 by ratnik, Wed Apr 18 23:46:01 2007 UTC vs.
Revision 1.28 by elmer, Fri Nov 2 22:21:10 2007 UTC

# Line 1 | Line 1
1 < ### RPM external boost 1.33.1
2 < Requires: gcc-wrapper
3 < # Patches and build fudging by Lassi A. Tuura <lat@iki.fi> (FIXME: contribute to boost)
4 < # define boostver -%v <-- for 1.30.2
5 < %define boostver _%(echo %v | tr . _)
6 < Requires: boost-build python bz2lib zlib
7 < Source: http://dl.sourceforge.net/sourceforge/%n/%{n}%{boostver}.tar.gz
8 < #Patch: boost
1 > ### RPM external boost 1.34.1-CMS18
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 "%{?online_release:set}" != "set"
7 > Requires: zlib
8 > %endif
9  
10   %prep
11   %setup -n %{n}%{boostver}
12 #%patch
12  
13   %build
15 ## IMPORT gcc-wrapper
14   # Note that some targets will fail to build (the test programs have
15   # missing symbols), causing darwin to fail to link and bjam to return
16   # an error.  So ignore the exit code from bjam on darwin to avoid
17   # RPM falsely detecting a problem.
18 + PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*-.*$//')"
19   PR="PYTHON_ROOT=$PYTHON_ROOT"
20 < PV="PYTHON_VERSION=$(echo $PYTHON_VERSION | sed 's/\.[0-9]*$//')"
21 < BZ2LIBR="BZ2LIB_LIBPATH=$BZ2LIB_ROOT/lib"
20 >
21 > # The following line assumes a version of the form x.y.z-XXXX, where the
22 > # "-XXXX" part represents some CMS rebuild of version x.y.z
23 > BZ2LIBR="BZIP2_LIBPATH=$BZ2LIB_ROOT/lib"
24 > BZ2LIBI="BZIP2_INCLUDE=$BZ2LIB_ROOT/include"
25 >
26 > %if "%{?online_release:set}" != "set"
27   ZLIBR="ZLIB_LIBPATH=$ZLIB_ROOT/lib"
24 BZ2LIBI="BZ2LIB_INCLUDE=$BZ2LIB_ROOT/include"
28   ZLIBI="ZLIB_INCLUDE=$ZLIB_ROOT/include"
29  
30   case $(uname) in
31 <  Darwin )  bjam -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin || true ;;
32 <  * )       bjam -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
31 >  Darwin )  bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=darwin || true ;;
32 >  * )       bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$ZLIBR -sTOOLS=gcc ;;
33   esac
34 + %else
35 + bjam %makeprocesses -s$PR -s$PV -s$BZ2LIBR -s$BZ2LIBI -sTOOLS=gcc
36 + %endif
37  
38   %install
39   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 > (cd bin/boost; find libs -path "libs/*/release/*.$so" -exec cp  {} %i/lib/. \;)
46   find boost -name '*.[hi]*' -print |
47    while read f; do
48      mkdir -p %i/include/$(dirname $f)
# Line 50 | Line 58 | find libs -name '*.py' -print |
58      install_name_tool -id $f $f
59    done
60  
61 + # Do all manipulation with files before creating symbolic links:
62 + perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
63 + strip %i/lib/*.$so
64 +
65   (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-$boost_abi//"); done)
66 < (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%v ; done)
67 < (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
68 < (cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%v; done)
66 > (cd %i/lib; for f in lib*-$boost_abi.$so; do ln -s $f $f.%realversion ; done)
67 > #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $(echo $f | sed "s/-d-$boost_abi//"); done)
68 > #(cd %i/lib/debug; for f in lib*-d-$boost_abi.$so; do ln -s $f $f.%realversion; done)
69   (cd %i/lib/libs/python/pyste/install; python setup.py install --prefix=%i)
70  
71 < perl -p -i -e "s|^#!.*python|/usr/bin/env python|" $(find %{i}/lib %{i}/bin)
72 <
73 < #
74 < #
71 > # SCRAM ToolBox toolfile
72 > mkdir -p %i/etc/scram.d
73 > # boost toolfile
74 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost
75 > <doc type=BuildSystem::ToolDoc version=1.0>
76 > <Tool name=boost version=%v>
77 > <info url="http://www.boost.org"></info>
78 > <lib name=boost_thread-gcc-mt>
79 > <lib name=boost_signals-gcc-mt>
80 > <Client>
81 > <Environment name=BOOST_BASE default="%i"></Environment>
82 > <Environment name=LIBDIR default="$BOOST_BASE/lib"></Environment>
83 > <Environment name=INCLUDE default="$BOOST_BASE/include"></Environment>
84 > </Client>
85 > <use name=sockets>
86 > <Runtime name=LD_LIBRARY_PATH value="$BOOST_BASE/lib" type=path>
87 > <Runtime name=CMSSW_FWLITE_INCLUDE_PATH value="$BOOST_BASE/include" type=path>
88 > </Tool>
89 > EOF_TOOLFILE
90 >
91 > # boost_filesystem toolfile
92 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_filesystem
93 > <doc type=BuildSystem::ToolDoc version=1.0>
94 > <Tool name=boost_filesystem version=%v>
95 > <info url="http://www.boost.org"></info>
96 > <lib name=boost_filesystem-gcc-mt>
97 > <use name=boost>
98 > </Tool>
99 > EOF_TOOLFILE
100 >
101 > # boost_program_options toolfile
102 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_program_options
103 > <doc type=BuildSystem::ToolDoc version=1.0>
104 > <Tool name=boost_program_options version=%v>
105 > <info url="http://www.boost.org"></info>
106 > <lib name=boost_program_options-gcc-mt>
107 > <use name=boost>
108 > </Tool>
109 > EOF_TOOLFILE
110 >
111 > # boost_python toolfile
112 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_python
113 > <doc type=BuildSystem::ToolDoc version=1.0>
114 > <Tool name=boost_python version=%v>
115 > <info url="http://www.boost.org"></info>
116 > <lib name=boost_python-gcc-mt>
117 > <Client>
118 > <Environment name=BOOST_PYTHON_BASE default="%i"></Environment>
119 > <Environment name=PYSTE_EXEC default="$BOOST_PYTHON_BASE/lib/python2.4/site-packages/Pyste/pyste.py"></Environment>
120 > <Environment name=LIBDIR default="$BOOST_PYTHON_BASE/lib"></Environment>
121 > <Environment name=INCLUDE default="$BOOST_PYTHON_BASE/include"></Environment>
122 > </Client>
123 > <use name=elementtree>
124 > <use name=gccxml>
125 > <use name=python>
126 > </Tool>
127 > EOF_TOOLFILE
128 >
129 > # boost_regex toolfile
130 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_regex
131 > <doc type=BuildSystem::ToolDoc version=1.0>
132 > <Tool name=boost_regex version=%v>
133 > <info url="http://www.boost.org"></info>
134 > <lib name=boost_regex-gcc-mt>
135 > <use name=boost>
136 > </Tool>
137 > EOF_TOOLFILE
138 >
139 > # boost_signals toolfile
140 > cat << \EOF_TOOLFILE >%i/etc/scram.d/boost_signals
141 > <doc type=BuildSystem::ToolDoc version=1.0>
142 > <Tool name=boost_signals version=%v>
143 > <info url="http://www.boost.org"></info>
144 > <lib name=boost_signals-gcc-mt>
145 > <use name=boost>
146 > </Tool>
147 > EOF_TOOLFILE
148 >
149 > %post
150 > %{relocateConfig}etc/scram.d/boost
151 > %{relocateConfig}etc/scram.d/boost_filesystem
152 > %{relocateConfig}etc/scram.d/boost_program_options
153 > %{relocateConfig}etc/scram.d/boost_python
154 > %{relocateConfig}etc/scram.d/boost_regex
155 > %{relocateConfig}etc/scram.d/boost_signals

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines