[32643] trunk/dports/sysutils/smart
afb at macports.org
afb at macports.org
Thu Jan 10 00:35:21 PST 2008
Revision: 32643
http://trac.macosforge.org/projects/macports/changeset/32643
Author: afb at macports.org
Date: 2008-01-10 00:35:19 -0800 (Thu, 10 Jan 2008)
Log Message:
-----------
port upgrade: smart-0.52
- disable "--gui" since py-gtk2 is gone
- disable archscore for rpm45 and rpm50
Modified Paths:
--------------
trunk/dports/sysutils/smart/Portfile
Added Paths:
-----------
trunk/dports/sysutils/smart/files/patch-archscore.diff
Modified: trunk/dports/sysutils/smart/Portfile
===================================================================
--- trunk/dports/sysutils/smart/Portfile 2008-01-10 07:55:01 UTC (rev 32642)
+++ trunk/dports/sysutils/smart/Portfile 2008-01-10 08:35:19 UTC (rev 32643)
@@ -3,7 +3,7 @@
PortSystem 1.0
name smart
-version 0.51
+version 0.52
platforms darwin freebsd
categories sysutils archivers
maintainers n3npq at mac.com afb at macports.org
@@ -18,12 +18,17 @@
homepage http://smartpm.org
master_sites http://labix.org/download/smart/
-checksums md5 6584bf3b977081162d19e220fdbcb3ac
+checksums md5 f1681adedd18b86f679a53ad8361c9e9 \
+ sha1 56e04b5bc2bfd3eb850da40baad7afc2ee256d0d \
+ rmd160 16d692b4cd8c391bbf0b4578b998a54fc1ed6f4a
use_bzip2 yes
-patchfiles patch-prefix.diff patch-filetools.py
+patchfiles patch-prefix.diff patch-archscore.diff patch-filetools.py
-depends_lib lib:librpm:rpm port:python24 port:py-gtk2
+depends_lib lib:librpm:rpm port:python24
+### by default, it will run --shell interface.
+### to run it with --gui, you will need:
+#depends_run port:py-gtk2
patch {
foreach patch $patchfiles {
Added: trunk/dports/sysutils/smart/files/patch-archscore.diff
===================================================================
--- trunk/dports/sysutils/smart/files/patch-archscore.diff (rev 0)
+++ trunk/dports/sysutils/smart/files/patch-archscore.diff 2008-01-10 08:35:19 UTC (rev 32643)
@@ -0,0 +1,127 @@
+--- ./smart/backends/rpm/base.py.orig 2007-08-07 18:56:15.000000000 +0200
++++ ./smart/backends/rpm/base.py 2007-12-21 13:49:53.000000000 +0100
+@@ -41,7 +41,10 @@ except ImportError:
+ traceback.print_exc()
+ raise Error, _("'rpm' python module is not available")
+
+-archscore = rpm.archscore
++try:
++ archscore = rpm.archscore
++except AttributeError:
++ archscore = None
+
+ __all__ = ["RPMPackage", "RPMProvides", "RPMNameProvides", "RPMPreRequires",
+ "RPMRequires", "RPMUpgrades", "RPMConflicts", "RPMObsoletes",
+@@ -190,7 +193,7 @@ class RPMPackage(Package):
+ otherver, otherarch = splitarch(other.version)
+ if selfver != otherver:
+ rc = vercmp(self.version, other.version)
+- if rc == 0:
++ if archscore and rc == 0:
+ rc = -cmp(archscore(selfarch), archscore(otherarch))
+ return rc == -1
+
+--- ./smart/backends/rpm/header.py.orig 2007-08-07 18:56:15.000000000 +0200
++++ ./smart/backends/rpm/header.py 2007-12-21 13:49:22.000000000 +0100
+@@ -36,6 +36,11 @@ try:
+ except ImportError:
+ rpmhelper = None
+
++try:
++ archscore = rpm.archscore
++except AttributeError:
++ archscore = None
++
+ CRPMTAG_FILENAME = 1000000
+ CRPMTAG_FILESIZE = 1000001
+ CRPMTAG_MD5 = 1000005
+@@ -203,7 +208,7 @@ class RPMHeaderLoader(Loader):
+ if h[1106]: # RPMTAG_SOURCEPACKAGE
+ continue
+ arch = h[1022] # RPMTAG_ARCH
+- if rpm.archscore(arch) == 0:
++ if archscore and archscore(arch) == 0:
+ continue
+
+ name = h[1000] # RPMTAG_NAME
+--- ./smart/backends/rpm/metadata.py.orig 2007-08-07 18:56:15.000000000 +0200
++++ ./smart/backends/rpm/metadata.py 2007-12-21 13:49:22.000000000 +0100
+@@ -36,6 +36,11 @@ import posixpath
+ import locale
+ import os
+
++try:
++ archscore = rpm.archscore
++except AttributeError:
++ archscore = None
++
+ NS_COMMON = "http://linux.duke.edu/metadata/common"
+ NS_RPM = "http://linux.duke.edu/metadata/rpm"
+ NS_FILELISTS = "http://linux.duke.edu/metadata/filelists"
+@@ -168,7 +173,7 @@ class RPMMetaDataLoader(Loader):
+ skip = None
+
+ elif tag == ARCH:
+- if rpm.archscore(elem.text) == 0:
++ if archscore and archscore(elem.text) == 0:
+ skip = PACKAGE
+ else:
+ arch = elem.text
+--- ./smart/backends/rpm/redcarpet.py.orig 2007-08-07 18:56:15.000000000 +0200
++++ ./smart/backends/rpm/redcarpet.py 2007-12-21 13:49:22.000000000 +0100
+@@ -30,6 +30,11 @@ from xml.parsers import expat
+
+ BYTESPERPKG = 3000
+
++try:
++ archscore = rpm.archscore
++except AttributeError:
++ archscore = None
++
+ class RPMRedCarpetPackageInfo(PackageInfo):
+
+ def __init__(self, package, loader, info):
+--- ./smart/backends/rpm/synthesis.py.orig 2007-08-07 18:56:15.000000000 +0200
++++ ./smart/backends/rpm/synthesis.py 2007-12-21 13:49:22.000000000 +0100
+@@ -34,6 +34,10 @@ DEPENDSRE = re.compile("^([^[]*)(\[\*\])
+ OPERATIONRE = re.compile("\[([<>=]*) *(.+)?\]")
+ EPOCHRE = re.compile("[0-9]+:")
+
++try:
++ archscore = rpm.archscore
++except AttributeError:
++ archscore = None
+
+ class URPMISynthesisPackageInfo(PackageInfo):
+ def __init__(self, package, loader, info):
+@@ -165,7 +169,7 @@ class URPMISynthesisLoader(Loader):
+ version, arch = version[:dot], version[dot+1:]
+ versionarch = "@".join((version, arch))
+
+- if rpm.archscore(arch) == 0:
++ if archscore and archscore(arch) == 0:
+ continue
+
+ name = "-".join(rpmnameparts[0:-2])
+--- ./smart/backends/rpm/yast2.py.orig 2007-08-07 18:56:15.000000000 +0200
++++ ./smart/backends/rpm/yast2.py 2007-12-21 13:49:22.000000000 +0100
+@@ -147,6 +147,10 @@ class YaST2Loader(Loader):
+ # Wrapping the text added an extra lf as the first char
+ return summary, description[1:]
+
++try:
++ archscore = rpm.archscore
++except AttributeError:
++ archscore = None
+
+ def parseEntry(self):
+ Pkg = RPMPackage
+@@ -181,7 +185,7 @@ class YaST2Loader(Loader):
+ raise Error("Error loading YaST2 channel info. Possibly " \
+ "corrupted file.\n%s" % self._pkginfofile)
+
+- if rpm.archscore(arch) <= 0:
++ if archscore and archscore(arch) <= 0:
+ return
+ name = nameparts[0]
+ self.curpkgname = name
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080110/bae5be7e/attachment.html
More information about the macports-changes
mailing list