Ticket #29417: Portfile.5

File Portfile.5, 4.1 KB (added by rudloff@…, 13 years ago)

Port update to 2.31

Line 
1# $Id: Portfile 78512 2011-05-10 12:57:07Z ryandesign@macports.org $
2
3PortSystem      1.0
4
5name            transmission-x11
6version         2.31
7revision        0
8svn.revision    12441
9categories      net x11
10maintainers     strasweb.fr:rudloff openmaintainer
11description     Lightweight BitTorrent client
12long_description Transmission is a free, lightweight BitTorrent client. \
13                It features a simple, intuitive interface on top of an \
14                efficient, cross-platform back-end. Transmission is open \
15                source (MIT license) and runs on Mac OS X (Cocoa interface), \
16                Linux/NetBSD/FreeBSD/OpenBSD (GTK+ interface) and BeOS \
17                (native interface). This is the GTK+ version.
18license         GPL2 MIT
19homepage        http://www.transmissionbt.com/
20distname        transmission-${version}
21dist_subdir     transmission
22master_sites    http://download.m0k.org/transmission/files/
23checksums       sha1     d14a0cca369f0b40dc3ac8851af3fdc50ec74d13 \
24                                rmd160   9ec36cefb5d5675147dc83bc4a0ffccacd64f9b3
25use_bzip2       yes
26platforms       darwin freebsd
27
28depends_lib     port:openssl \
29                port:curl \
30                port:dbus
31depends_build   port:gsed \
32                port:intltool
33
34configure.args  --enable-daemon \
35                --enable-cli \
36                --disable-wx \
37                --disable-mac \
38                --disable-gtk \
39                --disable-libnotify
40
41variant gtk description {Build GTK front-end} {
42  depends_lib-append    port:gtk2 \
43                        port:dbus-glib
44  configure.args-delete --disable-gtk
45  configure.args-append --enable-gtk
46}
47
48
49variant bundle requires gtk description {OSX Application bundle for the GTK variant} {
50    patchfiles          patch-macosx-Info.plist.diff
51    post-destroot {
52       reinplace "s|@PREFIX@|${prefix}|g" ${portpath}/${filesdir}/launch
53       reinplace "s|VERSION_STRING_INFOPLIST|${version}|g" ${worksrcpath}/macosx/Info.plist
54       reinplace "s|SVN_REVISION_NUM|${svn.revision}|g" ${worksrcpath}/macosx/Info.plist
55       file mkdir ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/MacOS/
56       file mkdir ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/Resources/
57       xinstall ${worksrcpath}/macosx/Info.plist ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/Info.plist
58       xinstall ${worksrcpath}/macosx/Images/Transmission.icns ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/Resources/Transmission.icns
59       xinstall ${worksrcpath}/macosx/Images/TransmissionDocument.icns ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/Resources/TransmissionDocument.icns
60           xinstall ${worksrcpath}/macosx/Info.plist ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/Info.plist
61           xinstall ${portpath}/${filesdir}/launch ${destroot}${prefix}/Applications/Transmission-GTK.app/Contents/MacOS/Transmission
62    }
63}
64
65variant qt conflicts gtk bundle description {Build Qt front-end} {
66    depends_lib-append          port:qt4-mac \
67                                port:libevent
68    patchfiles                  patch-qt-qtr.pro.diff
69
70    post-build {
71       reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/qt/qtr.pro
72        if {[variant_isset universal]} {
73            reinplace "s|@ARCHS@|${universal_archs}|g" ${worksrcpath}/qt/qtr.pro
74            reinplace "s|i386|x86|g" ${worksrcpath}/qt/qtr.pro
75        } else {
76            reinplace "s|@ARCHS@|${build_arch}|g" ${worksrcpath}/qt/qtr.pro
77            reinplace "s|i386|x86|g" ${worksrcpath}/qt/qtr.pro
78        }
79        system "cd ${worksrcpath}/qt && qmake qtr.pro && make"
80    }
81    post-destroot {
82       system "cd ${worksrcpath} && patch -p0 < ${portpath}/${filesdir}/patch-qt-transmission-qt-contents-Info.plist.diff"
83       xinstall -d ${destroot}${prefix}${applications_dir}
84       copy ${worksrcpath}/qt/transmission-qt.app ${destroot}${prefix}${applications_dir}
85       xinstall ${portpath}/${filesdir}/transmission.icns ${destroot}${prefix}${applications_dir}/transmission-qt.app/Contents/Resources/
86    }
87}
88
89
90livecheck.type  regex
91livecheck.url   ${master_sites}
92livecheck.regex "transmission-(\\d+(?:\\.\\d+)*)${extract.suffix}"