x11-misc/xwit: Use debian patches
authorHarri Nieminen <moikkis@gmail.com>
Fri, 24 Feb 2017 06:44:14 +0000 (08:44 +0200)
committerDavid Seifert <soap@gentoo.org>
Sat, 25 Feb 2017 14:15:05 +0000 (15:15 +0100)
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/4071

x11-misc/xwit/Manifest
x11-misc/xwit/files/xwit-3.4-malloc-includes.patch [deleted file]
x11-misc/xwit/xwit-3.4-r1.ebuild [deleted file]
x11-misc/xwit/xwit-3.4.ebuild
x11-misc/xwit/xwit-3.4_p15.ebuild [new file with mode: 0644]

index e1d32c6e0b94bfbcca5ef6eb94d6e4c488e38533..09b354449aee658b97997fc17a1de15add62d3b2 100644 (file)
@@ -1 +1,3 @@
 DIST xwit-3.4.tar.gz 14536 SHA256 d915a7f2f8809da41edcc7784c2618be3f8ce179d82d8ace6d27ba264332c729 SHA512 db0cc8cd7e899790493ca97fa4f12869385d1cfaa807298476d961401004d752531fe75ec72520733e78d81dcd91009c1b4437295056dc1de6219d766235cc5f WHIRLPOOL a72beed7ee71abc4b1679979bb05185f97fe905f2bf36b1bab6cc9874fc282b303ce458e5f1acdc9497fdc545444582f1e943d014c2747782bbbd0b70f961b08
+DIST xwit_3.4-15.debian.tar.gz 20722 SHA256 71ee4d9816086f603754a4c16da8fd773c590821af386eb8adc2665623089f8c SHA512 047e00e5ff0282729495f39c7cb264837306da46d24e4d95e835d6d0060acd0bfa8f8cedff37ab8c503f267d8c5d42e5af0120cba6260e6eb9dd8c9a3a9dab46 WHIRLPOOL d246a368077e1025517dd59b6c8282b8888c9bdbe75dfa675aaad7cc0e9016b4663bba47da05a930e5e985d299ed2a8e54d7b0e7ffcea6f1c33974c195bc4d10
+DIST xwit_3.4.orig.tar.gz 14557 SHA256 32e7b4929d31209791cab36e083a3fa6076f84b46dafad8642834a57675078f8 SHA512 265114f81ede19e477685373e39deed3cf7cd3fd9dbb445362f34ea96dac6d9686d1c55cf882636f7d02598c83f5ee1ca2688fcbd01f6fc7ef34cac75691df94 WHIRLPOOL b6989175ef4db74d977969b5a22f9f5f4c01ee9457c3d1009273a45b994606dced8f0ed982f19699480a221f636800fdccd0a89ce563193e0af6190aec389a10
diff --git a/x11-misc/xwit/files/xwit-3.4-malloc-includes.patch b/x11-misc/xwit/files/xwit-3.4-malloc-includes.patch
deleted file mode 100644 (file)
index beda933..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
---- a/dsimple.c        1995-10-19 00:59:17.000000000 +0100
-+++ b/dsimple.c        2013-08-03 18:27:16.670506562 +0200
-@@ -5,6 +5,8 @@
- #include <X11/Xutil.h>
- #include <X11/cursorfont.h>
- #include <stdio.h>
-+#include <stdlib.h> /* malloc() */
-+#include <unistd.h> /* exit() */
- /*
-  * Other_stuff.h: Definitions of routines in other_stuff.
-  *
-@@ -46,7 +48,7 @@
- char *Malloc(size)
-      unsigned size;
- {
--      char *data, *malloc();
-+      char *data; /*, *malloc(); */
-       if (!(data = malloc(size)))
-         Fatal_Error("Out of memory!");
-@@ -62,7 +64,7 @@
-         char *ptr;
-         int size;
- {
--      char *new_ptr, *realloc();
-+      char *new_ptr; /*, *realloc(); */
-       if (!ptr)
-         return(Malloc(size));
---- a/xwit.c   1997-10-21 03:32:54.000000000 +0200
-+++ b/xwit.c   2013-08-03 18:38:52.075456902 +0200
-@@ -31,6 +31,8 @@
- #include <X11/Xutil.h>
- #include <X11/Xproto.h>
- #include <stdio.h>
-+#include <stdlib.h> /* atoi() */
-+#include <sys/select.h> /* select() */                                                                                              
- #include <sys/time.h>
- #include "dsimple.h"
-@@ -134,7 +136,7 @@
-     struct timeval tv;
-     tv.tv_sec = ms/1000;
-     tv.tv_usec = (ms%1000)*1000;
--    select(0,(int*)0,(int*)0,(int*)0,&tv);
-+    select(0,0,0,0,&tv);
- }
- /*
diff --git a/x11-misc/xwit/xwit-3.4-r1.ebuild b/x11-misc/xwit/xwit-3.4-r1.ebuild
deleted file mode 100644 (file)
index 758c1a8..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils toolchain-funcs
-
-DESCRIPTION="A collection of simple routines to call some of those X11 functions"
-HOMEPAGE="http://ftp.x.org/contrib/utilities/xwit-3.4.README"
-SRC_URI="http://ftp.x.org/contrib/utilities/${P}.tar.gz"
-
-LICENSE="public-domain HPND"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
-IUSE=""
-
-RDEPEND="x11-libs/libX11"
-DEPEND="${RDEPEND}
-       x11-proto/xproto"
-
-src_prepare() {
-       epatch "${FILESDIR}"/${P}-malloc-includes.patch
-
-       cp -vf "${FILESDIR}"/Makefile .
-
-       tc-export CC
-}
-
-src_install() {
-       dobin xwit
-       newman xwit.man xwit.1
-       dodoc README
-}
index efacade6cb142b61473626cec9dbda3a4c749669..8c371591f848ff429d132a76bf4dc480caae3a97 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -6,7 +6,7 @@ EAPI=2
 inherit eutils toolchain-funcs
 
 DESCRIPTION="A collection of simple routines to call some of those X11 functions"
-HOMEPAGE="http://ftp.x.org/contrib/utilities/xwit-3.4.README"
+HOMEPAGE="https://tracker.debian.org/pkg/xwit"
 SRC_URI="http://ftp.x.org/contrib/utilities/${P}.tar.gz"
 
 LICENSE="public-domain HPND"
diff --git a/x11-misc/xwit/xwit-3.4_p15.ebuild b/x11-misc/xwit/xwit-3.4_p15.ebuild
new file mode 100644 (file)
index 0000000..f7b93a5
--- /dev/null
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit toolchain-funcs
+
+DESCRIPTION="A collection of simple routines to call some of those X11 functions"
+HOMEPAGE="https://tracker.debian.org/pkg/xwit"
+SRC_URI="
+       mirror://debian/pool/main/x/${PN}/${PN}_${PV/_p*/}.orig.tar.gz
+       mirror://debian/pool/main/x/${PN}/${PN}_${PV/_p/-}.debian.tar.gz
+"
+
+LICENSE="public-domain HPND"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/libX11"
+DEPEND="${RDEPEND}
+       x11-proto/xproto"
+
+S=${WORKDIR}/${P/_p*/}.orig
+
+PATCHES=( "${WORKDIR}"/debian/patches )
+
+src_prepare() {
+       default
+       sed -i \
+               -e 's|gcc|${CC}|g' \
+               Makefile || die
+       tc-export CC
+}
+
+src_install() {
+       dobin xwit
+       newman xwit.man xwit.1
+       einstalldocs
+}