summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2020-09-19 18:47:05 +0000
committerSam James <sam@gentoo.org>2020-09-19 18:47:14 +0000
commitb179428d05c90dc92f4fe05d4f2a61aa5c6f5c7b (patch)
treee539bbfcc18318d46b881ea6511edf4ca3461d17 /sci-mathematics
parentsci-mathematics/num-utils: port to EAPI 7 (diff)
downloadgentoo-b179428d05c90dc92f4fe05d4f2a61aa5c6f5c7b.tar.gz
gentoo-b179428d05c90dc92f4fe05d4f2a61aa5c6f5c7b.tar.bz2
gentoo-b179428d05c90dc92f4fe05d4f2a61aa5c6f5c7b.zip
sci-mathematics/num-utils: bump to debian's -15 patchset
Closes: https://bugs.gentoo.org/732038 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/num-utils/Manifest1
-rw-r--r--sci-mathematics/num-utils/files/num-utils-0.5-r2-Makefile.patch48
-rw-r--r--sci-mathematics/num-utils/num-utils-0.5-r2.ebuild51
3 files changed, 100 insertions, 0 deletions
diff --git a/sci-mathematics/num-utils/Manifest b/sci-mathematics/num-utils/Manifest
index 2606590bdb3..042126090ef 100644
--- a/sci-mathematics/num-utils/Manifest
+++ b/sci-mathematics/num-utils/Manifest
@@ -1,2 +1,3 @@
DIST num-utils-0.5.tar.gz 31845 BLAKE2B fe6620dd0cc7c0d0dc03447918b525f57e9360c5d2a44a32afe7879cf8000bbce646dc271fc821531642c209bf6b356783b09e969755eb7c7af785a8a07a2462 SHA512 6f5a2a8304a0ac3cdba342ecfd28ccd926778a5fde5eed4655f973a5c921e558f0986061ec11ba6146382f63a46b1503570576370a28a0f975e361d790f03561
DIST num-utils_0.5-11.diff.gz 11702 BLAKE2B d0f81877b3dedbd98f89d0e7448739eb6c953cc966a2a49dfc598821802837b7ade4d6ee70586febd0e72218f042dead06bc3750616960862a63c9e8134f1bef SHA512 b461771ba1c8054d83f1aea06cd6beb92945ba929ff71df9e9c02b589c59dce2f2a19e7dab76120d48de7ae2f9e30f0271ae0b873d6e220ea195e160d4347bbf
+DIST num-utils_0.5-15.debian.tar.xz 17436 BLAKE2B 099e22a67b359072789106581c6d3b4fe006eb0064ad70578c0cf07388d1b9a677eb418d8d79ae59d6a9e0f3bff93e3159448e36c965f314c6bc559f5af70921 SHA512 5cbcf0d984e2c87fc16932bbd3e952a2b38c1272e00b55839d42ffaf28e0a8b0f5e4340ae01124ef34507ec4a144df0a48fa2af087f876cef39fdc5ba20ce0d1
diff --git a/sci-mathematics/num-utils/files/num-utils-0.5-r2-Makefile.patch b/sci-mathematics/num-utils/files/num-utils-0.5-r2-Makefile.patch
new file mode 100644
index 00000000000..b0d331451aa
--- /dev/null
+++ b/sci-mathematics/num-utils/files/num-utils-0.5-r2-Makefile.patch
@@ -0,0 +1,48 @@
+diff --git a/Makefile b/Makefile
+index 079b442..a6ade95 100644
+--- a/Makefile
++++ b/Makefile
+@@ -22,7 +22,7 @@ VERSION = $(shell cat VERSION)
+ PROJECT = num-utils
+ DIST = $(PROJECT)-$(VERSION)
+ FILES = $(shell cat MANIFEST)
+-UTILS = average bound interval normalize numgrep numprocess numsum random range round
++UTILS = numaverage numbound numinterval numnormalize numgrep numprocess numsum numrandom numrange numround
+ DOCS = template README GOALS WARNING
+ TESTS = file fractionalnums numbers numbers2 README zeros
+ # rpm --showrc is gettin to be hard to parse anymore.
+@@ -62,7 +62,7 @@ install:
+
+ install -m 0755 -o 0 -g 0 -d $(DESTDIR)/$(MANDIR)
+ for man in $(UTILS) ; do \
+- install -m 0644 -o 0 -g 0 $$man.1.gz $(DESTDIR)/$(MANDIR) ; done
++ install -m 0644 -o 0 -g 0 $$man.1 $(DESTDIR)/$(MANDIR) ; done
+
+ uninstall:
+ for util in $(UTILS) ; do \
+@@ -74,14 +74,12 @@ uninstall:
+ rmdir $(DESTDIR)/$(DOCDIR)
+
+ for man in $(UTILS) ; do \
+- rm -f $(DESTDIR)/$(MANDIR)/$$man.1.gz ; done
++ rm -f $(DESTDIR)/$(MANDIR)/$$man.1 ; done
+ rmdir $(DESTDIR)/$(MANDIR)
+
+ manpages:
+ for doc in $(UTILS) ; do \
+- pod2man $$doc > $$doc.1 ; \
+- gzip -9 $$doc.1 ; chmod 644 $$doc.1.gz \
+- ; done
++ pod2man $$doc > $$doc.1 ; done
+
+ rpminstall:
+ install -m 0755 -d $(BINDIR)
+@@ -94,7 +93,7 @@ rpminstall:
+
+ install -m 0755 -d $(MANDIR)
+ for man in $(UTILS) ; do \
+- install -m 0644 $$man.1.gz $(MANDIR) ; done
++ install -m 0644 $$man.1 $(MANDIR) ; done
+
+ clean:
+ rm -f $(PROJECT).spec
diff --git a/sci-mathematics/num-utils/num-utils-0.5-r2.ebuild b/sci-mathematics/num-utils/num-utils-0.5-r2.ebuild
new file mode 100644
index 00000000000..c8dc82f9031
--- /dev/null
+++ b/sci-mathematics/num-utils/num-utils-0.5-r2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DEB_PR=15
+DESCRIPTION="A set of programs for dealing with numbers from the command line"
+HOMEPAGE="https://suso.suso.org/programs/num-utils/index.phtml"
+SRC_URI="
+ http://suso.suso.org/programs/num-utils/downloads/${P}.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}-${DEB_PR}.debian.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+
+# pod2man
+BDEPEND="dev-lang/perl"
+
+src_prepare() {
+ default
+
+ sed \
+ -e 's:../orig/num-utils-0.5/::g' \
+ -i "${WORKDIR}"/debian/patches/*.diff || die
+
+ eapply "${WORKDIR}"/debian/patches/*.diff
+ eapply "${FILESDIR}"/${PN}-0.5-r2-Makefile.patch
+
+ local x
+ for x in average bound interval normalize random range round; do
+ mv $x num$x || die "renaming $x failed"
+ done
+
+ sed -i -e "s/\$(PROJECT)/${PF}/" Makefile || die
+
+ sed \
+ -e 's/^RPMDIR/#RPMDIR/' \
+ -e 's/COPYING//' \
+ -e 's/LICENSE//' \
+ -e '/^DOCS/s/MANIFEST//' \
+ -i Makefile || die "sed Makefile failed"
+}
+
+src_install() {
+ emake ROOT="${ED}" install
+}
+
+pkg_postinst() {
+ elog "All ${PN} programs have been renamed with prefix 'num' to avoid collisions"
+}