commit:     9eb40efdaef8042a1732b41d51244930b2110b6c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 22 03:16:05 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 22 03:29:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9eb40efd

dev-util/wiggle: add 1.2

Closes: https://bugs.gentoo.org/768195
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/wiggle/Manifest                      |  1 +
 dev-util/wiggle/files/wiggle-1.2-cflags.patch | 37 ++++++++++++++
 dev-util/wiggle/wiggle-1.2.ebuild             | 71 +++++++++++++++++++++++++++
 3 files changed, 109 insertions(+)

diff --git a/dev-util/wiggle/Manifest b/dev-util/wiggle/Manifest
index 2bd118b3aad..7b41a18e622 100644
--- a/dev-util/wiggle/Manifest
+++ b/dev-util/wiggle/Manifest
@@ -1,2 +1,3 @@
 DIST wiggle-0.9.tar.gz 809756 BLAKE2B 
62fd35c721c4d54204984fd196686decff54c1613ceabf5c727b6383500158a04110c4fa2e63d6456452ac79fb811aac611876528fd2503c1acb7e0eb000e49f
 SHA512 
2e3a4977704231f3bd6aa96ffaba8bc733acde425773b86a9649312676b44360c5b85cb48bf944cd383d8e4d0a541d88755f23be7d7a8884213f68a6320c62d9
 DIST wiggle-1.0.tar.gz 868216 BLAKE2B 
7241cbbde488b5cbf8970feb1cc258deb04c935347d793796f34993feba3e82870c9ac2aa7d5039f4739308cd0b20b4b104fb50c5ce64a5c66381ff3f6c545d4
 SHA512 
e9bd6e794ba0cff70db96a648c53aa21b427967758375b843fccf409dd17faf59468c11bafb1e0a7af8bfa657551da8bc1903b9ccf8def1ed9acc84f50c7e0b3
+DIST wiggle-1.2.tar.gz 847391 BLAKE2B 
5e2e3d76e8d5a0ee25cb0957fed1faf0f41bf14a7e7ced9a4547c300154a835df3ade2a94c1d28eb7878e608bf0f48fcd827387d87fe614a95bfea4261b3df01
 SHA512 
655525a05c0ebc08cb2e4dc33c0b40f893814976e493ea4bcf87cf703738310af2e71c43a15a6e56c948472bf0bd981a5b95f6d9a91a3a377d580928a86bcd58

diff --git a/dev-util/wiggle/files/wiggle-1.2-cflags.patch 
b/dev-util/wiggle/files/wiggle-1.2-cflags.patch
new file mode 100644
index 00000000000..a308436e1bb
--- /dev/null
+++ b/dev-util/wiggle/files/wiggle-1.2-cflags.patch
@@ -0,0 +1,37 @@
+Respect CFLAGS, no -Werror, allow override of destinations for e.g. Prefix,
+and call pkg-config while respecting ${PKG_CONFIG} (to find ncurses libs for
+e.g. tinfo).
+--- a/Makefile
++++ b/Makefile
+@@ -2,21 +2,20 @@
+ # Note on my Mobile Pentium II, -march=pentium2 delivers twice the 
performance of i386
+ #OptDbg=-O3
+ #OptDbg=-O3 -march=pentium2
+-OptDbg=-ggdb
+ ifndef CWFLAGS
+-CWFLAGS=-Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter 
-Wno-missing-field-initializers
++CWFLAGS=-Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter 
-Wno-missing-field-initializers
+ endif
+-CFLAGS=$(OptDbg) -I. $(CWFLAGS)
++CFLAGS+= -I. $(CWFLAGS)
+ 
+-PREFIX  = /usr
++PREFIX  ?= /usr
+ # STRIP = -s
+-INSTALL = /usr/bin/install
+-DESTDIR =
+-BINDIR  = $(PREFIX)/bin
+-MANDIR  = $(PREFIX)/share/man
+-MAN1DIR = $(MANDIR)/man1
+-MAN5DIR = $(MANDIR)/man5
+-LDLIBS = -lncurses
++INSTALL ?= /usr/bin/install
++DESTDIR ?=
++BINDIR  ?= $(PREFIX)/bin
++MANDIR  ?= $(PREFIX)/share/man
++MAN1DIR ?= $(MANDIR)/man1
++MAN5DIR ?= $(MANDIR)/man5
++LDLIBS = $(shell $${PKG_CONFIG:-pkg-config} --libs ncurses)
+ 
+ all: wiggle wiggle.man test
+ 

diff --git a/dev-util/wiggle/wiggle-1.2.ebuild 
b/dev-util/wiggle/wiggle-1.2.ebuild
new file mode 100644
index 00000000000..b002ffebcbd
--- /dev/null
+++ b/dev-util/wiggle/wiggle-1.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit fixheadtails toolchain-funcs
+
+DESCRIPTION="Tool for applying patches that patch cannot apply because of 
conflicting changes"
+HOMEPAGE="https://neil.brown.name/wiggle 
https://git.neil.brown.name/?p=wiggle.git";
+SRC_URI="https://neil.brown.name/${PN}/${P}.tar.gz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+# The 'p' tool does support bitkeeper, but I'm against just dumping it in here
+# due to it's size.  I've explictly listed every other dependency here due to
+# the nature of the shell program 'p'
+RDEPEND="
+       dev-util/diffstat
+       dev-util/patchutils
+       sys-apps/diffutils
+       sys-apps/findutils
+       virtual/awk
+       sys-apps/grep
+       sys-apps/less
+       sys-apps/sed
+       sys-apps/coreutils
+       sys-devel/patch
+       sys-libs/ncurses:0=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       sys-apps/groff
+       virtual/pkgconfig
+       test? ( sys-process/time )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-cflags.patch
+)
+
+src_prepare() {
+       default
+
+       # Fix the reference to the help file so `p help' works
+       sed -i "s:\$0.help:${EPREFIX}/usr/share/wiggle/p.help:" p || die "sed 
failed on p"
+
+       ht_fix_file p
+}
+
+src_compile() {
+       tc-export PKG_CONFIG
+
+       emake CC="$(tc-getCC)" ${PN}
+}
+
+src_test() {
+       # Use prefixed time binary
+       emake TIME_CMD="${EPREFIX}/usr/bin/time" test
+}
+
+src_install() {
+       dobin wiggle p
+       doman wiggle.1
+       dodoc ANNOUNCE INSTALL TODO DOC/Algorithm notes
+       insinto /usr/share/wiggle
+       doins p.help
+}

Reply via email to