Skip to content

Commit

Permalink
=== Rebuild with GCC-5.1.0. Part IV ===
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexpux committed Jul 7, 2015
1 parent 30af6b1 commit f4911b6
Show file tree
Hide file tree
Showing 46 changed files with 773 additions and 247 deletions.
8 changes: 5 additions & 3 deletions mingw-w64-SDL/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_realname=SDL
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.2.15
pkgrel=5
pkgrel=6
pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (mingw-w64)"
arch=('any')
url="http://libsdl.org"
Expand All @@ -15,18 +15,20 @@ source=("$url/release/SDL-$pkgver.tar.gz")
md5sums=('9d96df8417572a2afb781a7c4c811a85')

build() {
[[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}"
mkdir -p "${srcdir}/build-${MINGW_CHOST}"
cd "${srcdir}/build-${MINGW_CHOST}"
"${srcdir}"/SDL-${pkgver}/configure \
../SDL-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--disable-assembly

make
}

package() {
cd "${srcdir}/build-${MINGW_CHOST}"
make DESTDIR="$pkgdir" install
make DESTDIR="${pkgdir}" install
sed -e "s|-mwindows||g" -i ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/sdl.pc
}
138 changes: 109 additions & 29 deletions mingw-w64-boost/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=boost
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.57.0
_boostver=${pkgver//./_}
pkgrel=2
pkgrel=3
pkgdesc="Free peer-reviewed portable C++ source libraries (mingw-w64)"
arch=('any')
url="http://www.boost.org/"
Expand All @@ -22,46 +22,126 @@ source=(http://downloads.sourceforge.net/sourceforge/boost/boost_${_boostver}.ta
boost-1.50.0-fix-non-utf8-files.patch
boost-1.50.0-pool.patch
boost-1.54.0-bootstrap.patch
boost-1.57.0-Add-missing-include-to-signals2-trackable.hpp.patch
boost-1.54.0-locale-unused_typedef.patch
boost-1.54.0-pool-max_chunks_shadow.patch
boost-1.54.0-python-unused_typedef.patch
boost-1.55.0-python-test-PyImport_AppendInittab.patch
boost-1.56-mingw-context.patch
boost-1.57.0-build-optflags.patch
boost-1.57.0-move-is_class.patch
boost-1.57.0-mpl-print.patch
boost-1.57.0-pool-test_linking.patch
boost-1.57.0-python-abi_letters.patch
boost-1.57.0-python-libpython_dep.patch
boost-1.57.0-signals2-weak_ptr.patch
boost-1.57.0-spirit-unused_typedef.patch
boost-1.57.0-uuid-comparison.patch
boost-include-intrin-h-on-mingw-w64.patch
using-mingw-w64-python.patch
)
msys2-mingw-folders-bootstrap.patch)
md5sums=('1be49befbdd9a5ce9def2983ba3e7b76'
'dff8166486150121bf89d7050c7e5c49'
'ef427ef3a47f8fdeeb6b4ae3246aa84f'
'a69f826fd911dcf34189aaaacf16853f'
'957b9ec07e4197b87a0f1073e565d955'
'45dbfa0c971c8625c5cb985e6ed71b5d'
'26a97a0abc51efb7e87853d4d1030d48'
'18963bb39f778b0f0ed7894a5b48845d'
'aac88d8444c25db38e6fc9f6e549ea4b'
'4e652869f58b4ce601715b9fb2c2b9ee'
'a08837900284c677cf1cff21636ecbe7'
'2c65a8915b70b9de25ac37a73a74d84d'
'c2aac61b370b321552b5240b9ee7248e')
'2f7eaf049a7ab916008806beaf3eea0b'
'65a7e8edffbed332162253d31301fa29'
'e6631765436f87e90c16778a25d2129c'
'c28bcd8eeafd494021ebcd80456a687a'
'a128f4a4e371bdde469f055c7a045db7'
'ff8ee6c27cc2f4d912f1c028d4f2d91d'
'254c27857ee0574da377aa5ac107101c'
'd8fb4b4bb69e225ff076513dfd756db9'
'92f66bba767a61bb553a13a794270f28'
'1f0904cea88ca36e6b927432c85676a3'
'c2aac61b370b321552b5240b9ee7248e'
'29ffd4b1636e31678fa8e1afa77305eb')

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


patch -p1 -i ${srcdir}/boost-1.54.0-bootstrap.patch

# https://svn.boost.org/trac/boost/ticket/6150
patch -p1 -i ${srcdir}/boost-1.50.0-fix-non-utf8-files.patch

# Add a manual page for bjam, based on the on-line documentation:
# http://www.boost.org/boost-build2/doc/html/bbv2/overview.html
patch -p1 -i ${srcdir}/boost-1.48.0-add-bjam-man-page.patch

# https://bugzilla.redhat.com/show_bug.cgi?id=828856
# https://bugzilla.redhat.com/show_bug.cgi?id=828857
# https://svn.boost.org/trac/boost/ticket/6701
patch -p1 -i ${srcdir}/boost-1.50.0-pool.patch

# https://svn.boost.org/trac/boost/ticket/5637
patch -p1 -i ${srcdir}/boost-1.57.0-mpl-print.patch

# https://svn.boost.org/trac/boost/ticket/8870
patch -p1 -i ${srcdir}/boost-1.57.0-spirit-unused_typedef.patch

# https://svn.boost.org/trac/boost/ticket/8878
patch -p1 -i ${srcdir}/boost-1.54.0-locale-unused_typedef.patch

# https://svn.boost.org/trac/boost/ticket/8888
patch -p1 -i ${srcdir}/boost-1.54.0-python-unused_typedef.patch

# https://svn.boost.org/trac/boost/ticket/9038
patch -p1 -i ${srcdir}/boost-1.57.0-pool-test_linking.patch

# This was already fixed upstream, so no tracking bug.
patch -p1 -i ${srcdir}/boost-1.54.0-pool-max_chunks_shadow.patch

# https://bugzilla.redhat.com/show_bug.cgi?id=1102667
patch -p1 -i ${srcdir}/boost-1.57.0-python-libpython_dep.patch
patch -p1 -i ${srcdir}/boost-1.57.0-python-abi_letters.patch
patch -p1 -i ${srcdir}/boost-1.55.0-python-test-PyImport_AppendInittab.patch

# https://svn.boost.org/trac/boost/ticket/10100
# https://github.com/boostorg/signals2/pull/8
patch -p1 -i ${srcdir}/boost-1.57.0-signals2-weak_ptr.patch

# https://bugzilla.redhat.com/show_bug.cgi?id=1190039
patch -p1 -i ${srcdir}/boost-1.57.0-build-optflags.patch

# https://svn.boost.org/trac/boost/ticket/10510
patch -p1 -i ${srcdir}/boost-1.57.0-uuid-comparison.patch

# https://bugzilla.redhat.com/show_bug.cgi?id=1192002
# https://svn.boost.org/trac/boost/ticket/11044
patch -p1 -i ${srcdir}/boost-1.57.0-move-is_class.patch

# https://svn.boost.org/trac/boost/ticket/7262
patch -p1 -i ${srcdir}/boost-1.56-mingw-context.patch
patch -p1 -i ${srcdir}/boost-1.54.0-bootstrap.patch
patch -p1 -i ${srcdir}/boost-1.57.0-Add-missing-include-to-signals2-trackable.hpp.patch

# Fix FTBFS on recent mingw-w64 and also use intrinsics based
# versions of the Interlocked symbols which are better optimized
patch -p1 -i ${srcdir}/boost-include-intrin-h-on-mingw-w64.patch

# Use out own build Python
patch -p1 -i ${srcdir}/using-mingw-w64-python.patch

patch -p1 -i ${srcdir}/msys2-mingw-folders-bootstrap.patch
}

pushd ${MINGW_PREFIX} > /dev/null
export PREFIX_DEPS=`pwd -W`
popd > /dev/null
build() {
local PREFIX_DEPS=$(cygpath -am ${MINGW_PREFIX})

mkdir -p "${srcdir}/build-${MINGW_CHOST}"
lndir "${srcdir}/boost_${_boostver}" "${srcdir}/build-${MINGW_CHOST}"

cd "${srcdir}/build-${MINGW_CHOST}"

echo "using python : 2.7 : ${PREFIX_DEPS}/bin/python2.exe : ${PREFIX_DEPS}/include/python2.7 ;" >> ./tools/build/src/user-config.jam
echo "using python : 3.4 : ${PREFIX_DEPS}/bin/python3.exe : ${PREFIX_DEPS}/include/python3.4m : ${PREFIX_DEPS}/lib/python3.4/config-3.4m ;" >> ./tools/build/src/user-config.jam
#echo "using gcc : : ${PREFIX_DEPS}/bin/g++.exe : <rc>${PREFIX_DEPS}/bin/windres.exe ;" >> ./tools/build/src/user-config.jam

mkdir -p "${srcdir}/boost-${MINGW_CHOST}"
lndir "${srcdir}/boost_${_boostver}" "${srcdir}/boost-${MINGW_CHOST}"
}

build() {
cd "${srcdir}/boost-${MINGW_CHOST}"
./bootstrap.sh --with-icu=${MINGW_PREFIX} --with-python=${MINGW_PREFIX}
./bootstrap.sh --with-icu=${MINGW_PREFIX} --with-python=${MINGW_PREFIX} --with-toolset=gcc

case ${CARCH} in
i686)
Expand All @@ -80,13 +160,17 @@ build() {

./b2 \
toolset=gcc \
variant=$variant \
threading=multi \
threadapi=win32 \
link=shared,static \
address-model=${_model} \
pch=off \
runtime-link=shared \
threading=multi \
threadapi=win32 \
variant=${variant} \
--debug-configuration \
--prefix=${pkgdir}${MINGW_PREFIX} \
--layout=tagged \
--without-mpi \
-sHAVE_ICU=1 \
-sICU_PATH=${MINGW_PREFIX} \
-sICU_LINK="-L${MINGW_PREFIX}/lib -licuuc -licuin -licudt" \
Expand All @@ -100,15 +184,11 @@ build() {
-sZLIB_BINARY=z \
-sZLIB_INCLUDE=${MINGW_PREFIX}/include \
-sZLIB_LIBPATH=${MINGW_PREFIX}/zlib \
pch=off \
-d2 \
address-model=${_model} \
--layout=tagged \
--without-mpi
-d2
}

package() {
cd "${srcdir}/boost-${MINGW_CHOST}"
cd "${srcdir}/build-${MINGW_CHOST}"
case ${CARCH} in
i686)
local _model=32
Expand All @@ -126,7 +206,7 @@ package() {

./b2 \
toolset=gcc \
variant=$variant \
variant=${variant} \
threading=multi \
threadapi=win32 \
link=shared,static \
Expand Down
4 changes: 2 additions & 2 deletions mingw-w64-boost/boost-1.50.0-pool.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Index: boost/pool/pool.hpp
Index: a/boost/pool/pool.hpp
===================================================================
--- a/boost/pool/pool.hpp (revision 78317)
+++ b/boost/pool/pool.hpp (revision 78326)
Expand Down Expand Up @@ -88,7 +88,7 @@ Index: boost/pool/pool.hpp
+ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));

// insert it into the list,
Index: libs/pool/test/test_bug_6701.cpp
Index: a/libs/pool/test/test_bug_6701.cpp
===================================================================
--- a/libs/pool/test/test_bug_6701.cpp (revision 78326)
+++ b/libs/pool/test/test_bug_6701.cpp (revision 78326)
Expand Down
11 changes: 11 additions & 0 deletions mingw-w64-boost/boost-1.54.0-locale-unused_typedef.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff -urp boost_1_54_0-orig/boost/locale/boundary/segment.hpp boost_1_54_0/boost/locale/boundary/segment.hpp
--- boost_1_54_0-orig/boost/locale/boundary/segment.hpp 2013-07-23 00:47:27.020787174 +0200
+++ boost_1_54_0/boost/locale/boundary/segment.hpp 2013-07-23 00:50:40.382959016 +0200
@@ -27,7 +27,6 @@ namespace boundary {
int compare_text(LeftIterator l_begin,LeftIterator l_end,RightIterator r_begin,RightIterator r_end)
{
typedef LeftIterator left_iterator;
- typedef RightIterator right_iterator;
typedef typename std::iterator_traits<left_iterator>::value_type char_type;
typedef std::char_traits<char_type> traits;
while(l_begin!=l_end && r_begin!=r_end) {
14 changes: 14 additions & 0 deletions mingw-w64-boost/boost-1.54.0-pool-max_chunks_shadow.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff -up ./boost/pool/pool.hpp~ ./boost/pool/pool.hpp
--- ./boost/pool/pool.hpp~ 2013-08-21 17:49:56.023296922 +0200
+++ ./boost/pool/pool.hpp 2013-08-22 11:38:01.133912638 +0200
@@ -361,9 +361,7 @@ class pool: protected simple_segregated_
{ //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool.
size_type partition_size = alloc_size();
size_type POD_size = math::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
- size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
-
- return max_chunks;
+ return (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
}

static void * & nextof(void * const ptr)
15 changes: 15 additions & 0 deletions mingw-w64-boost/boost-1.54.0-python-unused_typedef.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff -up boost_1_53_0/boost/python/to_python_value.hpp\~ boost_1_53_0/boost/python/to_python_value.hpp
--- boost_1_53_0/boost/python/to_python_value.hpp~ 2007-12-16 11:12:07.000000000 +0100
+++ boost_1_53_0/boost/python/to_python_value.hpp 2013-07-23 16:19:02.518904596 +0200
@@ -147,8 +147,8 @@ namespace detail
template <class T>
inline PyObject* registry_to_python_value<T>::operator()(argument_type x) const
{
- typedef converter::registered<argument_type> r;
# if BOOST_WORKAROUND(__GNUC__, < 3)
+ typedef converter::registered<argument_type> r;
// suppresses an ICE, somehow
(void)r::converters;
# endif

Diff finished. Tue Jul 23 16:19:05 2013
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
diff -up boost_1_55_0/libs/python/test/exec.cpp\~ boost_1_55_0/libs/python/test/exec.cpp
--- boost_1_55_0/libs/python/test/exec.cpp~ 2010-07-05 00:38:38.000000000 +0200
+++ boost_1_55_0/libs/python/test/exec.cpp 2015-01-09 21:31:12.903218280 +0100
@@ -56,6 +56,20 @@ void eval_test()
BOOST_TEST(value == "ABCDEFG");
}

+struct PyCtx
+{
+ PyCtx() {
+ Py_Initialize();
+ }
+
+ ~PyCtx() {
+ // N.B. certain problems may arise when Py_Finalize is called when
+ // using Boost.Python. However in this test suite it all seems to
+ // work fine.
+ Py_Finalize();
+ }
+};
+
void exec_test()
{
// Register the module with the interpreter
@@ -68,6 +82,8 @@ void exec_test()
) == -1)
throw std::runtime_error("Failed to add embedded_hello to the interpreter's "
"builtin modules");
+
+ PyCtx ctx;
// Retrieve the main module
python::object main = python::import("__main__");

@@ -148,41 +164,43 @@ void check_pyerr(bool pyerr_expected=fal
}
}

+template <class Cb>
+bool
+run_and_handle_exception(Cb cb, bool pyerr_expected = false)
+{
+ PyCtx ctx;
+ if (python::handle_exception(cb)) {
+ check_pyerr(pyerr_expected);
+ return true;
+ } else {
+ return false;
+ }
+}
+
int main(int argc, char **argv)
{
BOOST_TEST(argc == 2 || argc == 3);
std::string script = argv[1];
- // Initialize the interpreter
- Py_Initialize();

- if (python::handle_exception(eval_test)) {
- check_pyerr();
- }
- else if(python::handle_exception(exec_test)) {
- check_pyerr();
- }
- else if (python::handle_exception(boost::bind(exec_file_test, script))) {
+ // N.B. exec_test mustn't be called through run_and_handle_exception
+ // as it needs to handles the python context by itself.
+ if (run_and_handle_exception(eval_test)
+ || python::handle_exception(exec_test))
check_pyerr();
- }
-
- if (python::handle_exception(exec_test_error))
- {
- check_pyerr(/*pyerr_expected*/ true);
- }
else
- {
+ run_and_handle_exception(boost::bind(exec_file_test, script));
+
+ if (!run_and_handle_exception(exec_test_error, true))
BOOST_ERROR("Python exception expected, but not seen.");
- }

if (argc > 2) {
+ PyCtx ctx;
// The main purpose is to test compilation. Since this test generates
// a file and I (rwgk) am uncertain about the side-effects, run it only
// if explicitly requested.
exercise_embedding_html();
}

- // Boost.Python doesn't support Py_Finalize yet.
- // Py_Finalize();
return boost::report_errors();
}


Diff finished. Fri Jan 9 21:31:13 2015
Loading

0 comments on commit f4911b6

Please sign in to comment.