From b4ada906c03111404c29b115ab37afbad92f4cf1 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 12 Aug 2011 00:20:07 +0200 Subject: Upgrade dependancies and tweak build process. * Upgrade to use miniupnpc 1.6 * Upgrade to wxWidgets 2.9.2 * Upgrade to Bost 1.47 for Win32 Builds --- contrib/gitian-win32.yml | 42 ++++++++---------- contrib/gitian.yml | 23 ++++------ contrib/wx-patches/README | 4 -- contrib/wx-patches/toplevel.cpp.diff | 86 ------------------------------------ contrib/wx-patches/toplevel.h.diff | 9 ---- 5 files changed, 26 insertions(+), 138 deletions(-) delete mode 100644 contrib/wx-patches/README delete mode 100644 contrib/wx-patches/toplevel.cpp.diff delete mode 100644 contrib/wx-patches/toplevel.h.diff (limited to 'contrib') diff --git a/contrib/gitian-win32.yml b/contrib/gitian-win32.yml index 07d31c717e..d4b0843e74 100644 --- a/contrib/gitian-win32.yml +++ b/contrib/gitian-win32.yml @@ -14,17 +14,15 @@ remotes: - "url": "https://github.com/bitcoin/bitcoin.git" "dir": "bitcoin" files: -- "wxWidgets-2.9.1.tar.bz2" -- "boost_1_43_0.tar.bz2" +- "wxWidgets-2.9.2.tar.bz2" +- "boost_1_47_0.tar.bz2" - "openssl-1.0.0d.tar.gz" -- "db-4.7.25.NC.tar.gz" -- "upnpc-exe-win32-20110215.zip" -- "miniupnpc-1.5.20110215.tar.gz" -- "WSPiApi.h" +- "db-4.8.30.NC.tar.gz" +- "miniupnpc-1.6.tar.gz" script: | # - tar xjf wxWidgets-2.9.1.tar.bz2 - cd wxWidgets-2.9.1 + tar xjf wxWidgets-2.9.2.tar.bz2 + cd wxWidgets-2.9.2 ./configure --host=i586-mingw32msvc --build=i686-linux --disable-shared --enable-monolithic --without-libpng --disable-svg perl -i -p -e "s/__TIME__/\"$REFERENCE_TIME\"/;s/__DATE__/\"$REFERENCE_DATE\"/" include/wx/chartype.h make $MAKEOPTS @@ -36,14 +34,14 @@ script: | make cd .. # - tar xzf db-4.7.25.NC.tar.gz - cd db-4.7.25.NC/build_unix + tar xzf db-4.8.30.NC.tar.gz + cd db-4.8.30.NC/build_unix ../dist/configure --enable-mingw --enable-cxx --host=i586-mingw32msvc CFLAGS="-I/usr/i586-mingw32msvc/include" make $MAKEOPTS cd ../.. # - tar xjf boost_1_43_0.tar.bz2 - cd boost_1_43_0 + tar xjf boost_1_47_0.tar.bz2 + cd boost_1_47_0 echo "using gcc : 4.4 : i586-mingw32msvc-g++ : i586-mingw32msvc-windres @@ -53,16 +51,13 @@ script: | ./bjam toolset=gcc target-os=windows threadapi=win32 threading=multi --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete $MAKEOPTS stage cd .. # - mkdir upnpc-exe-win32-20110215 - cd upnpc-exe-win32-20110215 - unzip ../upnpc-exe-win32-20110215.zip - mkdir miniupnpc - cd miniupnpc - tar xzf ../../miniupnpc-1.5.20110215.tar.gz - mv ./miniupnpc-1.5.20110215/* ./ - cd ../.. - # - cp WSPiApi.h $HOME/build + tar xzf miniupnpc-1.6.tar.gz + cd miniupnpc-1.6 + sed 's/dllwrap -k --driver-name gcc/$(DLLWRAP) -k --driver-name $(CC)/' -i Makefile.mingw + sed 's|wingenminiupnpcstrings $< $@|./wingenminiupnpcstrings $< $@|' -i Makefile.mingw + make -f Makefile.mingw DLLWRAP=i586-mingw32msvc-dllwrap CC=i586-mingw32msvc-gcc AR=i586-mingw32msvc-ar + cd .. + mv miniupnpc-1.6 miniupnpc # cd bitcoin mkdir -p $OUTDIR/src @@ -72,8 +67,7 @@ script: | cp $OUTDIR/src/doc/README_windows.txt $OUTDIR/readme.txt cp $OUTDIR/src/COPYING $OUTDIR/license.txt cd src - sed 's/$(DEBUGFLAGS)//' < makefile.linux-mingw > makefile.linux-mingw.2 && mv makefile.linux-mingw.2 makefile.linux-mingw - sed 's|//#include |#include |' < net.cpp > net.cpp.2 && mv net.cpp.2 net.cpp + sed 's/$(DEBUGFLAGS)//' -i makefile.linux-mingw make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoin.exe USE_UPNP=1 make -f makefile.linux-mingw $MAKEOPTS DEPSDIR=$HOME/build bitcoind.exe USE_UPNP=0 i586-mingw32msvc-strip bitcoin.exe diff --git a/contrib/gitian.yml b/contrib/gitian.yml index 90be8934fa..c4cdc89911 100644 --- a/contrib/gitian.yml +++ b/contrib/gitian.yml @@ -6,7 +6,7 @@ architectures: - "i386" - "amd64" packages: -- "libdb4.7++-dev" +- "libdb4.8++-dev" - "libxxf86vm-dev" - "libgtk2.0-dev" - "libboost-all-dev" @@ -17,26 +17,19 @@ remotes: - "url": "https://github.com/bitcoin/bitcoin.git" "dir": "bitcoin" files: -- "wxWidgets-2.9.1.tar.bz2" -- "miniupnpc-1.5.tar.gz" -- "toplevel.h.diff" -- "toplevel.cpp.diff" +- "wxWidgets-2.9.2.tar.bz2" +- "miniupnpc-1.6.tar.gz" script: | INSTDIR="$HOME/install" export LIBRARY_PATH="$INSTDIR/lib" # - tar xzf miniupnpc-1.5.tar.gz - cd miniupnpc-1.5 + tar xzf miniupnpc-1.6.tar.gz + cd miniupnpc-1.6 INSTALLPREFIX=$INSTDIR make $MAKEOPTS install cd .. # - tar xjf wxWidgets-2.9.1.tar.bz2 - cd wxWidgets-2.9.1 - cd include/wx/gtk - patch < ../../../../toplevel.h.diff - cd ../../../src/gtk - patch < ../../../toplevel.cpp.diff - cd ../.. + tar xjf wxWidgets-2.9.2.tar.bz2 + cd wxWidgets-2.9.2 ./configure --prefix=$INSTDIR --enable-monolithic --disable-shared perl -i -p -e "s/__TIME__/\"$REFERENCE_TIME\"/;s/__DATE__/\"$REFERENCE_DATE\"/" include/wx/chartype.h make $MAKEOPTS install @@ -50,7 +43,7 @@ script: | cp $OUTDIR/src/doc/README $OUTDIR cp $OUTDIR/src/COPYING $OUTDIR cd src - sed 's/$(DEBUGFLAGS)//' < makefile.unix > makefile.unix.2 && mv makefile.unix.2 makefile.unix + sed 's/$(DEBUGFLAGS)//' -i makefile.unix PATH=$INSTDIR/bin:$PATH make -f makefile.unix CXX="g++ -I$INSTDIR/include -L$INSTDIR/lib" $MAKEOPTS bitcoin USE_UPNP=1 PATH=$INSTDIR/bin:$PATH make -f makefile.unix CXX="g++ -I$INSTDIR/include -L$INSTDIR/lib" $MAKEOPTS bitcoind USE_UPNP=0 mkdir -p $OUTDIR/bin/$GBUILD_BITS diff --git a/contrib/wx-patches/README b/contrib/wx-patches/README deleted file mode 100644 index 2afb4a9e91..0000000000 --- a/contrib/wx-patches/README +++ /dev/null @@ -1,4 +0,0 @@ -This folder contains two patches which are applied to wxWidgets -2.9.1 before building the wxWidgets which is used for release -versions of bitcoin. They make the GUI show up on newer OSs -with new libgtks, such as Ubuntu 11.04. diff --git a/contrib/wx-patches/toplevel.cpp.diff b/contrib/wx-patches/toplevel.cpp.diff deleted file mode 100644 index 359abf28d4..0000000000 --- a/contrib/wx-patches/toplevel.cpp.diff +++ /dev/null @@ -1,86 +0,0 @@ ---- /wxWidgets/trunk/src/gtk/toplevel.cpp (revision 67326) -+++ /wxWidgets/trunk/src/gtk/toplevel.cpp (revision 67496) -@@ -72,4 +72,8 @@ - // send any activate events at all - static int g_sendActivateEvent = -1; -+ -+// Whether _NET_REQUEST_FRAME_EXTENTS support is working -+// 0 == not tested yet, 1 == working, 2 == broken -+static int gs_requestFrameExtentsStatus; - - //----------------------------------------------------------------------------- -@@ -432,4 +436,12 @@ - if (event->state == GDK_PROPERTY_NEW_VALUE && event->atom == property) - { -+ if (win->m_netFrameExtentsTimerId) -+ { -+ // WM support for _NET_REQUEST_FRAME_EXTENTS is working -+ gs_requestFrameExtentsStatus = 1; -+ g_source_remove(win->m_netFrameExtentsTimerId); -+ win->m_netFrameExtentsTimerId = 0; -+ } -+ - wxSize decorSize = win->m_decorSize; - int left, right, top, bottom; -@@ -439,4 +451,22 @@ - win->GTKUpdateDecorSize(decorSize); - } -+ return false; -+} -+} -+ -+extern "C" { -+static gboolean request_frame_extents_timeout(void* data) -+{ -+ // WM support for _NET_REQUEST_FRAME_EXTENTS is broken -+ gs_requestFrameExtentsStatus = 2; -+ gdk_threads_enter(); -+ wxTopLevelWindowGTK* win = static_cast(data); -+ win->m_netFrameExtentsTimerId = 0; -+ wxSize decorSize = win->m_decorSize; -+ int left, right, top, bottom; -+ if (wxGetFrameExtents(gtk_widget_get_window(win->m_widget), &left, &right, &top, &bottom)) -+ decorSize.Set(left + right, top + bottom); -+ win->GTKUpdateDecorSize(decorSize); -+ gdk_threads_leave(); - return false; - } -@@ -459,4 +489,5 @@ - m_deferShowAllowed = true; - m_updateDecorSize = true; -+ m_netFrameExtentsTimerId = 0; - - m_urgency_hint = -2; -@@ -811,5 +842,6 @@ - if (deferShow) - { -- deferShow = m_deferShowAllowed && !GTK_WIDGET_REALIZED(m_widget); -+ deferShow = gs_requestFrameExtentsStatus != 2 && -+ m_deferShowAllowed && !gtk_widget_get_realized(m_widget); - if (deferShow) - { -@@ -829,11 +861,4 @@ - // GetSize()/SetSize() because it makes window bigger between each - // restore and save. -- m_updateDecorSize = deferShow; -- } -- if (deferShow) -- { -- // Fluxbox support for _NET_REQUEST_FRAME_EXTENTS is broken -- const char* name = gdk_x11_screen_get_window_manager_name(screen); -- deferShow = strcmp(name, "Fluxbox") != 0; - m_updateDecorSize = deferShow; - } -@@ -875,4 +900,12 @@ - (XEvent*)&xevent); - -+ if (gs_requestFrameExtentsStatus == 0) -+ { -+ // if WM does not respond to request within 1 second, -+ // we assume support for _NET_REQUEST_FRAME_EXTENTS is not working -+ m_netFrameExtentsTimerId = -+ g_timeout_add(1000, request_frame_extents_timeout, this); -+ } -+ - // defer calling gtk_widget_show() - m_isShown = true; diff --git a/contrib/wx-patches/toplevel.h.diff b/contrib/wx-patches/toplevel.h.diff deleted file mode 100644 index c2718d4637..0000000000 --- a/contrib/wx-patches/toplevel.h.diff +++ /dev/null @@ -1,9 +0,0 @@ ---- /wxWidgets/trunk/include/wx/gtk/toplevel.h (revision 65373) -+++ /wxWidgets/trunk/include/wx/gtk/toplevel.h (revision 67496) -@@ -114,4 +114,6 @@ - // wxUSER_ATTENTION_ERROR difference, -2 for no hint, -1 for ERROR hint, rest for GtkTimeout handle. - int m_urgency_hint; -+ // timer for detecting WM with broken _NET_REQUEST_FRAME_EXTENTS handling -+ unsigned m_netFrameExtentsTimerId; - - // return the size of the window without WM decorations -- cgit v1.2.3