[57304] trunk/dports/news/hellanzb

jameskyle at macports.org jameskyle at macports.org
Tue Sep 8 20:58:55 PDT 2009


Revision: 57304
          http://trac.macports.org/changeset/57304
Author:   jameskyle at macports.org
Date:     2009-09-08 20:58:55 -0700 (Tue, 08 Sep 2009)
Log Message:
-----------
Patched the hellanzb source to suppress deprecation warnings. Kind of annoying.

Modified Paths:
--------------
    trunk/dports/news/hellanzb/Portfile

Added Paths:
-----------
    trunk/dports/news/hellanzb/files/
    trunk/dports/news/hellanzb/files/patch-hellanzb.py.diff

Modified: trunk/dports/news/hellanzb/Portfile
===================================================================
--- trunk/dports/news/hellanzb/Portfile	2009-09-09 03:53:36 UTC (rev 57303)
+++ trunk/dports/news/hellanzb/Portfile	2009-09-09 03:58:55 UTC (rev 57304)
@@ -1,8 +1,8 @@
 # -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
-# $Id$
+# $Id: Portfile 54767 2009-08-01 23:41:14Z snc at macports.org $
 
 PortSystem 1.0
-PortGroup           python25 1.0
+PortGroup           python26 1.0
 
 name             hellanzb
 version          0.13
@@ -26,16 +26,26 @@
                  bin:unrar:unrar \
                  bin:flac:flac \
                  bin:shorten:shorten \
-                    port:py25-twisted
+                 port:py26-twisted \
+                 port:py26-openssl
 
-variant ssl {
-    depends_run-append  port:py25-openssl
+patchfiles       patch-hellanzb.py.diff
+
+variant no_ssl {
+    depends_run-delete  port:py26-openssl
 }
 
+post-destroot {
+   move ${destroot}${python.prefix}/bin/${name}.py ${destroot}${prefix}/bin
+   move ${destroot}${python.prefix}/etc/${name}.conf.sample ${destroot}${prefix}/share/doc/hellanzb/
+   
+   eval xinstall [glob ${destroot}${python.prefix}/share/doc/hellanzb/*] ${destroot}${prefix}/share/doc/hellanzb/
+   
+   system "rm -rf ${destroot}${python.prefix}/share"
+}
+
 post-activate {
-   # copy over the sample conf file if necessary
-   if { ![file exists ${prefix}/etc/${name}.conf] } {
-      file copy ${prefix}/etc/${name}.conf.sample \
-      ${prefix}/etc/${name}.conf
-   }
+  if { ![file exists ${prefix}/etc/${name}.conf] } {
+    copy ${prefix}/share/doc/hellanzb/${name}.conf.sample ${prefix}/etc/${name}.conf
+  }
 }

Added: trunk/dports/news/hellanzb/files/patch-hellanzb.py.diff
===================================================================
--- trunk/dports/news/hellanzb/files/patch-hellanzb.py.diff	                        (rev 0)
+++ trunk/dports/news/hellanzb/files/patch-hellanzb.py.diff	2009-09-09 03:58:55 UTC (rev 57304)
@@ -0,0 +1,18 @@
+--- hellanzb.py	2007-03-26 21:20:43.000000000 -0700
++++ /opt/local/bin/hellanzb.py	2009-09-07 10:39:03.000000000 -0700
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
+ """
+ 
+ hellanzb - hella nzb
+@@ -11,6 +11,9 @@
+ (c) Copyright 2005 Philip Jenvey, Ben Bangert
+ [See end of file]
+ """
++import warnings
++warnings.simplefilter('ignore')
++
+ from Hellanzb.Core import main
+ 
+ __id__ = '$Id: hellanzb.py 665 2006-02-16 23:27:52Z pjenvey $'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090908/45e7f9c9/attachment.html>


More information about the macports-changes mailing list