]> git.pld-linux.org Git - packages/crossmingw32-boost.git/blame - crossmingw32-boost.spec
- tabs in preamble
[packages/crossmingw32-boost.git] / crossmingw32-boost.spec
CommitLineData
28441938 1%define realname boost
2Summary: The Boost C++ Libraries - Mingw32 cross version
f825d7b1 3Summary(pl.UTF-8): Biblioteki C++ "Boost" - wersja skrośna dla Mingw32
28441938 4Name: crossmingw32-%{realname}
5Version: 1.32.0
6%define _fver %(echo %{version} | tr . _)
7Release: 1
8License: Boost Software License and others
9Group: Libraries
10Source0: http://dl.sourceforge.net/boost/%{realname}_%{_fver}.tar.bz2
11# Source0-md5: e1d1fc7b8fc8c51df4564c2188ca51cb
12Patch0: %{name}-win.patch
13URL: http://www.boost.org/
14Requires: crossmingw32-runtime
15BuildRequires: crossmingw32-gcc-c++
16BuildRequires: crossmingw32-runtime
17BuildRequires: crossmingw32-w32api
18BuildRequires: boost-jam
19BuildRequires: libtool >= 2:1.4d
20BuildRequires: perl-base
21BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23%define no_install_post_strip 1
24
25%define target i386-mingw32
26%define target_platform i386-pc-mingw32
27%define arch %{_prefix}/%{target}
28%define gccarch %{_prefix}/lib/gcc-lib/%{target}
29%define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
30
31%define __cc %{target}-gcc
32%define __cxx %{target}-g++
33
34%ifarch alpha sparc sparc64 sparcv9
35# alpha's -mieee and sparc's -mtune=* are not valid for target's gcc
36%define optflags -O2
37%endif
38
39%description
40The Boost web site provides free peer-reviewed portable C++ source
41libraries. The emphasis is on libraries which work well with the C++
42Standard Library. One goal is to establish "existing practice" and
43provide reference implementations so that the Boost libraries are
44suitable for eventual standardization. Some of the libraries have
45already been proposed for inclusion in the C++ Standards Committee's
46upcoming C++ Standard Library Technical Report.
47
241a7e06 48%description -l pl.UTF-8
28441938 49Strona http://www.boost.org/ dostarcza darmowe biblioteki C++ wraz z
241a7e06
JR
50kodem źródłowym. Nacisk położono na biblioteki, które dobrze
51współpracują ze standardową biblioteką C++. Celem jest ustanowienie
52"istniejącej praktyki" i dostarczenie implementacji, tak że biblioteki
53"Boost" nadają się do ewentualnej standaryzacji. Niektóre z bibliotek
54już zostały zgłoszone do komitetu standaryzacyjnego C++ w nadchodzącym
28441938 55Raporcie Technicznym Biblioteki Standardowej C++
56
57%package dll
58Summary: %{realname} - DLL libraries for Windows
f825d7b1 59Summary(pl.UTF-8): %{realname} - biblioteki DLL dla Windows
28441938 60Group: Applications/Emulators
61
62%description dll
63%{realname} - DLL libraries for Windows.
64
241a7e06 65%description dll -l pl.UTF-8
28441938 66%{realname} - biblioteki DLL dla Windows.
67
68%prep
69%setup -q -n %{realname}_%{_fver}
70%patch0 -p1
71
72# don't know how to pass it through (b)jam -s (no way?)
73# due to oversophisticated build flags system
74%{__perl} -pi -e 's/ -O3 / %{rpmcflags} /' tools/build/v1/gcc-tools.jam
75
76%ifarch alpha
77# -pthread gcc parameter doesn't add _REENTRANT to cpp macros on alpha (only)
78# don't know, is it gcc bug or intentional omission?
79# anyway, boost check of -D_REENTRANT in its headers, so it's needed here
80%{__perl} -pi -e 's/(CFLAGS.*-pthread)/$1 -D_REENTRANT/' tools/build/v1/gcc-tools.jam
81%endif
82
83find . -type f -exec sed -e 's/#error "wide char i\/o not supported on this platform"//' -i \{\} \;
84
85%build
86CC=%{target}-gcc ; export CC
87CXX=%{target}-g++ ; export CXX
88LD=%{target}-ld ; export LD
89AR=%{target}-ar ; export AR
90AS=%{target}-as ; export AS
91CROSS_COMPILE=1 ; export CROSS_COMPILE
92CPPFLAGS="-I%{arch}/include" ; export CPPFLAGS
93RANLIB=%{target}-ranlib ; export RANLIB
94LDSHARED="%{target}-gcc -shared" ; export LDSHARED
95TARGET="%{target}" ; export TARGET
96
97PYTHON_ROOT=
98PYTHON_VERSION=
99
100bjam \
101 -d2 \
102 -sBUILD="release <threading>multi" \
103 -sPYTHON_ROOT=$PYTHON_ROOT \
104 -sPYTHON_VERSION=$PYTHON_VERSION \
105 -sGXX="$CXX" \
106 -sGCC="$CC"
107
108mkdir wlib
109cd bin/*/*
110rm -rf test
111rm -rf serialization
112for i in *
113do
114 cd $i/*
115 lib=`echo lib*so|sed -e 's/\.so//'`
116 blib=`echo $lib|sed -e 's/^lib//'`
117
118 cd $lib.a
119 find -type f -exec mv \{\} . \;
120 $AR cru ../../../../../../wlib/$lib.a *\.o
121 $RANLIB ../../../../../../wlib/$lib.a
122 cd ..
123
124 cd $lib.so
125 find -type f -exec mv \{\} . \;
126 %{__cxx} --shared *\.o \
127 -Wl,--enable-auto-image-base \
128 -o ../../../../../../wlib/$blib.dll \
129 -Wl,--out-implib,$lib.dll.a
130 mv $lib.dll.a ../../../../../../wlib/
131 cd ..
132
133 cd ../..
134done
135cd ../../..
136
137%if 0%{!?debug:1}
138%{target}-strip wlib/*.dll
139%{target}-strip -g -R.comment -R.note wlib/*.a
140%endif
141
142%install
143rm -rf $RPM_BUILD_ROOT
144install -d $RPM_BUILD_ROOT%{arch}/{include,lib}
145install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
146
147cp -r boost $RPM_BUILD_ROOT%{arch}/include
148install wlib/*.a $RPM_BUILD_ROOT%{arch}/lib
149install wlib/*.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system/
150
151%clean
152rm -rf $RPM_BUILD_ROOT
153
154%files
155%defattr(644,root,root,755)
156%{arch}/include/boost
157%{arch}/lib/*
158
159%files dll
160%defattr(644,root,root,755)
161%{_datadir}/wine/windows/system/*
This page took 0.096488 seconds and 4 git commands to generate.