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