summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Mair-Keimberger <m.mairkeimberger@gmail.com>2018-07-08 18:14:53 +0200
committerMichał Górny <mgorny@gentoo.org>2018-07-20 14:50:55 +0200
commit4c77d2a532c04095b44862b3d579420ede3a4a4f (patch)
treeed193fdfae6e485777ebe9d21c55e23b09d1981a /app-admin/apg
parentsys-apps/usbutils: Remove Py3.x support (diff)
downloadgentoo-4c77d2a532c04095b44862b3d579420ede3a4a4f.tar.gz
gentoo-4c77d2a532c04095b44862b3d579420ede3a4a4f.tar.bz2
gentoo-4c77d2a532c04095b44862b3d579420ede3a4a4f.zip
app-admin/apg: EAPI7, improve ebuild
Closes: https://github.com/gentoo/gentoo/pull/9146
Diffstat (limited to 'app-admin/apg')
-rw-r--r--app-admin/apg/apg-2.3.0b-r6.ebuild48
-rw-r--r--app-admin/apg/files/apg-2.3.0b-cracklib.patch4
-rw-r--r--app-admin/apg/files/apg-2.3.0b-crypt_password.patch8
-rw-r--r--app-admin/apg/files/apg-glibc-2.4.patch4
4 files changed, 56 insertions, 8 deletions
diff --git a/app-admin/apg/apg-2.3.0b-r6.ebuild b/app-admin/apg/apg-2.3.0b-r6.ebuild
new file mode 100644
index 000000000000..34ea033ebee5
--- /dev/null
+++ b/app-admin/apg/apg-2.3.0b-r6.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="Another Password Generator"
+HOMEPAGE="http://www.adel.nursat.kz/apg/"
+SRC_URI="http://www.adel.nursat.kz/apg/download/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="cracklib"
+
+DEPEND="cracklib? ( sys-libs/cracklib )"
+
+src_prepare() {
+ default
+ if use cracklib; then
+ eapply "${FILESDIR}"/${P}-cracklib.patch
+ fi
+ eapply "${FILESDIR}"/${PN}-glibc-2.4.patch
+ eapply "${FILESDIR}"/${P}-crypt_password.patch
+
+ sed -i 's,^#\(APG_CS_CLIBS += -lnsl\)$,\1,' Makefile \
+ || die "Sed failed"
+ if [[ ${CHOST} == *-darwin* ]]; then
+ sed -i 's,^APG_CLIBS += -lcrypt,APG_CLIBS += ,' Makefile \
+ || die "Sed failed"
+ fi
+}
+
+src_compile() {
+ emake \
+ FLAGS="${CFLAGS} ${LDFLAGS}" CFLAGS="${CFLAGS} ${LDFLAGS}" \
+ CC="$(tc-getCC)" standalone
+ emake FLAGS="${CFLAGS} ${LDFLAGS}" CC="$(tc-getCC)" \
+ -C bfconvert
+}
+
+src_install() {
+ dobin apg apgbfm bfconvert/bfconvert
+ dodoc CHANGES INSTALL README THANKS TODO \
+ doc/{APG_TIPS,pronun.txt,rfc0972.txt,rfc1750.txt}
+ doman doc/man/{apg.1,apgbfm.1}
+}
diff --git a/app-admin/apg/files/apg-2.3.0b-cracklib.patch b/app-admin/apg/files/apg-2.3.0b-cracklib.patch
index a1c34a14f5a0..d297495b3211 100644
--- a/app-admin/apg/files/apg-2.3.0b-cracklib.patch
+++ b/app-admin/apg/files/apg-2.3.0b-cracklib.patch
@@ -1,5 +1,5 @@
---- Makefile 2003-08-07 09:40:39.000000000 -0600
-+++ Makefile.cracklib 2004-10-14 07:16:17.288530686 -0600
+--- a/Makefile 2003-08-07 09:40:39.000000000 -0600
++++ b/Makefile 2004-10-14 07:16:17.288530686 -0600
@@ -44,10 +44,10 @@
# If you want to use cracklib for password quality check then you
# must uncomment the folowing 4 lines (you must not do this for WIN32)
diff --git a/app-admin/apg/files/apg-2.3.0b-crypt_password.patch b/app-admin/apg/files/apg-2.3.0b-crypt_password.patch
index 93f3f152a2b4..64a7fdcb37d3 100644
--- a/app-admin/apg/files/apg-2.3.0b-crypt_password.patch
+++ b/app-admin/apg/files/apg-2.3.0b-crypt_password.patch
@@ -1,5 +1,5 @@
---- restrict.c 2007-03-09 13:48:27.000000000 +0300
-+++ restrict.c 2007-03-09 13:49:31.000000000 +0300
+--- a/restrict.c 2007-03-09 13:48:27.000000000 +0300
++++ b/restrict.c 2007-03-09 13:49:31.000000000 +0300
@@ -33,6 +33,9 @@
#include <stdio.h>
#include <stdlib.h>
@@ -10,8 +10,8 @@
#include "restrict.h"
extern struct sym smbl[94];
/*
---- apg.c 2007-03-08 17:32:40.000000000 +0300
-+++ apg.c 2007-03-08 17:34:07.000000000 +0300
+--- a/apg.c 2007-03-08 17:32:40.000000000 +0300
++++ b/apg.c 2007-03-08 17:34:07.000000000 +0300
@@ -100,6 +100,7 @@
#else /* CLISERV */
#if defined(APG_USE_CRACKLIB)
diff --git a/app-admin/apg/files/apg-glibc-2.4.patch b/app-admin/apg/files/apg-glibc-2.4.patch
index be90c6355e66..43b5874fa2b6 100644
--- a/app-admin/apg/files/apg-glibc-2.4.patch
+++ b/app-admin/apg/files/apg-glibc-2.4.patch
@@ -1,5 +1,5 @@
---- restrict.h.orig 2006-03-26 03:33:50.168661936 +0400
-+++ restrict.h 2006-03-26 03:34:10.427582112 +0400
+--- a/restrict.h 2006-03-26 03:33:50.168661936 +0400
++++ b/restrict.h 2006-03-26 03:34:10.427582112 +0400
@@ -33,6 +33,8 @@
#ifndef APG_RESTRICT_H
#define APG_RESTRICT_H 1