diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/boost-win32.yml | 38 | ||||
-rw-r--r-- | contrib/gitian-win32.yml | 77 | ||||
-rw-r--r-- | contrib/gitian.yml | 36 | ||||
-rw-r--r-- | contrib/pyminer/README | 6 | ||||
-rw-r--r-- | contrib/pyminer/example-config.cfg | 32 | ||||
-rwxr-xr-x | contrib/pyminer/pyminer.py | 252 | ||||
-rw-r--r-- | contrib/wx-patches/README | 4 | ||||
-rw-r--r-- | contrib/wx-patches/toplevel.cpp.diff | 86 | ||||
-rw-r--r-- | contrib/wx-patches/toplevel.h.diff | 9 | ||||
-rw-r--r-- | contrib/wxwidgets-win32.yml | 40 | ||||
-rw-r--r-- | contrib/wxwidgets.yml | 42 |
11 files changed, 470 insertions, 152 deletions
diff --git a/contrib/boost-win32.yml b/contrib/boost-win32.yml new file mode 100644 index 0000000000..61ea50e4fe --- /dev/null +++ b/contrib/boost-win32.yml @@ -0,0 +1,38 @@ +--- +name: "boost" +suites: +- "lucid" +architectures: +- "i386" +packages: +- "mingw32" +- "faketime" +- "zip" +reference_datetime: "2011-01-30 00:00:00" +remotes: [] +files: +- "boost_1_47_0.tar.bz2" +script: | + TMPDIR="$HOME/tmpdir" + mkdir -p $TMPDIR/bin/$GBUILD_BITS $TMPDIR/include + tar xjf boost_1_47_0.tar.bz2 + cd boost_1_47_0 + echo "using gcc : 4.4 : i586-mingw32msvc-g++ + : + <rc>i586-mingw32msvc-windres + <archiver>i586-mingw32msvc-ar + <cxxflags>-frandom-seed=boost1 + ;" > user-config.jam + ./bootstrap.sh --without-icu + ./bjam toolset=gcc target-os=windows threadapi=win32 threading=multi variant=release link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete $MAKEOPTS stage + for lib in chrono date_time exception filesystem graph iostreams math_c99f math_c99l math_c99 math_tr1f math_tr1l math_tr1 prg_exec_monitor program_options random regex serialization signals system test_exec_monitor thread_win32 unit_test_framework wave wserialization; do + mkdir $lib + (cd $lib ; ar xf ../stage/lib/libboost_${lib}-mt-s.a) + mv $lib $TMPDIR/bin/$GBUILD_BITS + done + cp -a boost $TMPDIR/include + cd $TMPDIR + export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 + export FAKETIME=$REFERENCE_DATETIME + zip -r boost-win32-1.47.0-gitian.zip * + cp boost-win32-1.47.0-gitian.zip $OUTDIR diff --git a/contrib/gitian-win32.yml b/contrib/gitian-win32.yml index 07d31c717e..963c381393 100644 --- a/contrib/gitian-win32.yml +++ b/contrib/gitian-win32.yml @@ -9,25 +9,44 @@ packages: - "git-core" - "unzip" - "nsis" +- "faketime" reference_datetime: "2011-01-30 00:00:00" remotes: - "url": "https://github.com/bitcoin/bitcoin.git" "dir": "bitcoin" files: -- "wxWidgets-2.9.1.tar.bz2" -- "boost_1_43_0.tar.bz2" +- "wxwidgets-win32-2.9.2-gitian.zip" +- "boost-win32-1.47.0-gitian.zip" - "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 - ./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 + mkdir wxWidgets-2.9.2 + cd wxWidgets-2.9.2 + mkdir lib + unzip ../wxwidgets-win32-2.9.2-gitian.zip + cd bin/$GBUILD_BITS + for lib in wx_mswu; do + i586-mingw32msvc-ar rc ../../lib/lib${lib}-2.9-i586-mingw32msvc.a $lib/*.o + i586-mingw32msvc-ranlib ../../lib/lib${lib}-2.9-i586-mingw32msvc.a + done + cp -a wx ../../lib + cd ../.. + mv include/wx-2.9/wx include + cd .. + # + mkdir boost_1_47_0 + cd boost_1_47_0 + mkdir -p stage/lib + unzip ../boost-win32-1.47.0-gitian.zip + cd bin/$GBUILD_BITS + for lib in *; do + i586-mingw32msvc-ar rc ../../stage/lib/libboost_${lib}-mt-s.a $lib/*.o + i586-mingw32msvc-ranlib ../../stage/lib/libboost_${lib}-mt-s.a + done + cd ../.. + mv include/boost . cd .. # tar xzf openssl-1.0.0d.tar.gz @@ -36,33 +55,19 @@ 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 - echo "using gcc : 4.4 : i586-mingw32msvc-g++ - : - <rc>i586-mingw32msvc-windres - <archiver>i586-mingw32msvc-ar - ;" > user-config.jam - ./bootstrap.sh --without-icu - ./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 + 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 .. - # - 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 + mv miniupnpc-1.6 miniupnpc # cd bitcoin mkdir -p $OUTDIR/src @@ -72,8 +77,10 @@ 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 <WSPiApi.h>|#include <WSPiApi.h>|' < net.cpp > net.cpp.2 && mv net.cpp.2 net.cpp + sed 's/$(DEBUGFLAGS)/-frandom-seed=bitcoin/' -i makefile.linux-mingw + export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 + export FAKETIME=$REFERENCE_DATETIME + export TZ=UTC 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..9f03ba1bc4 100644 --- a/contrib/gitian.yml +++ b/contrib/gitian.yml @@ -6,40 +6,40 @@ architectures: - "i386" - "amd64" packages: -- "libdb4.7++-dev" +- "libdb4.8++-dev" - "libxxf86vm-dev" - "libgtk2.0-dev" - "libboost-all-dev" - "libssl-dev" - "git-core" +- "unzip" reference_datetime: "2011-01-30 00:00:00" 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-gitian.zip" +- "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 ../.. - ./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 + mkdir -p $INSTDIR/bin $INSTDIR/lib/wx $INSTDIR/include + mkdir wxWidgets-2.9.2 + cd wxWidgets-2.9.2 + unzip ../wxWidgets-2.9.2-gitian.zip + cp -a bin/$GBUILD_BITS/wx/config/gtk2-unicode-static-2.9 $INSTDIR/bin/wx-config + for lib in wx_gtk2u wxregexu wxtiff; do + ar rc $INSTDIR/lib/lib${lib}-2.9.a bin/$GBUILD_BITS/$lib/*.o + ranlib $INSTDIR/lib/lib${lib}-2.9.a + done + cp -a include/wx-2.9/* $INSTDIR/include + cp -a bin/$GBUILD_BITS/wx/include $INSTDIR/lib/wx cd .. # cd bitcoin @@ -50,7 +50,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/pyminer/README b/contrib/pyminer/README new file mode 100644 index 0000000000..d1596575dd --- /dev/null +++ b/contrib/pyminer/README @@ -0,0 +1,6 @@ + +This is a 'getwork' CPU mining client for bitcoin. + +It is pure-python, and therefore very, very slow. The purpose is to +provide a reference implementation of a miner, for study. + diff --git a/contrib/pyminer/example-config.cfg b/contrib/pyminer/example-config.cfg new file mode 100644 index 0000000000..103e7c1372 --- /dev/null +++ b/contrib/pyminer/example-config.cfg @@ -0,0 +1,32 @@ + +# +# RPC login details +# +host=127.0.0.1 +port=8332 + +rpcuser=myusername +rpcpass=mypass + + +# +# mining details +# + +threads=4 + +# periodic rate for requesting new work, if solution not found +scantime=60 + + +# +# misc. +# + +# not really used right now +logdir=/tmp/pyminer + +# set to 1, to enable hashmeter output +hashmeter=0 + + diff --git a/contrib/pyminer/pyminer.py b/contrib/pyminer/pyminer.py new file mode 100755 index 0000000000..2887aba591 --- /dev/null +++ b/contrib/pyminer/pyminer.py @@ -0,0 +1,252 @@ +#!/usr/bin/python +# +# Copyright (c) 2011 The Bitcoin developers +# Distributed under the MIT/X11 software license, see the accompanying +# file license.txt or http://www.opensource.org/licenses/mit-license.php. +# + +import time +import json +import pprint +import hashlib +import struct +import re +import base64 +import httplib +import sys +from multiprocessing import Process + +ERR_SLEEP = 15 +MAX_NONCE = 1000000L + +settings = {} +pp = pprint.PrettyPrinter(indent=4) + +class BitcoinRPC: + OBJID = 1 + + def __init__(self, host, port, username, password): + authpair = "%s:%s" % (username, password) + self.authhdr = "Basic %s" % (base64.b64encode(authpair)) + self.conn = httplib.HTTPConnection(host, port, False, 30) + def rpc(self, method, params=None): + self.OBJID += 1 + obj = { 'version' : '1.1', + 'method' : method, + 'id' : self.OBJID } + if params is None: + obj['params'] = [] + else: + obj['params'] = params + self.conn.request('POST', '/', json.dumps(obj), + { 'Authorization' : self.authhdr, + 'Content-type' : 'application/json' }) + + resp = self.conn.getresponse() + if resp is None: + print "JSON-RPC: no response" + return None + + body = resp.read() + resp_obj = json.loads(body) + if resp_obj is None: + print "JSON-RPC: cannot JSON-decode body" + return None + if 'error' in resp_obj and resp_obj['error'] != None: + return resp_obj['error'] + if 'result' not in resp_obj: + print "JSON-RPC: no result in object" + return None + + return resp_obj['result'] + def getblockcount(self): + return self.rpc('getblockcount') + def getwork(self, data=None): + return self.rpc('getwork', data) + +def uint32(x): + return x & 0xffffffffL + +def bytereverse(x): + return uint32(( ((x) << 24) | (((x) << 8) & 0x00ff0000) | + (((x) >> 8) & 0x0000ff00) | ((x) >> 24) )) + +def bufreverse(in_buf): + out_words = [] + for i in range(0, len(in_buf), 4): + word = struct.unpack('@I', in_buf[i:i+4])[0] + out_words.append(struct.pack('@I', bytereverse(word))) + return ''.join(out_words) + +def wordreverse(in_buf): + out_words = [] + for i in range(0, len(in_buf), 4): + out_words.append(in_buf[i:i+4]) + out_words.reverse() + return ''.join(out_words) + +class Miner: + def __init__(self, id): + self.id = id + self.max_nonce = MAX_NONCE + + def work(self, datastr, targetstr): + # decode work data hex string to binary + static_data = datastr.decode('hex') + static_data = bufreverse(static_data) + + # the first 76b of 80b do not change + blk_hdr = static_data[:76] + + # decode 256-bit target value + targetbin = targetstr.decode('hex') + targetbin = targetbin[::-1] # byte-swap and dword-swap + targetbin_str = targetbin.encode('hex') + target = long(targetbin_str, 16) + + # pre-hash first 76b of block header + static_hash = hashlib.sha256() + static_hash.update(blk_hdr) + + for nonce in xrange(self.max_nonce): + + # encode 32-bit nonce value + nonce_bin = struct.pack("<I", nonce) + + # hash final 4b, the nonce value + hash1_o = static_hash.copy() + hash1_o.update(nonce_bin) + hash1 = hash1_o.digest() + + # sha256 hash of sha256 hash + hash_o = hashlib.sha256() + hash_o.update(hash1) + hash = hash_o.digest() + + # quick test for winning solution: high 32 bits zero? + if hash[-4:] != '\0\0\0\0': + continue + + # convert binary hash to 256-bit Python long + hash = bufreverse(hash) + hash = wordreverse(hash) + + hash_str = hash.encode('hex') + l = long(hash_str, 16) + + # proof-of-work test: hash < target + if l < target: + print time.asctime(), "PROOF-OF-WORK found: %064x" % (l,) + return (nonce + 1, nonce_bin) + else: + print time.asctime(), "PROOF-OF-WORK false positive %064x" % (l,) +# return (nonce + 1, nonce_bin) + + return (nonce + 1, None) + + def submit_work(self, rpc, original_data, nonce_bin): + nonce_bin = bufreverse(nonce_bin) + nonce = nonce_bin.encode('hex') + solution = original_data[:152] + nonce + original_data[160:256] + param_arr = [ solution ] + result = rpc.getwork(param_arr) + print time.asctime(), "--> Upstream RPC result:", result + + def iterate(self, rpc): + work = rpc.getwork() + if work is None: + time.sleep(ERR_SLEEP) + return + if 'data' not in work or 'target' not in work: + time.sleep(ERR_SLEEP) + return + + time_start = time.time() + + (hashes_done, nonce_bin) = self.work(work['data'], + work['target']) + + time_end = time.time() + time_diff = time_end - time_start + + self.max_nonce = long( + (hashes_done * settings['scantime']) / time_diff) + if self.max_nonce > 0xfffffffaL: + self.max_nonce = 0xfffffffaL + + if settings['hashmeter']: + print "HashMeter(%d): %d hashes, %.2f Khash/sec" % ( + self.id, hashes_done, + (hashes_done / 1000.0) / time_diff) + + if nonce_bin is not None: + self.submit_work(rpc, work['data'], nonce_bin) + + def loop(self): + rpc = BitcoinRPC(settings['host'], settings['port'], + settings['rpcuser'], settings['rpcpass']) + if rpc is None: + return + + while True: + self.iterate(rpc) + +def miner_thread(id): + miner = Miner(id) + miner.loop() + +if __name__ == '__main__': + if len(sys.argv) != 2: + print "Usage: pyminer.py CONFIG-FILE" + sys.exit(1) + + f = open(sys.argv[1]) + for line in f: + # skip comment lines + m = re.search('^\s*#', line) + if m: + continue + + # parse key=value lines + m = re.search('^(\w+)\s*=\s*(\S.*)$', line) + if m is None: + continue + settings[m.group(1)] = m.group(2) + f.close() + + if 'host' not in settings: + settings['host'] = '127.0.0.1' + if 'port' not in settings: + settings['port'] = 8332 + if 'threads' not in settings: + settings['threads'] = 1 + if 'hashmeter' not in settings: + settings['hashmeter'] = 0 + if 'scantime' not in settings: + settings['scantime'] = 30L + if 'rpcuser' not in settings or 'rpcpass' not in settings: + print "Missing username and/or password in cfg file" + sys.exit(1) + + settings['port'] = int(settings['port']) + settings['threads'] = int(settings['threads']) + settings['hashmeter'] = int(settings['hashmeter']) + settings['scantime'] = long(settings['scantime']) + + thr_list = [] + for thr_id in range(settings['threads']): + p = Process(target=miner_thread, args=(thr_id,)) + p.start() + thr_list.append(p) + time.sleep(1) # stagger threads + + print settings['threads'], "mining threads started" + + print time.asctime(), "Miner Starts - %s:%s" % (settings['host'], settings['port']) + try: + for thr_proc in thr_list: + thr_proc.join() + except KeyboardInterrupt: + pass + print time.asctime(), "Miner Stops - %s:%s" % (settings['host'], settings['port']) + 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<wxTopLevelWindowGTK*>(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
diff --git a/contrib/wxwidgets-win32.yml b/contrib/wxwidgets-win32.yml new file mode 100644 index 0000000000..3d49d7b35e --- /dev/null +++ b/contrib/wxwidgets-win32.yml @@ -0,0 +1,40 @@ +--- +name: "wxwidgets" +suites: +- "lucid" +architectures: +- "i386" +packages: +- "mingw32" +- "faketime" +- "zip" +reference_datetime: "2011-01-30 00:00:00" +remotes: [] +files: +- "wxWidgets-2.9.2.tar.bz2" +script: | + INSTDIR="$HOME/install" + TMPDIR="$HOME/tmpdir" + export LIBRARY_PATH="$INSTDIR/lib" + # + tar xjf wxWidgets-2.9.2.tar.bz2 + cd wxWidgets-2.9.2 + CXXFLAGS=-frandom-seed=wx1 ./configure --host=i586-mingw32msvc --build=i686-linux --prefix=$INSTDIR --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 install + mkdir $TMPDIR + cd $TMPDIR + cp -af $INSTDIR/include . + mkdir -p $TMPDIR/bin/$GBUILD_BITS + cd $TMPDIR/bin/$GBUILD_BITS + cp -af $INSTDIR/lib/wx . + for lib in wx_mswu; do + mkdir $lib + (cd $lib ; ar xf $INSTDIR/lib/lib${lib}-2.9-i586-mingw32msvc.a) + done + chmod -R +w $TMPDIR + cd $TMPDIR + export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 + export FAKETIME=$REFERENCE_DATETIME + zip -r wxwidgets-win32-2.9.2-gitian.zip * + cp wxwidgets-win32-2.9.2-gitian.zip $OUTDIR diff --git a/contrib/wxwidgets.yml b/contrib/wxwidgets.yml new file mode 100644 index 0000000000..a2406936d3 --- /dev/null +++ b/contrib/wxwidgets.yml @@ -0,0 +1,42 @@ +--- +name: "wxwidgets" +suites: +- "lucid" +architectures: +- "i386" +- "amd64" +packages: +- "libxxf86vm-dev" +- "libgtk2.0-dev" +- "faketime" +- "zip" +reference_datetime: "2011-01-30 00:00:00" +remotes: [] +files: +- "wxWidgets-2.9.2.tar.bz2" +script: | + INSTDIR="$HOME/install" + TMPDIR="$HOME/tmpdir" + export LIBRARY_PATH="$INSTDIR/lib" + # + 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 + mkdir $TMPDIR + cd $TMPDIR + cp -af $INSTDIR/include . + mkdir -p $TMPDIR/bin/$GBUILD_BITS + cd $TMPDIR/bin/$GBUILD_BITS + cp -af $INSTDIR/lib/wx . + for lib in wxtiff wxregexu wx_gtk2u; do + mkdir $lib + (cd $lib ; ar xf $INSTDIR/lib/lib${lib}-2.9.a) + done + chmod -R +w $TMPDIR + cd $TMPDIR + export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1 + export FAKETIME=$REFERENCE_DATETIME + zip -r wxWidgets-2.9.2-gitian.zip * + cp wxWidgets-2.9.2-gitian.zip $OUTDIR |