app-arch/ipkg-utils: Bump to EAPI=6
authorJames Rowe <jnrowe@gmail.com>
Fri, 24 Nov 2017 20:35:02 +0000 (21:35 +0100)
committerJonas Stein <jstein@gentoo.org>
Fri, 24 Nov 2017 20:48:20 +0000 (21:48 +0100)
also update import md5 patch

Closes: https://bugs.gentoo.org/634300
Package-Manager: Portage-2.3.16, Repoman-2.3.5

app-arch/ipkg-utils/Manifest
app-arch/ipkg-utils/files/ipkg-utils-1.7.050831-hashlib-r2.patch [new file with mode: 0644]
app-arch/ipkg-utils/ipkg-utils-1.7.050831-r3.ebuild [new file with mode: 0644]

index e0750ea383d0a6aaa0b4cda8911e62324090bdb0..18c1fcd90050959c3e244d60ab40b5eee17bda8e 100644 (file)
@@ -1 +1 @@
-DIST ipkg-utils-050831.tar.gz 29175 SHA256 1dde1111fbca85977855db9acb557097a32a5133d8764a05ea36a89a1205394b SHA512 7375c4815225eb755699954d3005dfa88bc0f0e6c2678b7bad565f63204a32735d483dbef23e7b9b75c5f0428ff04c13744b8a10e68bb69fedb96a59c069e1aa WHIRLPOOL 7bd8b42aad219862c0211006954e027dd5b933fe13953932fa767f9fb35745d715c982f93c7ea636be23c5a27d7a460c2fc636963724e06547a4f093594355c1
+DIST ipkg-utils-050831.tar.gz 29175 BLAKE2B 4f1d4b5efb7f808e6987a7b62f830463e28fca998c49b4d6683a58c2d2225e24820e6f2b47642e5cceafa34e0ab3ff8172267ef734bbbf1c8f94b8777172efc8 SHA512 7375c4815225eb755699954d3005dfa88bc0f0e6c2678b7bad565f63204a32735d483dbef23e7b9b75c5f0428ff04c13744b8a10e68bb69fedb96a59c069e1aa
diff --git a/app-arch/ipkg-utils/files/ipkg-utils-1.7.050831-hashlib-r2.patch b/app-arch/ipkg-utils/files/ipkg-utils-1.7.050831-hashlib-r2.patch
new file mode 100644 (file)
index 0000000..3cdd35b
--- /dev/null
@@ -0,0 +1,25 @@
+diff --git i/ipkg.py w/ipkg.py
+index 02aab22..145686c 100644
+--- i/ipkg.py
++++ w/ipkg.py
+@@ -36,10 +36,10 @@ import tempfile
+ import os
+ import sys
+ import glob
+-import md5
+ import re
+ import string
+ import commands
++from hashlib import md5
+ from stat import ST_SIZE
+ class Version:
+@@ -136,7 +136,7 @@ class Package:
+             # compute the MD5.
+             f = open(fn, "r")
+-            sum = md5.new()
++            sum = md5()
+             while 1:
+                 data = f.read(1024)
+                 if not data: break
diff --git a/app-arch/ipkg-utils/ipkg-utils-1.7.050831-r3.ebuild b/app-arch/ipkg-utils/ipkg-utils-1.7.050831-r3.ebuild
new file mode 100644 (file)
index 0000000..649d700
--- /dev/null
@@ -0,0 +1,66 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 eutils toolchain-funcs versionator
+
+MY_P="${PN}-$(get_version_component_range 3)"
+
+DESCRIPTION="Tools for working with the ipkg binary package format"
+HOMEPAGE="http://www.openembedded.org/"
+SRC_URI="http://handhelds.org/download/packages/ipkg-utils/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~x86"
+IUSE="minimal"
+
+DEPEND="
+       !minimal? (
+               app-crypt/gnupg
+               net-misc/curl
+       )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=("${FILESDIR}/${P}-hashlib-r2.patch")
+
+src_prepare() {
+       default
+
+       sed '/python setup.py build/d' -i Makefile
+
+       if use minimal; then
+               elog "ipkg-upload is not installed when the \`minimal' USE flag is set.  If you"
+               elog "need ipkg-upload then rebuild this package without the \`minimal' USE flag."
+       fi
+}
+
+src_compile() {
+       distutils-r1_src_compile
+       emake CC="$(tc-getCC)"
+}
+
+python_install() {
+       distutils-r1_python_install
+
+       if use minimal; then
+               rm "${ED}usr/bin/ipkg-upload" \
+                       "${D}$(python_get_scriptdir)/ipkg-upload" || die
+       fi
+}
+
+src_install() {
+       distutils-r1_src_install
+
+       dobin ipkg-compare-versions
+}
+
+pkg_postinst() {
+       elog "Consider installing sys-apps/fakeroot for use with the ipkg-build "
+       elog "command, that makes it possible to build packages as a normal user."
+}