diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-01-17 06:41:55 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-01-17 06:41:55 +0000 |
commit | 6d730aa8064fbab6cc54447b6ed0e60b99c13256 (patch) | |
tree | 8c303cb48dc49dd218b79708ca71904653c5f831 /dev-util/imediff | |
parent | cb2f73d10494730ba590096a1f24ebc6d0d61a9f (diff) |
gentoo auto-resync : 17:01:2025 - 06:41:55
Diffstat (limited to 'dev-util/imediff')
-rw-r--r-- | dev-util/imediff/Manifest | 6 | ||||
-rw-r--r-- | dev-util/imediff/files/1.1.2.1-python-3.patch | 157 | ||||
-rw-r--r-- | dev-util/imediff/imediff-1.1.2.1.ebuild | 40 | ||||
-rw-r--r-- | dev-util/imediff/imediff-3.3.1.ebuild | 35 | ||||
-rw-r--r-- | dev-util/imediff/metadata.xml | 9 |
5 files changed, 247 insertions, 0 deletions
diff --git a/dev-util/imediff/Manifest b/dev-util/imediff/Manifest new file mode 100644 index 000000000000..0342624fd2b5 --- /dev/null +++ b/dev-util/imediff/Manifest @@ -0,0 +1,6 @@ +AUX 1.1.2.1-python-3.patch 5273 BLAKE2B cb2be2f11021d61f998d228d26cfad956ec3c6d18aeafb7ece82d5f3de1e624776033746a51542b601d3ab94db2d57aece68315f772d8299f22b2010d2151905 SHA512 212cb76362c8243824d16f514a2dafc0c746467454c463e34f1840022d4a988874878e544ee944726947a287e5db27a78d2b99b790a78f4188d10ed9e2eaaea5 +DIST imediff-3.3.1.tar.gz 98813 BLAKE2B af578358bd8670b15378879487cb7ee2096d0984251d39d4bb3cdd025794035a8a7e3f633afe80bf5805681614269abf6e03dae248b91470450d93e06256c885 SHA512 598cd499b757bd5f0255c5db909ffccce5ece3979af25a7919b9ad187744e89f321d6a97634dba3fa29fe7f0712212e3d16b7dabf9abf3d84893a7d30feec71b +DIST imediff2_1.1.2.1.orig.tar.gz 20393 BLAKE2B 560eef8600bac8ad302907563bd8520ef7881009c8a35c74427d0d5d9e8d4303446f1eb39c01fec201c798f286023765776a84b1e1aaa9e2d585a45870375f16 SHA512 ad0e22f5f2f16efb976a0d6d16c34798cc8aace4251a99cb7764df6841f93c2a6bb9dc8cbb59d8f3ae5a5ad7c161a05b9c3c7b36cc7bdf98eac3ef3b735ef6c4 +EBUILD imediff-1.1.2.1.ebuild 802 BLAKE2B 4bb095a3d032320385cc2b58b0a3273697107e0abeb958c42f677b8ee1b160ba73e43831fce24447dd686bdbb10d142d8feb340e66822b0bfd2c1ed6be23f8c5 SHA512 8c5a2a1bfbe82a00fff75afb5dcfaa07f82923d6a8fa87e3386e51262b603a09e409702f3d2ada199c28625e3c3eb8c2699486966de8d7993208991aa497e2e1 +EBUILD imediff-3.3.1.ebuild 868 BLAKE2B f53f9f764b6fe0a24cbeaafffd7281062a5a7edf7778300cf27a4095b70e4f6efe93c03c3afc45daf630bbab144890d1f85ad21115641f64fe69971c8a1a8508 SHA512 bd7bf7055cd66008484a333c0847607ead7aeba04986d80bd501c06e8e1a1bbe6ef6ceb44f2fbd669f87d4388c12f88bac976c12c450968e557c363cb108dd9a +MISC metadata.xml 274 BLAKE2B c12371b16b18c652b34dd07d73ec99c13ec413416e1ad91a88e560b5cda4e85a97f452e023c13a1a91e96d2741cbcd991c8ddd2a29686c7f6ac71a7ca4f5d6c8 SHA512 6d56009523ef3daf8e21c25045f97cc821852d12ae3ce220d9b51b61bedc37130ddfb20355b54101762af349d3c5fd383624300e1fa511840441427fd17075ae diff --git a/dev-util/imediff/files/1.1.2.1-python-3.patch b/dev-util/imediff/files/1.1.2.1-python-3.patch new file mode 100644 index 000000000000..aa26ad7f9dbb --- /dev/null +++ b/dev-util/imediff/files/1.1.2.1-python-3.patch @@ -0,0 +1,157 @@ +diff -aurN a/imediff2 b/imediff2 +--- a/imediff2 2018-10-20 13:36:19.000000000 -0400 ++++ b/imediff2 2021-03-03 10:03:31.121774492 -0500 +@@ -167,19 +167,19 @@ + def read_lines( filename ): + global assume_empty + try: +- fp = file( filename ) ++ fp = open( filename ) + l = fp.readlines() + fp.close() + return l +- except IOError, (error, message): +- if error == errno.ENOENT and assume_empty: ++ except IOError as e: ++ if e.errno == errno.ENOENT and assume_empty: + return "" + else: +- sys.stderr.write(_("Could not read '%s': %s\n") % (filename, message)) ++ sys.stderr.write(_("Could not read '%s': %s\n") % (filename, e.strerror)) + sys.exit(3) + + def strip_end_lines( txt ): +- return string.replace(string.replace(txt,"%c"%10,""),"%c"%13,"") ++ return txt.replace("%c"%10,"").replace("%c"%13,"") + + def main(stdscr, lines_a, lines_b, start_mode): + global sel, active_chunks, x,y, lines, textpad, contw,conth +@@ -283,7 +283,7 @@ + active_chunks.append( [j, j+len(line_list), i] ) + + for l in line_list: +- lines.append( [string.expandtabs(strip_end_lines(l)), ++ lines.append( [strip_end_lines(l).expandtabs(), + decor, color_pair] ) + j+=1 + +@@ -332,9 +332,9 @@ + def sel_next( dir ): + global sel, active_chunks + if dir == 'up': +- rng = range(sel-1, -1, -1) ++ rng = list(range(sel-1, -1, -1)) + else: +- rng = range(sel+1, len(active_chunks)) ++ rng = list(range(sel+1, len(active_chunks))) + for j in rng: + if active_chunks[j][1] > y and active_chunks[j][0] < y+winh: + sel = j +@@ -487,7 +487,7 @@ + elif c == ord('h') or c == ord('?') or c == curses.KEY_HELP: + helpw = 0 + helph = 0 +- for l in string.split(helptext(), "%c"%10): ++ for l in helptext().split("%c"%10): + helpw = max(helpw, len(l)) + helph += 1 + helppad = curses.newpad(helph+2, helpw+2) +@@ -502,7 +502,7 @@ + elif c == ord('q') or c == curses.KEY_CANCEL: + quitw = 0 + quith = 0 +- for l in string.split(quittext(), "%c"%10): ++ for l in quittext().split("%c"%10): + quitw = max(quitw, len(l)) + quith += 1 + quitpad = curses.newpad(quith+2, quitw+2) +@@ -571,33 +571,33 @@ + try: + opts, args = getopt.getopt(sys.argv[1:], "hmuo:abcNtV", + ["help","mono","unresolved","output=", "template", "version", "new-file"]) +-except getopt.GetoptError, e: +- print _("Error: ") + str(e) +- print usagetext() ++except getopt.GetoptError as e: ++ print((_("Error: ") + str(e))) ++ print(usagetext()) + sys.exit(2) + + for o, a in opts: + if o in ("-h", "--help"): +- print usagetext() ++ print((usagetext())) + sys.exit() + elif o in ("-t", "--template"): + try: + with open(config_file, 'w') as f: +- print >>f, "# Configuration for imediff2: (Erase this file to reset)" +- print >>f, "# <command_key_in_action> <command_key_in_manpage>" +- print >>f, "# edit only first character of each line to 'a'...'z'" +- print >>f, "#" ++ print(("# Configuration for imediff2: (Erase this file to reset)"), file=f) ++ print(("# <command_key_in_action> <command_key_in_manpage>"), file=f) ++ print(("# edit only first character of each line to 'a'...'z'"), file=f) ++ print(("#"), file=f) + for k in kcvalues: +- print >>f, "%s %s" % (k , k) ++ print(("%s %s" % (k , k)), file=f) + except: +- print "%s not writable, aborting" % config_file ++ print(("%s not writable, aborting" % config_file)) + sys.exit() + elif o in ("-V", "--version"): +- print "%s %s" % (PACKAGE, VERSION) ++ print(("%s %s" % (PACKAGE, VERSION))) + sys.exit() + + if len(args)<2: +- print usagetext() ++ print((usagetext())) + sys.exit(2) + + for o, a in opts: +@@ -692,14 +695,14 @@ + assert( not editor is None ) + try: + (of, of_name) = tempfile.mkstemp(prefix='imediff2') +- os.write( of, output ) ++ os.write( of, output.encode() ) + os.close(of) + time.sleep(0.1) # make the change visible - many editor look a lot like imediff2 + editor_ret = os.system('%s %s' % (editor, of_name)) + time.sleep(0.1) + if editor_ret == 0: + new_b_lines = read_lines(of_name) +- if string.join(new_b_lines, '') == output: ++ if ''.join(new_b_lines) == output: + chunk_mode = 'old' + elif new_b_lines != lines_a: + lines_b = new_b_lines +@@ -707,8 +710,8 @@ + else: + chunks = 'old' + os.unlink(of_name) +- except IOError, (error, message): +- sys.stderr.write(_("Could not write to '%s': %s\n") % (of_name, message)); ++ except IOError as e: ++ sys.stderr.write(_("Could not write to '%s': %s\n") % (of_name, e.strerror)); + + if not launch_editor: + break +@@ -719,11 +722,11 @@ + else: + try: + if ofile is not None: +- of = file(ofile, 'wb') +- of.write( output ) ++ of = open(ofile, 'wb') ++ of.write( output.encode() ) + of.close() + sys.exit(0) +- except IOError, (error, message): +- sys.stderr.write(_("Could not write to '%s': %s\n") % (ofile, message)); ++ except IOError as e: ++ sys.stderr.write(_("Could not write to '%s': %s\n") % (ofile, e.strerror)); + + sys.exit(3) diff --git a/dev-util/imediff/imediff-1.1.2.1.ebuild b/dev-util/imediff/imediff-1.1.2.1.ebuild new file mode 100644 index 000000000000..6afd7b40665a --- /dev/null +++ b/dev-util/imediff/imediff-1.1.2.1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_REQ_USE="ncurses" + +inherit python-single-r1 + +MY_PN="${PN}2" +MY_P="${MY_PN}_${PV}" + +DESCRIPTION="2-way/3-way merge tool (CLI, Ncurses)" +HOMEPAGE="https://github.com/osamuaoki/imediff" +SRC_URI="mirror://debian/pool/main/i/${MY_PN}/${MY_P}.orig.tar.gz" + +S="${WORKDIR}/${MY_PN}-${PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 x86" + +DEPEND="${PYTHON_DEPS}" +RDEPEND="${DEPEND}" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +PATCHES=( "${FILESDIR}/${PV}-python-3.patch" ) + +src_compile() { + # Otherwise the docs get regenerated :) + : +} + +src_install() { + python_doscript imediff2 + dobin git-ime + dodoc AUTHORS README.md + doman imediff2.1 git-ime.1 +} diff --git a/dev-util/imediff/imediff-3.3.1.ebuild b/dev-util/imediff/imediff-3.3.1.ebuild new file mode 100644 index 000000000000..e4c8e702aa50 --- /dev/null +++ b/dev-util/imediff/imediff-3.3.1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_SINGLE_IMPL=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_REQ_USE="ncurses" + +inherit distutils-r1 + +DESCRIPTION="2-way/3-way merge tool (CLI, Ncurses)" +HOMEPAGE="https://github.com/osamuaoki/imediff" +SRC_URI="https://github.com/osamuaoki/${PN}/archive/upstream/${PV}.tar.gz -> ${P}.tar.gz" + +S="${WORKDIR}/${PN}-upstream-${PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="${PYTHON_DEPS}" +RDEPEND="${DEPEND}" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +distutils_enable_tests unittest + +src_install() { + distutils-r1_src_install + rm "${ED}"/usr/bin/imediff_install || die + python_doscript "${ED}"/usr/bin/imediff + newbin usr/bin/git-ime.in git-ime + doman usr/share/man/man1/imediff.1 usr/share/man/man1/git-ime.1 +} diff --git a/dev-util/imediff/metadata.xml b/dev-util/imediff/metadata.xml new file mode 100644 index 000000000000..c27b2d8278c5 --- /dev/null +++ b/dev-util/imediff/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="github">osamuaoki/imediff</remote-id> + </upstream> + <stabilize-allarches/> +</pkgmetadata> |