commit:     294a49e572485cde7b0d2d77307eb193bc987099
Author:     xdch47 <xdch47 <AT> posteo <DOT> de>
AuthorDate: Fri Nov  9 21:46:13 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Fri Nov  9 23:33:14 2018 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=294a49e5

net-misc/whois: musl patch for sha crypt

Package-Manager: Portage-2.3.49, Repoman-2.3.11
RepoMan-Options: --force
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

 net-misc/whois/Manifest                            |  1 +
 net-misc/whois/files/whois-4.7.2-config-file.patch | 12 ++++
 .../whois/files/whois-5.3.0-libidn_automagic.patch | 23 ++++++++
 net-misc/whois/metadata.xml                        |  8 +++
 net-misc/whois/whois-5.2.20.ebuild                 | 64 ++++++++++++++++++++++
 5 files changed, 108 insertions(+)

diff --git a/net-misc/whois/Manifest b/net-misc/whois/Manifest
new file mode 100644
index 0000000..46bee29
--- /dev/null
+++ b/net-misc/whois/Manifest
@@ -0,0 +1 @@
+DIST whois_5.2.20.tar.xz 82336 BLAKE2B 
b10d7e22f41bfb68cdd1264016bbfeeb93436a5c46b0ddcfc79834d0446ea8c21cd8ff95bc440bbe4fda0d5b08a16c50fe9504c98c3de3cf4ce18892203518e1
 SHA512 
3308d9f5562babe007e46b7764718f13c1e7cd8ef7f501161353e4b1b81efacec9742ec25dec3b1cc80940898c785c1920a1aa68af10081f952ebde320075808

diff --git a/net-misc/whois/files/whois-4.7.2-config-file.patch 
b/net-misc/whois/files/whois-4.7.2-config-file.patch
new file mode 100644
index 0000000..da91d5a
--- /dev/null
+++ b/net-misc/whois/files/whois-4.7.2-config-file.patch
@@ -0,0 +1,12 @@
+Enable /etc/whois.conf support.
+
+http://bugs.gentoo.org/show_bug.cgi?id=89417
+
+--- a/config.h
++++ b/config.h
+@@ -13,5 +13,3 @@
+ /* Configuration file */
+-/*
+ #define CONFIG_FILE "/etc/whois.conf"
+-*/
+ 

diff --git a/net-misc/whois/files/whois-5.3.0-libidn_automagic.patch 
b/net-misc/whois/files/whois-5.3.0-libidn_automagic.patch
new file mode 100644
index 0000000..4e01eb5
--- /dev/null
+++ b/net-misc/whois/files/whois-5.3.0-libidn_automagic.patch
@@ -0,0 +1,23 @@
+We don't want libidn(2) being detected automagically.
+Partially reverting upstream stupidity.
+
+--- whois-5.3.0/Makefile
++++ whois-5.3.0/Makefile
+@@ -33,17 +33,9 @@
+ DEFS += -DLOCALEDIR=\"$(BASEDIR)$(prefix)/share/locale\"
+ endif
+ 
+-# libidn support has been autodetected since 5.2.18
+ ifdef HAVE_LIBIDN
+-$(error Please fix your build system to stop defining HAVE_LIBIDN!)
+-endif
+-
+-ifeq ($(shell $(PKG_CONFIG) --exists 'libidn2 >= 2.0.3' || echo NO),)
+ whois_LDADD += $(shell $(PKG_CONFIG) --libs libidn2)
+ DEFS += -DHAVE_LIBIDN2 $(shell $(PKG_CONFIG) --cflags libidn2)
+-else ifeq ($(shell $(PKG_CONFIG) --exists 'libidn' || echo NO),)
+-whois_LDADD += $(shell $(PKG_CONFIG) --libs libidn)
+-DEFS += -DHAVE_LIBIDN $(shell $(PKG_CONFIG) --cflags libidn)
+ endif
+ 
+ ifdef HAVE_ICONV

diff --git a/net-misc/whois/metadata.xml b/net-misc/whois/metadata.xml
new file mode 100644
index 0000000..56c1244
--- /dev/null
+++ b/net-misc/whois/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+<maintainer type="project">
+       <email>[email protected]</email>
+       <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>

diff --git a/net-misc/whois/whois-5.2.20.ebuild 
b/net-misc/whois/whois-5.2.20.ebuild
new file mode 100644
index 0000000..ebbe2d8
--- /dev/null
+++ b/net-misc/whois/whois-5.2.20.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit toolchain-funcs flag-o-matic
+
+MY_P=${P/-/_}
+DESCRIPTION="improved Whois Client"
+HOMEPAGE="https://www.linux.it/~md/software/";
+SRC_URI="mirror://debian/pool/main/w/whois/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc 
x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="iconv idn nls"
+RESTRICT="test" #59327
+
+RDEPEND="iconv? ( virtual/libiconv )
+       idn? ( net-dns/libidn:= )
+       nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+       app-arch/xz-utils
+       >=dev-lang/perl-5
+       nls? ( sys-devel/gettext )"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-4.7.2-config-file.patch
+)
+
+src_prepare() {
+       default
+       if use nls ; then
+               sed -i -e 's:#\(.*pos\):\1:' Makefile || die
+       else
+               sed -i -e '/ENABLE_NLS/s:define:undef:' config.h || die
+
+               # don't generate po files when nls is disabled (bug #419889)
+               sed -i -e '/^all:/s/ pos//' \
+                       -e '/^install:/s/ install-pos//' Makefile || die
+       fi
+}
+
+src_configure() { :;} # expected no-op
+
+src_compile() {
+       unset HAVE_ICONV HAVE_LIBIDN
+       use iconv && export HAVE_ICONV=1
+       use idn && export HAVE_LIBIDN=1
+       use elibc_musl && append-cflags "-DHAVE_GETOPT_LONG -DHAVE_GETADDRINFO 
-DHAVE_SHA_CRYPT -D RANDOM_DEVICE='\"/dev/urandom\"'"
+       tc-export CC
+       emake CFLAGS="${CFLAGS} ${CPPFLAGS}"
+}
+
+src_install() {
+       emake BASEDIR="${ED}" prefix=/usr install
+       insinto /etc
+       doins whois.conf
+       dodoc README debian/changelog
+
+       if [[ ${USERLAND} != "GNU" ]]; then
+               mv "${ED}"/usr/share/man/man1/{whois,mdwhois}.1 || die
+               mv "${ED}"/usr/bin/{whois,mdwhois} || die
+       fi
+}

Reply via email to