From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1470656-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id B4383158021
	for <garchives@archives.gentoo.org>; Sat, 24 Dec 2022 07:42:52 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 0EEDEE08BB;
	Sat, 24 Dec 2022 07:42:52 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id CBCF4E08BB
	for <gentoo-commits@lists.gentoo.org>; Sat, 24 Dec 2022 07:42:51 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id EDDA7340E67
	for <gentoo-commits@lists.gentoo.org>; Sat, 24 Dec 2022 07:42:50 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 4FAFA7EF
	for <gentoo-commits@lists.gentoo.org>; Sat, 24 Dec 2022 07:42:49 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1671867697.445456cf74174a03a7eb72c15e0582e4479da005.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dialup/rp-pppoe/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-dialup/rp-pppoe/rp-pppoe-9999.ebuild
X-VCS-Directories: net-dialup/rp-pppoe/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 445456cf74174a03a7eb72c15e0582e4479da005
X-VCS-Branch: master
Date: Sat, 24 Dec 2022 07:42:49 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: c15cded6-df0d-419c-9302-5aad0d291d29
X-Archives-Hash: d062de3a281a9be87ef59a4c3170b0a8

commit:     445456cf74174a03a7eb72c15e0582e4479da005
Author:     Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
AuthorDate: Wed Dec 14 12:09:04 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 24 07:41:37 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=445456cf

net-dialup/rp-pppoe: add 9999

Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
Closes: https://github.com/gentoo/gentoo/pull/28663
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-dialup/rp-pppoe/rp-pppoe-9999.ebuild | 77 ++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/net-dialup/rp-pppoe/rp-pppoe-9999.ebuild b/net-dialup/rp-pppoe/rp-pppoe-9999.ebuild
new file mode 100644
index 000000000000..f296b23837e1
--- /dev/null
+++ b/net-dialup/rp-pppoe/rp-pppoe-9999.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit readme.gentoo-r1
+
+DESCRIPTION="A user-mode PPPoE client and server suite for Linux"
+HOMEPAGE="https://dianne.skoll.ca/projects/rp-pppoe/"
+if [[ $PV = 9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI=https://github.com/dfskoll/rp-pppoe.git
+else
+	SRC_URI="https://dianne.skoll.ca/projects/rp-pppoe/download/${P}.tar.gz
+		https://dev.gentoo.org/~polynomial-c/dist/${PATCHSET}.tar.xz"
+		KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="tk"
+
+S="${S}/src"
+
+RDEPEND="
+	net-dialup/ppp:=
+	sys-apps/iproute2
+	tk? ( dev-lang/tk:= )
+"
+DEPEND=">=sys-kernel/linux-headers-2.6.25
+	elibc_musl? ( net-libs/ppp-defs )
+	${RDEPEND}"
+
+DOC_CONTENTS="Use pppoe-setup to configure your dialup connection"
+
+pkg_setup() {
+	# This is needed in multiple phases
+	PPPD_VER="$(best_version net-dialup/ppp)"
+	PPPD_VER="${PPPD_VER#*/*-}" #reduce it to ${PV}-${PR}
+	PPPD_VER="${PPPD_VER%%-*}" #reduce it to ${PV}
+
+	PPPD_PLUGIN_DIR="/usr/$(get_libdir)/pppd/${PPPD_VER}"
+}
+
+src_configure() {
+	addpredict /dev/ppp
+
+	econf --enable-plugin=/usr/include/pppd
+}
+
+src_compile() {
+	emake PLUGIN_PATH=rp-pppoe.so PLUGIN_DIR="${PPPD_PLUGIN_DIR}"
+
+	if use tk ; then
+		emake -C "${S}/../gui"
+	fi
+}
+
+src_install() {
+	emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}" PLUGIN_DIR="${PPPD_PLUGIN_DIR}" install
+
+	# We don't need this README file here.
+	rm "${ED}${PPPD_PLUGIN_DIR}/README" || die "Error removing ${PPPD_PLUGIN_DIR}/README from installation"
+
+	if use tk ; then
+		emake -C "${S}/../gui" \
+			DESTDIR="${D}" \
+			datadir=/usr/share/doc/${PF}/ \
+			install
+		dosym doc/${PF}/tkpppoe /usr/share/tkpppoe
+	fi
+
+	newinitd "${FILESDIR}"/pppoe-server.initd pppoe-server
+	newconfd "${FILESDIR}"/pppoe-server.confd pppoe-server
+
+	readme.gentoo_create_doc
+}