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