Skip to content

Commit

Permalink
Merge pull request bitcoin#22 from p2k/master
Browse files Browse the repository at this point in the history
Some improvements for Mac OS X
  • Loading branch information
laanwj committed Sep 11, 2011
2 parents d33cc2b + 2c1fd3c commit 1837644
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ Makefile
bitcoin-qt
#resources cpp
qrc_*.cpp
#qt creator
*.pro.user
#mac specific
.DS_Store
33 changes: 31 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,27 @@ Windows build instructions:
.. [#] PGP signature: https://download.visucore.com/bitcoin/qtgui_deps_1.zip.sig (signed with RSA key ID `610945D0`_)
.. _`610945D0`: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x610945D0


Mac OS X
--------

- Download and install the `Qt Mac OS X SDK`_. It is recommended to also install Apple's Xcode with UNIX tools.

- Download and install `MacPorts`_.

- Execute the following commands in a terminal to get the dependencies:

::

sudo port selfupdate
sudo port install boost db48

- Open the .pro file in Qt Creator and build as normal (cmd-B)

.. _`Qt Mac OS X SDK`: http://qt.nokia.com/downloads/sdk-mac-os-cpp
.. _`MacPorts`: http://www.macports.org/install.php


Build configuration options
============================

Expand All @@ -94,18 +115,26 @@ To use UPnP for port forwarding behind a NAT router (recommended, as more connec
(in **Qt Creator**, you can find the setting for additional qmake arguments under "Projects" -> "Build Settings" -> "Build Steps", then click "Details" next to **qmake**)

This requires miniupnpc for UPnP port mapping. It can be downloaded from
http://miniupnp.tuxfamily.org/files/. UPnP support is not compiled in by default.
http://miniupnp.tuxfamily.org/files/. UPnP support is not compiled in by default.

Set USE_UPNP to a different value to control this:

+------------+--------------------------------------------------------------+
| USE_UPNP= | (the default) no UPnP support, miniupnp not required; |
| USE_UPNP= | (the default) no UPnP support, miniupnpc not required; |
+------------+--------------------------------------------------------------+
| USE_UPNP=0 | UPnP support turned off by default at runtime; |
+------------+--------------------------------------------------------------+
| USE_UPNP=1 | UPnP support turned on by default at runtime. |
+------------+--------------------------------------------------------------+

Mac OS X users: miniupnpc is currently outdated on MacPorts. An updated Portfile is provided in contrib/miniupnpc within this project.
You can execute the following commands in a terminal to install it:

::

cd <location of bitcoin-qt>/contrib/miniupnpc
sudo port install

Notification support for recent (k)ubuntu versions
---------------------------------------------------

Expand Down
11 changes: 11 additions & 0 deletions bitcoin-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,14 @@ CODECFORTR = UTF-8
# for lrelease/lupdate
TRANSLATIONS = src/qt/locale/bitcoin_nl.ts src/qt/locale/bitcoin_de.ts \
src/qt/locale/bitcoin_ru.ts

OTHER_FILES += \
README.rst

# For use with MacPorts
macx:INCLUDEPATH += /opt/local/include /opt/local/include/db48
macx:LIBS += -L/opt/local/lib -L/opt/local/lib/db48

# Additional Mac options
macx:ICON = src/qt/res/icons/bitcoin.icns
macx:TARGET = "Bitcoin Qt"
43 changes: 43 additions & 0 deletions contrib/miniupnpc/Portfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem 1.0

name miniupnpc
epoch 2
version 1.6
revision 2
categories net
platforms darwin
license BSD
maintainers singingwolfboy openmaintainer
description Lightweight client for UPnP protocol
long_description \
${description}

homepage http://miniupnp.free.fr/
master_sites http://miniupnp.free.fr/files/download.php?file=${distname}${extract.suffix}&dummy=
checksums md5 88055f2d4a061cfd4cfe25a9eae22f67 \
sha1 ef8f2edb17f2e7c5b8dc67ee80a65c199d823e0a \
rmd160 d86b75b331a3fb5525c71708548f311977c0598f

use_configure no

variant universal {}
if {[variant_isset universal]} {
set archflags ${configure.universal_cflags}
} else {
set archflags ${configure.cc_archflags}
}

build.args-append CC="${configure.cc} ${archflags}"

post-patch {
reinplace "s|-Wl,-install_name,|-Wl,-install_name,${prefix}/lib/|" ${worksrcpath}/Makefile
}

destroot.destdir PREFIX=${prefix} INSTALLPREFIX=${destroot}${prefix}

livecheck.type regex
livecheck.url http://miniupnp.free.fr/files/
livecheck.regex ${name}-(\\d+(\\.\\d{1,4})+)${extract.suffix}
Binary file added src/qt/res/icons/bitcoin.icns
Binary file not shown.

0 comments on commit 1837644

Please sign in to comment.