Update osx build and packaging scripts

This commit is contained in:
Calum Lind 2013-03-17 18:10:51 +00:00
parent 2a3eb7b70c
commit 31ec8830f4
5 changed files with 70 additions and 95 deletions

View File

@ -180,8 +180,8 @@ class GtkUI(object):
SetConsoleCtrlHandler(win_handler) SetConsoleCtrlHandler(win_handler)
if deluge.common.osx_check() and gtk.gdk.WINDOWING == "quartz": if deluge.common.osx_check() and gtk.gdk.WINDOWING == "quartz":
import gtk_osxapplication import gtkosx_application
self.osxapp = gtk_osxapplication.OSXApplication() self.osxapp = gtkosx_application.gtkosx_application_get()
def on_die(*args): def on_die(*args):
reactor.stop() reactor.stop()
self.osxapp.connect("NSApplicationWillTerminate", on_die) self.osxapp.connect("NSApplicationWillTerminate", on_die)

View File

@ -8,29 +8,23 @@
</meta> </meta>
<plist>${project}/Info.plist</plist> <plist>${project}/Info.plist</plist>
<main-binary>${prefix}/bin/deluge-gtk</main-binary> <main-binary>${prefix}/bin/deluge-gtk</main-binary>
<binary dest="${bundle}/Contents/MacOS/deluged-bin"> <binary dest="${bundle}/Contents/MacOS/deluged-bin">${prefix}/bin/deluged</binary>
${prefix}/bin/deluged <binary dest="${bundle}/Contents/MacOS/deluge-web-bin">${prefix}/bin/deluge-web</binary>
</binary> <binary dest="${bundle}/Contents/MacOS/deluge-console-bin">${prefix}/bin/deluge-console</binary>
<binary dest="${bundle}/Contents/MacOS/deluge-web-bin"> <binary dest="${bundle}/Contents/MacOS/Deluge-python">${prefix}/bin/python</binary>
${prefix}/bin/deluge-web
</binary>
<binary dest="${bundle}/Contents/MacOS/deluge-console-bin">
${prefix}/bin/deluge-console
</binary>
<binary dest="${bundle}/Contents/MacOS/Deluge-python">
${prefix}/bin/python
</binary>
<!-- not used: binary>${prefix}/lib/${gtkdir}/modules/*.so</binary--> <!-- not used: binary>${prefix}/lib/${gtkdir}/modules/*.so</binary-->
<binary>${prefix}/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.so</binary> <binary>${prefix}/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.so</binary>
<binary>${prefix}/lib/libpyglib-2.0-python.0.dylib</binary> <binary>${prefix}/lib/libpyglib-2.0-python.0.dylib</binary>
<binary>${prefix}/lib/libgtk-quartz-2.0.0.dylib</binary> <binary>${prefix}/lib/libgtk-quartz-2.0.0.dylib</binary>
<binary>${prefix}/lib/libglade-2.0.0.dylib</binary> <binary>${prefix}/lib/libglade-2.0.0.0.7dylib</binary>
<binary>${prefix}/lib/libgtkmacintegration.0.dylib</binary> <binary>${prefix}/lib/libgtkmacintegration.2.dylib</binary>
<binary>${prefix}/lib/librsvg-2.2.dylib</binary> <binary>${prefix}/lib/librsvg-2.2.dylib</binary>
<binary>${prefix}/lib/pango/1.6.0/modules/pango*.so</binary> <binary>${prefix}/lib/pango/1.8.0/modules/pango*.so</binary>
<binary>${prefix}/lib/libboost_*.dylib</binary> <binary>${prefix}/lib/libboost_system.dylib</binary>
<binary>${prefix}/lib/libtorrent-rasterbar.6.dylib</binary> <binary>${prefix}/lib/libboost_python.dylib</binary>
<binary>${prefix}/lib/libssl.1.0.0.dylib</binary> <binary>${prefix}/lib/libtorrent-rasterbar.7.dylib</binary>
<binary>${prefix}/lib/libssl.1.0.1.dylib</binary>
<data dest="${bundle}/Contents/Resources/"> <data dest="${bundle}/Contents/Resources/">
${project}/../dist/deluge.app/Contents/Resources/ ${project}/../dist/deluge.app/Contents/Resources/
</data> </data>

View File

@ -4,8 +4,14 @@
<moduleset> <moduleset>
<repository type="tarball" name="sourceforge" <repository type="tarball" name="sourceforge"
href="http://downloads.sourceforge.net/sourceforge/"/> href="http://downloads.sourceforge.net/sourceforge/"/>
<repository type="git" name="github.com" <repository type="git" name="git.gnome"
href="git://github.com/"/> href="git://git.gnome.org"/>
<repository type="svn" name="svn.libtorrent"
href="https://libtorrent.svn.sourceforge.net/svnroot/"/>
<repository type="tarball" name="pypi"
href="http://pypi.python.org/packages/source/"/>
<repository type="tarball" name="libtorrent"
href="http://libtorrent.googlecode.com/files/"/>
<metamodule id="deluge"> <metamodule id="deluge">
<dependencies> <dependencies>
@ -15,14 +21,23 @@
</dependencies> </dependencies>
</metamodule> </metamodule>
<repository type="tarball" name="libtorrent"
href="http://libtorrent.googlecode.com/files/"/>
<autotools id="libtorrent" autogen-sh="configure" <autotools id="libtorrent" autogen-sh="configure"
autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --with-boost-libdir=%(libdir)s --with-openssl=%(prefix)s %(autogenargs)s" autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --with-boost-libdir=%(libdir)s --with-openssl=%(prefix)s %(autogenargs)s"
autogenargs="--enable-python-binding CPPFLAGS='-DBOOST_FILESYSTEM_VERSION=2' --with-boost-thread=boost_thread"> autogenargs="--enable-python-binding">
<branch repo="libtorrent" version="0.15.10" <branch repo="libtorrent" version="0.16.8"
module="libtorrent-rasterbar-0.15.10.tar.gz" module="libtorrent-rasterbar-0.16.8.tar.gz"
hash="sha1:3e461d9ede5fab3fb59be6a9f0cbc52121d536c4"/> hash="sha1:483689787cb64e7cf4abefda4058b912ec406709"/>
<dependencies>
<dep package="openssl"/>
<dep package="boost"/>
</dependencies>
</autotools>
<!-- This will use the latest 0.16 code but will require manually running ./configure in jhbuild process -->
<autotools id="libtorrent_RC16" autogen-sh="autotools.sh"
autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --with-boost-libdir=%(libdir)s --with-openssl=%(prefix)s %(autogenargs)s"
autogenargs="--enable-python-binding">
<branch repo="svn.libtorrent" revision="RC_0_16" checkoutdir="libtorrent_RC_0_16"/>
<dependencies> <dependencies>
<dep package="openssl"/> <dep package="openssl"/>
<dep package="boost"/> <dep package="boost"/>
@ -32,28 +47,27 @@
<repository type="tarball" name="openssl" <repository type="tarball" name="openssl"
href="http://www.openssl.org/source/"/> href="http://www.openssl.org/source/"/>
<autotools id="openssl" autogen-sh="Configure" <autotools id="openssl" autogen-sh="Configure"
autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s -L%(libdir)s --openssldir=%(prefix)s/etc/openssl %(autogenargs)s" autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --libdir=%(libdir)s -L%(libdir)s %(autogenargs)s"
autogenargs="darwin64-x86_64-cc zlib no-asm no-krb5 shared"> autogenargs="darwin-i386-cc zlib no-krb5 shared">
<!--autogenargs="darwin-i386-cc zlib no-asm no-krb5 shared">--> <!--autogenargs="darwin64-x86_64-cc zlib no-krb5 shared">-->
<branch repo="openssl" version="1.0.0g" <branch repo="openssl" version="1.0.1e"
module="openssl-1.0.0g.tar.gz" module="openssl-1.0.1e.tar.gz"
md5sum="07ecbe4324f140d157478637d6beccf1"/> hash="md5:66bf6f10f060d561929de96f9dfe5b8c"/>
</autotools> </autotools>
<autotools id="boost" autogen-sh="bootstrap.sh" <autotools id="boost" autogen-sh="bootstrap.sh"
autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --libdir=%(prefix)s/lib --with-python=%(prefix)s/bin/python --with-icu=%(prefix)s --without-libraries=mpi" autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --libdir=%(libdir)s --with-python=%(prefix)s/bin/python --with-icu=%(prefix)s --with-libraries=system,python"
supports-non-srcdir-builds="false" supports-non-srcdir-builds="false"
makeargs="|| ./b2 link=shared threading=multi variant=release" makeargs="|| ./b2 architecture=x86 address-model=32 link=shared threading=multi variant=release"
makeinstallargs="|| ./b2 install link=shared threading=multi variant=release"> makeinstallargs="|| ./b2 install">
<!--makeargs="|| ./b2 architecture=x86 link=shared threading=multi variant=release" <branch repo="sourceforge" version="1.53"
makeinstallargs="|| ./b2 install architecture=x86 link=shared threading=multi variant=release"--> module="boost/boost_1_53_0.tar.bz2"
<branch repo="sourceforge" hash="md5:a00d22605d5dbcfb4c9936a9b35bc4c2"/>
module="boost/boost_1_49_0.tar.bz2" version="1.49"
md5sum="0d202cb811f934282dea64856a175698"/>
</autotools> </autotools>
<autotools id="gtk-mac-bundler" autogen-template="echo no configure"> <autotools id="gtk-mac-bundler" autogen-template="echo no configure">
<branch repo="github.com" module="jralls/gtk-mac-bundler.git"/> <branch repo="git.gnome" module="gtk-mac-bundler"/>
</autotools> </autotools>
<metamodule id="deluge-python-deps"> <metamodule id="deluge-python-deps">
@ -65,65 +79,36 @@
<dep package="py2app"/> <dep package="py2app"/>
<dep package="mako"/> <dep package="mako"/>
<dep package="twisted"/> <dep package="twisted"/>
<dep package="twisted-web"/>
</dependencies> </dependencies>
</metamodule> </metamodule>
<repository type="tarball" name="pypi"
href="http://pypi.python.org/packages/source/"/>
<distutils id="setuptools"> <distutils id="setuptools">
<branch repo="pypi" version="0.6c11" <branch repo="pypi" version="0.6c11"
module="s/setuptools/setuptools-0.6c11.tar.gz"/> module="s/setuptools/setuptools-0.6c11.tar.gz"/>
</distutils> </distutils>
<distutils id="chardet"> <distutils id="chardet">
<branch repo="pypi" version="1.0.1" <branch repo="pypi" version="2.1.1"
module="c/chardet/chardet-1.0.1.tar.gz"/> module="c/chardet/chardet-2.1.1.tar.gz"/>
</distutils> </distutils>
<distutils id="pyopenssl"> <distutils id="pyopenssl">
<branch repo="pypi" version="0.13" <branch repo="pypi" version="0.13"
module="p/pyOpenSSL/pyOpenSSL-0.13.tar.gz"/> module="p/pyOpenSSL/pyOpenSSL-0.13.tar.gz"/>
</distutils> </distutils>
<distutils id="pyxdg"> <distutils id="pyxdg">
<branch repo="pypi" version="0.19" <branch repo="pypi" version="0.25"
module="p/pyxdg/pyxdg-0.19.tar.gz"/> module="p/pyxdg/pyxdg-0.25.tar.gz"/>
</distutils> </distutils>
<distutils id="py2app"> <distutils id="py2app">
<branch repo="pypi" version="0.6.4" <branch repo="pypi" version="0.7.3"
module="p/py2app/py2app-0.6.4.tar.gz"/> module="p/py2app/py2app-0.7.3.tar.gz"/>
</distutils> </distutils>
<distutils id="mako"> <distutils id="mako">
<branch repo="pypi" version="0.6.2" <branch repo="pypi" version="0.7.3"
module="M/Mako/Mako-0.6.2.tar.gz"/> module="M/Mako/Mako-0.7.3.tar.gz"/>
</distutils> </distutils>
<repository type="tarball" name="twistedmatrix"
href="http://twistedmatrix.com/Releases/"/>
<distutils id="twisted"> <distutils id="twisted">
<branch repo="twistedmatrix" version="11.0.0" <branch repo="pypi" version="12.3.0"
module="Twisted/11.0/Twisted-11.0.0.tar.bz2" module="T/Twisted/Twisted-12.3.0.tar.bz2"/>
md5sum="d7f94a1609a1b8f3b8c8d0146d4cfe54"/>
</distutils> </distutils>
<distutils id="twisted-web">
<branch repo="twistedmatrix" version="8.1.0"
module="Web2/8.1/TwistedWeb2-8.1.0.tar.bz2"
md5sum="e34b48edf6fef075bd41ddbd215aed32"/>
</distutils>
<!--Failed attempt to build universal glib-->
<repository type="tarball" name="ftp.gnome.org"
href="http://ftp.gnome.org/pub/GNOME/sources/"/>
<autotools id="glib2" autogen-sh="configure" autogenargs="--enable-static">
<branch module="glib/2.28/glib-2.28.8.tar.bz2" version="2.28.8" repo="ftp.gnome.org"
hash="sha256:222f3055d6c413417b50901008c654865e5a311c73f0ae918b0a9978d1f9466f">
<patch file="https://trac.macports.org/export/87264/trunk/dports/devel/glib2/files/patch-configure.ac.diff"/>
<patch file="https://trac.macports.org/export/87264/trunk/dports/devel/glib2/files/patch-glib-2.0.pc.in.diff"/>
<patch file="https://trac.macports.org/export/87264/trunk/dports/devel/glib2/files/patch-glib_gunicollate.c.diff"/>
<patch file="https://trac.macports.org/export/87264/trunk/dports/devel/glib2/files/patch-gi18n.h.diff"/>
<patch file="https://trac.macports.org/export/87264/trunk/dports/devel/glib2/files/patch-gio_xdgmime_xdgmime.c.diff"/>
</branch>
<after>
<dep package="meta-gtk-osx-bootstrap"/>
<dep package="gtk-doc"/>
</after>
</autotools>
</moduleset> </moduleset>

View File

@ -3,12 +3,8 @@
prefix = "/opt/gtk" prefix = "/opt/gtk"
checkoutroot = os.path.expanduser("~/Source/gtk") checkoutroot = os.path.expanduser("~/Source/gtk")
#setup_sdk(target="10.6", sdk_version="10.6", architectures=["i386", "x86_64"]) #setup_sdk(target="10.6", sdk_version="10.6", architectures=["x86_64"])
setup_sdk(target="10.6", sdk_version="10.6", architectures=["x86_64"]) setup_sdk(target="10.6", sdk_version="10.6", architectures=["i386"])
#setup_sdk(target="10.6", sdk_version="10.6", architectures=["i386"]) # fails with libtorrent...
#setup_universal_build(target="10.6", sdk_version="10.6", architectures=["i386", "x86_64"]) # fails with glib2...
os.environ["CC"] = "/usr/bin/gcc"
os.environ["CXX"] = "/usr/bin/g++"
_gtk_osx_use_jhbuild_python = True _gtk_osx_use_jhbuild_python = True

View File

@ -9,11 +9,11 @@ all_files = 1
[py2app] [py2app]
app = ['deluge/main.py'] app = ['deluge/main.py']
arch = x86_64 #arch = x86_64
#arch = i386 arch = i386
iconfile = osx/deluge.icns iconfile = osx/deluge.icns
site-packages = false site-packages = false
includes = glib, gio, cairo, pango, pangocairo, atk, gobject, gtk.keysyms, includes = glib, gio, cairo, pango, pangocairo, atk, gobject, gtk.keysyms,
twisted.internet, twisted.internet.utils, twisted.protocols, twisted.internet, twisted.internet.utils, twisted.protocols,
zope.interface,mako.cache,email.mime,libtorrent zope.interface, mako.cache, email.mime, libtorrent, gtkosx_application
frameworks = CoreFoundation, Foundation, AppKit frameworks = CoreFoundation, Foundation, AppKit