summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-arch/q7z/ChangeLog11
-rw-r--r--app-arch/q7z/files/0.8.0-fix_7z_flags.patch21
-rw-r--r--app-arch/q7z/files/0.8.0-fix_imports.patch24
-rw-r--r--app-arch/q7z/files/0.8.0-fix_paths.patch61
-rw-r--r--app-arch/q7z/files/0.8.0-init.py1
-rw-r--r--app-arch/q7z/q7z-0.8.0.ebuild76
6 files changed, 193 insertions, 1 deletions
diff --git a/app-arch/q7z/ChangeLog b/app-arch/q7z/ChangeLog
index add01fb919bd..87d9cfd3af28 100644
--- a/app-arch/q7z/ChangeLog
+++ b/app-arch/q7z/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-arch/q7z
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/q7z/ChangeLog,v 1.5 2009/06/01 22:41:17 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-arch/q7z/ChangeLog,v 1.6 2009/06/06 23:28:35 yngwin Exp $
+
+*q7z-0.8.0 (06 Jun 2009)
+
+ 06 Jun 2009; Ben de Groot <yngwin@gentoo.org>
+ +files/0.8.0-fix_7z_flags.patch, +q7z-0.8.0.ebuild,
+ +files/0.8.0-fix_imports.patch, +files/0.8.0-fix_paths.patch,
+ +files/0.8.0-init.py:
+ Version bump. Thanks to Dror Levin for developing this ebuild in
+ qting-edge overlay.
*q7z-0.7.1-r1 (01 Jun 2009)
diff --git a/app-arch/q7z/files/0.8.0-fix_7z_flags.patch b/app-arch/q7z/files/0.8.0-fix_7z_flags.patch
new file mode 100644
index 000000000000..bc6f2140f825
--- /dev/null
+++ b/app-arch/q7z/files/0.8.0-fix_7z_flags.patch
@@ -0,0 +1,21 @@
+diff -ur Q7Z-orig/Source/Thread.py Q7Z/Source/Thread.py
+--- Q7Z-orig/Source/Thread.py 2009-04-23 10:12:24.000000000 +0300
++++ Q7Z/Source/Thread.py 2009-05-29 03:46:02.541667405 +0300
+@@ -220,7 +220,7 @@
+ sExt = ".exe"
+
+ # Recursive
+- slCmdArgs.append( "-r" )
++ #slCmdArgs.append( "-r" )
+
+ # Exclusions
+ slWildcards = QtCore.QStringList( Settings.User.Syntax.sExclusions.split( ' ' ) )
+@@ -549,7 +549,7 @@
+ slCmdArgs.append( "-y" )
+
+ # Recursive
+- slCmdArgs.append( "-r" )
++ #slCmdArgs.append( "-r" )
+
+ # Exclusions
+ slWildcards = QtCore.QStringList( Settings.User.Syntax.sExclusions.split( ' ' ) )
diff --git a/app-arch/q7z/files/0.8.0-fix_imports.patch b/app-arch/q7z/files/0.8.0-fix_imports.patch
new file mode 100644
index 000000000000..a7d06b53c9c4
--- /dev/null
+++ b/app-arch/q7z/files/0.8.0-fix_imports.patch
@@ -0,0 +1,24 @@
+diff -ur Q7Z-orig/Bin/Q7Z.pyw Q7Z/Bin/Q7Z.pyw
+--- Q7Z-orig/Bin/Q7Z.pyw 2008-06-29 03:11:21.000000000 +0300
++++ Q7Z/Bin/Q7Z.pyw 2009-05-30 00:29:09.712445008 +0300
+@@ -11,7 +11,7 @@
+ ### Imports
+
+ # Q7Z
+-import Main
++import q7z.Main as Main
+
+
+ ### Execution
+diff -ur Q7Z-orig/Source/Q7Z.pyw Q7Z/Source/Q7Z.pyw
+--- Q7Z-orig/Source/Q7Z.pyw 2008-06-29 03:11:21.000000000 +0300
++++ Q7Z/Source/Q7Z.pyw 2009-05-30 00:29:09.712445008 +0300
+@@ -11,7 +11,7 @@
+ ### Imports
+
+ # Q7Z
+-import Main
++import q7z.Main as Main
+
+
+ ### Execution
diff --git a/app-arch/q7z/files/0.8.0-fix_paths.patch b/app-arch/q7z/files/0.8.0-fix_paths.patch
new file mode 100644
index 000000000000..150a2184e17b
--- /dev/null
+++ b/app-arch/q7z/files/0.8.0-fix_paths.patch
@@ -0,0 +1,61 @@
+diff -ur Q7Z-orig/Source/Settings.py Q7Z/Source/Settings.py
+--- Q7Z-orig/Source/Settings.py 2009-04-23 01:38:10.000000000 +0300
++++ Q7Z/Source/Settings.py 2009-05-30 00:42:50.391474549 +0300
+@@ -39,7 +39,7 @@
+
+ # Application
+ Application = QtCore.QObject()
+-Application.sName = "Q7Z"
++Application.sName = "q7z"
+ Application.sVersion = QtCore.QString( "0.8.0" )
+ Application.sDomain = "k7z.sourceforge.net"
+ Application.sCurrent = "/7Z/" + Application.sName + "/Current.txt"
+@@ -98,10 +98,10 @@
+ Path = QtCore.QObject()
+ Path.sSep = QtCore.QString( QtCore.QDir.separator() )
+ Path.App = QtCore.QObject()
+-Path.App.sPrefix = ""
++Path.App.sPrefix = "/usr/share/" + Application.sName
+ Path.App.sSBin = ""
+-Path.App.sInstall = "/share/" + Application.sName
+-Path.App.sConfig = Env.sHome + '/.config/' + Author.sName + Path.sSep + Application.sName + Path.sSep
++Path.App.sInstall = ""
++Path.App.sConfig = Path.App.sPrefix
+ Path.KDE = QtCore.QObject()
+ Path.KDE.sAutoStart = ""
+ Path.KDE.sConfig = ""
+@@ -270,20 +270,20 @@
+ # Misc
+ Path.KDE.sAutoStart = Path.KDE.sLocalPrefix + "/Autostart/"
+
+- # Installation
+- # KDE
+- if QtCore.QFile.exists( Path.Sys.sPrefix + Path.App.sInstall + "/Source/" ) :
+- Path.App.sPrefix = Path.Sys.sPrefix
+- Path.App.sSBin = Path.App.sPrefix + "/sbin"
+- # User
+- elif QtCore.QFile.exists( Path.Local.sPrefix + Path.App.sInstall + "/Source/" ) :
+- Path.App.sPrefix = Path.Local.sPrefix
+- Path.App.sSBin = Path.App.sPrefix + "/sbin"
+- # Local
+- else :
+- Path.App.sPrefix = os.path.realpath( os.path.dirname( __file__ ) ) + "/../"
+- Path.App.sSBin = Path.App.sPrefix + "/Bin"
+- Path.App.sInstall = ""
++# # Installation
++# # KDE
++# if QtCore.QFile.exists( Path.Sys.sPrefix + Path.App.sInstall + "/Source/" ) :
++# Path.App.sPrefix = Path.Sys.sPrefix
++# Path.App.sSBin = Path.App.sPrefix + "/sbin"
++# # User
++# elif QtCore.QFile.exists( Path.Local.sPrefix + Path.App.sInstall + "/Source/" ) :
++# Path.App.sPrefix = Path.Local.sPrefix
++# Path.App.sSBin = Path.App.sPrefix + "/sbin"
++# # Local
++# else :
++# Path.App.sPrefix = os.path.realpath( os.path.dirname( __file__ ) ) + "/../"
++# Path.App.sSBin = Path.App.sPrefix + "/Bin"
++# Path.App.sInstall = ""
+
+ # Proxy
+ if Env.sProxy != "" :
diff --git a/app-arch/q7z/files/0.8.0-init.py b/app-arch/q7z/files/0.8.0-init.py
new file mode 100644
index 000000000000..8b137891791f
--- /dev/null
+++ b/app-arch/q7z/files/0.8.0-init.py
@@ -0,0 +1 @@
+
diff --git a/app-arch/q7z/q7z-0.8.0.ebuild b/app-arch/q7z/q7z-0.8.0.ebuild
new file mode 100644
index 000000000000..81a8fda10ab7
--- /dev/null
+++ b/app-arch/q7z/q7z-0.8.0.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/q7z/q7z-0.8.0.ebuild,v 1.1 2009/06/06 23:28:35 yngwin Exp $
+
+EAPI="2"
+NEED_PYTHON="2.5"
+inherit eutils python
+
+MY_PN="Q7Z"
+
+DESCRIPTION="A GUI frontend for p7zip"
+HOMEPAGE="http://code.google.com/p/k7z/"
+SRC_URI="http://k7z.googlecode.com/files/${MY_PN}-${PV}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+IUSE=""
+
+RESTRICT="test"
+
+DEPEND="app-arch/p7zip
+ dev-python/PyQt4[X]"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_PN}/Build"
+
+src_prepare() {
+ cd ..
+
+ # fix paths used at runtime
+ epatch "${FILESDIR}/${PV}-fix_paths.patch"
+ # remove '-r' flag from 7z as it's not supposed to be used
+ epatch "${FILESDIR}/${PV}-fix_7z_flags.patch"
+ # fix imports to reference the q7z package
+ epatch "${FILESDIR}/${PV}-fix_imports.patch"
+
+ # patch menu entry to have correct name
+ mv "Desktop/Menu/${MY_PN}.desktop" "Desktop/Menu/${PN}.desktop"
+ sed -i "s/${MY_PN}/${PN}/" "Desktop/Menu/${PN}.desktop" \
+ || die "sed failed"
+
+ cd Source
+ mv "${MY_PN}.pyw" "${PN}.pyw"
+}
+
+src_install() {
+ python_version
+
+ cd ..
+
+ insinto "$(python_get_sitedir)/${PN}"
+ doins Source/*.py || die
+ newins "${FILESDIR}/${PV}-init.py" __init__.py || die
+
+ insinto "/usr/share/${PN}/Options"
+ doins Options/* || die
+ insinto "/usr/share/${PN}/Profiles"
+ doins Desktop/Profiles/* || die
+
+ dobin "Source/${PN}.pyw" || die
+ dosym "/usr/bin/${PN}.pyw" "/usr/bin/${PN}" || die
+
+ # install menu entry
+ insinto /usr/share/icons/hicolor/32x32/apps
+ newins "Image/apps/${MY_PN}.png" "${PN}.png" || die
+ domenu "Desktop/Menu/${PN}.desktop" || die
+}
+
+pkg_postinst() {
+ python_mod_optimize "$(python_get_sitedir)/${PN}"
+}
+
+pkg_postrm() {
+ python_mod_cleanup
+}