Skip to content

Commit

Permalink
Add boost package.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexpux committed Nov 26, 2013
1 parent ca08405 commit d26fc9e
Show file tree
Hide file tree
Showing 22 changed files with 1,736 additions and 0 deletions.
176 changes: 176 additions & 0 deletions mingw-w64-boost/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# Maintainer: Alexey Pavlov <[email protected]>

_realname=boost
_mingw_suff=mingw-w64-${CARCH}
pkgname="${_mingw_suff}-${_realname}"
pkgver=1.55.0
_boostver=${pkgver//./_}
pkgrel=1
pkgdesc="Free peer-reviewed portable C++ source libraries (mingw-w64)"
arch=('any')
url="http://www.boost.org/"
license=('custom')
depends=("${_mingw_suff}-crt" "${_mingw_suff}-zlib" "${_mingw_suff}-bzip2" "${_mingw_suff}-icu")
makedepends=("${_mingw_suff}-gcc" "${_mingw_suff}-bzip2" "${_mingw_suff}-icu")
options=('!strip' '!buildflags' 'staticlibs')
source=(http://downloads.sourceforge.net/sourceforge/boost/boost_${_boostver}.tar.bz2
boost-1.48.0-add-bjam-man-page.patch
boost-1.50.0-fix-non-utf8-files.patch
boost-1.50.0-pool.patch
boost-1.54.0-bind-static_assert.patch
boost-1.54.0-bootstrap.patch
boost-1.54.0-concept-unused_typedef.patch
boost-1.54.0-date_time-unused_typedef-2.patch
boost-1.54.0-date_time-unused_typedef.patch
boost-1.54.0-locale-unused_typedef.patch
boost-1.54.0-math-unused_typedef-2.patch
boost-1.54.0-mpi-unused_typedef.patch
boost-1.54.0-mpl-print.patch
boost-1.54.0-numeric-unused_typedef.patch
boost-1.54.0-property_tree-unused_typedef.patch
boost-1.54.0-python-unused_typedef.patch
boost-1.54.0-random-unused_typedef.patch
boost-1.54.0-spirit-unused_typedef-2.patch
boost-1.54.0-spirit-unused_typedef.patch
boost-1.54.0-static_warning-unused_typedef.patch
boost-1.54.0-tuple-unused_typedef.patch
boost-mingw.patch)
md5sums=('d6eef4b4cacb2183f2bf265a5a03a354'
'dff8166486150121bf89d7050c7e5c49'
'ef427ef3a47f8fdeeb6b4ae3246aa84f'
'a69f826fd911dcf34189aaaacf16853f'
'8b6978fd4ea68bc80b59a96186c8dd4c'
'7a370bc224e59340b723e775d77b22bf'
'0ccf6fc4f24afa513063868c51bddd7e'
'3505488d2674588461fea2a2042de4a8'
'e322f437a7067b30dd13443a3a0fee4a'
'18963bb39f778b0f0ed7894a5b48845d'
'84aeb88d0428267ed9c1e3cf098b93a1'
'fe9a4ef96b48c56c2791598ae19e53cc'
'c3aabfe9baa6ca34187e03fd338366dc'
'dffcb97e434b7017eea1717c2aa8c3ad'
'867983ebe812a2858ed900cb407944b6'
'4e652869f58b4ce601715b9fb2c2b9ee'
'b466c41f2ae6f40da127c4a28f563cee'
'047b713a5cd5d0d2171b2cb7520c233a'
'69521d5d7382793e5ea1da17a6288ccd'
'dbf74ec90edac5439cc96b39b30ba98b'
'c29dbf9746fea0688f87c8668903e12a'
'c003363c91f6f16294a77c5562c80dbd')

prepare() {
cd "${srcdir}/boost_${_boostver}"

patch -p1 -i ${srcdir}/boost-1.50.0-fix-non-utf8-files.patch
patch -p1 -i ${srcdir}/boost-1.48.0-add-bjam-man-page.patch
patch -p1 -i ${srcdir}/boost-1.50.0-pool.patch
patch -p1 -i ${srcdir}/boost-1.54.0-bind-static_assert.patch
patch -p1 -i ${srcdir}/boost-1.54.0-concept-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-mpl-print.patch
patch -p1 -i ${srcdir}/boost-1.54.0-static_warning-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-math-unused_typedef-2.patch
patch -p1 -i ${srcdir}/boost-1.54.0-tuple-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-random-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-date_time-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-date_time-unused_typedef-2.patch
patch -p1 -i ${srcdir}/boost-1.54.0-spirit-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-spirit-unused_typedef-2.patch
patch -p1 -i ${srcdir}/boost-1.54.0-numeric-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-property_tree-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-mpi-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-1.54.0-python-unused_typedef.patch
patch -p1 -i ${srcdir}/boost-mingw.patch
patch -p1 -i ${srcdir}/boost-1.54.0-bootstrap.patch
}

build() {
mkdir -p "${srcdir}/boost-${CARCH}"
lndir "${srcdir}/boost_${_boostver}" "${srcdir}/boost-${CARCH}"
cd "${srcdir}/boost-${CARCH}"
./bootstrap.sh --with-icu=${MINGW_PREFIX}
unset LDFLAGS CPPFLAGS

case ${CARCH} in
i686)
local _model=32
;;
x86_64)
local _model=64
;;
esac
local _bvar="variant=release threading=single,multi threadapi=win32 \
link=shared,static debug-symbols=on pch=off link=shared toolset=gcc"
local _bflag="-d2 --layout=tagged address-model=$( [[ ${CARCH} == i686 ]] && echo 32 || echo 64 ) \
${_bvar} --without-mpi --without-python "


./b2 \
toolset=gcc \
variant=release \
threading=multi \
threadapi=win32 \
link=shared,static \
runtime-link=shared \
--prefix=${pkgdir}${MINGW_PREFIX} \
-sHAVE_ICU=1 \
-sICU_PATH=${MINGW_PREFIX} \
-sICU_LINK="-L${MINGW_PREFIX}/lib -licuuc -licuin -licudt" \
-sICONV_PATH=${MINGW_PREFIX} \
-sICONV_LINK="-L${MINGW_PREFIX}/lib -liconv" \
-sNO_BZIP2 \
-sBZIP2_BINARY=bz2 \
-sBZIP2_INCLUDE=${MINGW_PREFIX}/include \
-sBZIP2_LIBPATH=${MINGW_PREFIX}/lib \
-sNO_ZLIB \
-sZLIB_BINARY=z \
-sZLIB_INCLUDE=${MINGW_PREFIX}/include \
-sZLIB_LIBPATH=${MINGW_PREFIX}/zlib \
pch=off \
-d2 \
--without-mpi \
--without-python \
address-model=${_model} \
--layout=tagged
}

package() {
cd "${srcdir}/boost-${CARCH}"
case ${CARCH} in
i686)
local _model=32
;;
x86_64)
local _model=64
;;
esac
./b2 \
toolset=gcc \
variant=release \
threading=multi \
threadapi=win32 \
link=shared,static \
runtime-link=shared \
--prefix=${pkgdir}${MINGW_PREFIX} \
-sHAVE_ICU=1 \
-sICU_PATH=${MINGW_PREFIX} \
-sICU_LINK="-L${MINGW_PREFIX}/lib -licuuc -licuin -licudt" \
-sICONV_PATH=${MINGW_PREFIX} \
-sICONV_LINK="-L${MINGW_PREFIX}/lib -liconv" \
-sNO_BZIP2 \
-sBZIP2_BINARY=bz2 \
-sBZIP2_INCLUDE=${MINGW_PREFIX}/include \
-sBZIP2_LIBPATH=${MINGW_PREFIX}/lib \
-sNO_ZLIB \
-sZLIB_BINARY=z \
-sZLIB_INCLUDE=${MINGW_PREFIX}/include \
-sZLIB_LIBPATH=${MINGW_PREFIX}/zlib \
--without-mpi \
--without-python \
address-model=${_model} \
--layout=tagged install

mkdir -p ${pkgdir}${MINGW_PREFIX}/bin
mv ${pkgdir}${MINGW_PREFIX}/lib/*.dll ${pkgdir}${MINGW_PREFIX}/bin
strip -x ${pkgdir}${MINGW_PREFIX}/bin/*.dll
strip -g ${pkgdir}${MINGW_PREFIX}/lib/*.a
}
150 changes: 150 additions & 0 deletions mingw-w64-boost/boost-1.48.0-add-bjam-man-page.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
diff --git a/tools/build/v2/doc/bjam.1 b/tools/build/v2/doc/bjam.1
new file mode 100644
index 0000000..8a44af6
--- /dev/null
+++ b/tools/build/v2/doc/bjam.1
@@ -0,0 +1,144 @@
+.TH "bjam" 1 "Sat Nov 19 2011" "Doxygen" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+bjam \- Command-line utility to build Boost-related C++ projects with Boost\&.Build
+.SH "SYNOPSIS"
+.PP
+\fBbjam\fP \fC[-a] [-dx] [-fx] [-jx] [-lx] [-n] [-ox] [-px] [-q] [-sx=y] [-tx] [-v] [--x]\fP
+.PP
+\fIbjam\fP accepts the following options:
+.PP
+\fB-a\fP
+.br
+ Build all targets, even if they are current
+.PP
+\fB-dx\fP
+.br
+ Set the debug level to x (0-9)
+.PP
+\fB-fx\fP
+.br
+ Read x instead of Jambase
+.PP
+\fB-jx\fP
+.br
+ Run up to x shell commands concurrently
+.PP
+\fB-lx\fP
+.br
+ Limit actions to x number of seconds after which they are stopped
+.PP
+\fB-n\fP
+.br
+ Don't actually execute the updating actions
+.PP
+\fB-ox\fP
+.br
+ Write the updating actions to file x
+.PP
+\fB-px\fP
+.br
+ x=0, pipes action stdout and stderr merged into action output
+.PP
+\fB-q\fP
+.br
+ Quit quickly as soon as a target fails
+.PP
+\fB-sx=y\fP
+.br
+ Set variable x=y, overriding environment
+.PP
+\fB-tx\fP
+.br
+ Rebuild x, even if it is up-to-date
+.PP
+\fB-v\fP
+.br
+ Print the version of jam and exit
+.PP
+\fB--x\fP
+.br
+ Option is ignored
+.SH "DESCRIPTION"
+.PP
+This section provides the information necessary to create your own projects using \fIBoost\&.Build\fP The information provided here is relatively high-level, and Chapter 6, Reference as well as the on-line help system must be used to obtain low-level documentation (see --help)
+.PP
+\fIBoost\&.Build\fP actually consists of two parts - \fIBoost\&.Jam\fP, a build engine with its own interpreted language, and \fIBoost\&.Build\fP itself, implemented in \fIBoost\&.Jam's\fP language\&. The chain of events when you type bjam on the command line is as follows:
+.IP "\(bu" 2
+\fIBoost\&.Jam\fP tries to find \fIBoost\&.Build\fP and loads the top-level module\&. The exact process is described in the section called “Initialization”
+.PP
+.PP
+.IP "\(bu" 2
+The top-level module loads user-defined configuration files, \fIuser-config\&.jam\fP and \fIsite-config\&.jam\fP, which define available toolsets
+.PP
+.PP
+.IP "\(bu" 2
+The \fIJamfile\fP in the current directory is read That in turn might cause reading of further Jamfiles\&. As a result, a tree of projects is created, with targets inside projects
+.PP
+.PP
+.IP "\(bu" 2
+Finally, using the build request specified on the command line, \fIBoost\&.Build\fP decides which targets should be built and how\&. That information is passed back to \fIBoost\&.Jam\fP, which takes care of actually running the scheduled build action commands
+.PP
+.PP
+So, to be able to successfully use \fIBoost\&.Build\fP, you need to know only four things:
+.IP "\(bu" 2
+How to configure \fIBoost\&.Build\fP (http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html)
+.IP "\(bu" 2
+How to declare targets in Jamfiles (http://www.boost.org/boost-build2/doc/html/bbv2/overview/targets.html)
+.IP "\(bu" 2
+How the build process works (http://www.boost.org/boost-build2/doc/html/bbv2/overview/build_process.html)
+.PP
+.PP
+Some Basics about the \fIBoost\&.Jam\fP language\&. See the section called “Boost\&.Jam Language” (http://www.boost.org/boost-build2/doc/html/bbv2/overview/jam_language.html)
+.SH "CONCEPTS"
+.PP
+\fIBoost\&.Build\fP has a few unique concepts that are introduced in this section\&. The best way to explain the concepts is by comparison with more classical build tools
+.PP
+When using any flavour of make, you directly specify targets and commands that are used to create them from other target\&. The below example creates a\&.o from a\&.c using a hardcoded compiler invocation command
+.PP
+a\&.o: a\&.c
+.br
+ g++ -o a\&.o -g a\&.c
+.PP
+This is rather low-level description mechanism and it is hard to adjust commands, options, and sets of created targets depending on the used compiler and operating system\&.
+.PP
+To improve portability, most modern build system provide a set of higher-level functions that can be used in build description files\&. Consider this example:
+.PP
+add_program ('a', 'a\&.c')
+.br
+.PP
+This is a function call that creates targets necessary to create executable file from source file a\&.c\&. Depending on configured properties, different commands line may be used\&. However, \fIadd_program\fP is higher-level, but rather thin level All targets are created immediately when build description is parsed, which makes it impossible to perform multi-variant builds\&. Often, change in any build property requires complete reconfiguration of the build tree
+.PP
+In order to support true multivariant builds, Boost\&.Build introduces the concept of metatarget—object that is created when build description is parsed and can be later called with specific build properties to generate actual targets
+.PP
+Consider an example:
+.PP
+exe a : a\&.cpp ;
+.br
+.PP
+When this declaration is parsed, \fIBoost\&.Build\fP creates a metatarget, but does not yet decides what files must be created, or what commands must be used\&. After all build files are parsed, Boost\&.Build considers properties requested on the command line\&. Supposed you have invoked \fIBoost\&.Build\fP with:
+.PP
+\fIbjam\fP toolset=gcc toolset=msvc
+.br
+.PP
+In that case, the metatarget will be called twice, once with toolset=gcc and once with toolset=msvc\&. Both invocations will produce concrete targets, that will have different extensions and use different command lines\&. Another key concept is build property\&. Build property is a variable that affects the build process\&. It can be specified on the command line, and is passed when calling a metatarget
+.PP
+While all build tools have a similar mechanism, \fIBoost\&.Build\fP differs by requiring that all build properties are declared in advance, and providing a large set of properties with portable semantics
+.PP
+The final concept is property propagation\&. Boost\&.Build does not require that every metatarget is called with the same properties\&. Instead, the 'top-level' metatargets are called with the properties specified on the command line Each metatarget can elect to augment or override some properties (in particular, using the requirements mechanism, see the section called “Requirements”: http://www.boost.org/boost-build2/doc/html/bbv2/overview/targets.html#bbv2.overview.targets.requirements) Then, the dependency metatargets are called with modified properties and produce concrete targets that are then used in build process Of course, dependency metatargets maybe in turn modify build properties and have dependencies of their own\&.
+.PP
+For more in-depth treatment of the requirements and concepts, you may refer to SYRCoSE 2009 Boost\&.Build article (http://syrcose.ispras.ru/2009/files/04_paper.pdf)\&.
+.SH "SEE ALSO"
+.PP
+\fBboost-libraries\fP(3)
+.SH "SUPPORT"
+.PP
+Please report any bugs to https://svn.boost.org/trac/boost/
+.SH "COPYRIGHT"
+.PP
+Boost Software License - Version 1\&.0 - August 17th, 2003
+.PP
+See the LICENSE_1_0\&.txt file for more information on that license, or directly on Internet:
+.br
+ http://www.boost.org/LICENSE_1_0.txt
22 changes: 22 additions & 0 deletions mingw-w64-boost/boost-1.50.0-fix-non-utf8-files.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/libs/units/example/autoprefixes.cpp b/libs/units/example/autoprefixes.cpp
index 8b2bc43..d04f2fe 100644
--- a/libs/units/example/autoprefixes.cpp
+++ b/libs/units/example/autoprefixes.cpp
@@ -67,7 +67,7 @@ struct thing_base_unit : boost::units::base_unit<thing_base_unit, boost::units::
struct euro_base_unit : boost::units::base_unit<euro_base_unit, boost::units::dimensionless_type, 5>
{
static const char* name() { return("EUR"); }
- static const char* symbol() { return("€"); }
+ static const char* symbol() { return("€"); }
};

int main()
@@ -140,7 +140,7 @@ int main()

quantity<euro_base_unit::unit_type> ce = 2048. * euro_base_unit::unit_type();
cout << name_format << engineering_prefix << ce << endl; // 2.048 kiloEUR
- cout << symbol_format << engineering_prefix << ce << endl; // 2.048 k€
+ cout << symbol_format << engineering_prefix << ce << endl; // 2.048 k€


return 0;
Loading

0 comments on commit d26fc9e

Please sign in to comment.