Gentoo Archives: gentoo-commits

From: Sergey Popov <pinkbyte@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dialup/accel-ppp/
Date: Sun, 30 Oct 2022 13:09:18
Message-Id: 1667135330.80eb7853b6469f332b15795a354dcdfa62de0a55.pinkbyte@gentoo
1 commit: 80eb7853b6469f332b15795a354dcdfa62de0a55
2 Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 30 13:08:50 2022 +0000
4 Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 30 13:08:50 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80eb7853
7
8 net-dialup/accel-ppp: version bump
9
10 Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>
11
12 net-dialup/accel-ppp/Manifest | 1 +
13 .../accel-ppp/accel-ppp-1.12.0_p20220830.ebuild | 113 +++++++++++++++++++++
14 2 files changed, 114 insertions(+)
15
16 diff --git a/net-dialup/accel-ppp/Manifest b/net-dialup/accel-ppp/Manifest
17 index bf502e82b4ff..6e5de43cd274 100644
18 --- a/net-dialup/accel-ppp/Manifest
19 +++ b/net-dialup/accel-ppp/Manifest
20 @@ -1 +1,2 @@
21 DIST accel-ppp-1.12.0_p20210430.tar.bz2 1662172 BLAKE2B 7c9da06ca704d63afb16bc8d2bc64541e25d31a062a948c3014f340684a38c7ba55d15eba3458ced90b088788228f97553105fd5d0aebbb1e61fb1b1075ae521 SHA512 de690a44ebaad31c63ec604c306e3d5bc63bd02ea2c17a435c2166ddcc8a3c06b86d72d6ebd88d906093583345962569493231e1657f222d4e66d93bf1d0ca41
22 +DIST accel-ppp-1.12.0_p20220830.tar.bz2 1667889 BLAKE2B a6432e29953214202dc67822f358c12ade36eda3e1aaa24e8a2f427ac00ae8192216c76620f3c2946bcf88c95f6167ae9c27ce4a1895c36232110cd73c575a36 SHA512 f6e0baf7dcbf66d3d9eadffeb33216d73d6aa9eef461487d51a3811f042229b38bfec5f192742eb51cc7cfedd0a64ad02a3431bfac91ae37a9aab8c910fdcfa4
23
24 diff --git a/net-dialup/accel-ppp/accel-ppp-1.12.0_p20220830.ebuild b/net-dialup/accel-ppp/accel-ppp-1.12.0_p20220830.ebuild
25 new file mode 100644
26 index 000000000000..8ea237aff3e1
27 --- /dev/null
28 +++ b/net-dialup/accel-ppp/accel-ppp-1.12.0_p20220830.ebuild
29 @@ -0,0 +1,113 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +LUA_COMPAT=( lua5-1 )
36 +
37 +inherit cmake flag-o-matic linux-info linux-mod lua-single
38 +
39 +DESCRIPTION="High performance PPTP, PPPoE and L2TP server"
40 +HOMEPAGE="https://sourceforge.net/projects/accel-ppp/"
41 +SRC_URI="https://dev.gentoo.org/~pinkbyte/distfiles/snapshots/${P}.tar.bz2"
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~x86"
46 +IUSE="debug doc ipoe libtomcrypt lua postgres radius shaper snmp valgrind"
47 +
48 +RDEPEND="!libtomcrypt? ( dev-libs/openssl:0= )
49 + libtomcrypt? ( dev-libs/libtomcrypt:0= )
50 + lua? ( ${LUA_DEPS} )
51 + postgres? ( dev-db/postgresql:* )
52 + snmp? ( net-analyzer/net-snmp )
53 + dev-libs/libpcre"
54 +DEPEND="${RDEPEND}
55 + valgrind? ( dev-util/valgrind )"
56 +PDEPEND="net-dialup/ppp-scripts"
57 +
58 +DOCS=( README )
59 +
60 +CONFIG_CHECK="~L2TP ~PPPOE ~PPTP"
61 +
62 +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )
63 + valgrind? ( debug )"
64 +
65 +PATCHES=(
66 + "${FILESDIR}/${PN}-1.11.1-socklen.patch"
67 +)
68 +
69 +S="${WORKDIR}"
70 +
71 +pkg_setup() {
72 + if use ipoe; then
73 + linux-mod_pkg_setup
74 + set_arch_to_kernel
75 + else
76 + linux-info_pkg_setup
77 + fi
78 + use lua && lua-single_pkg_setup
79 +}
80 +
81 +src_prepare() {
82 + sed -i -e "/mkdir/d" \
83 + -e "s: RENAME accel-ppp.conf.dist::" accel-pppd/CMakeLists.txt || die 'sed on accel-pppd/CMakeLists.txt failed'
84 +
85 + # Do not install kernel modules like that - breaks sandbox!
86 + sed -i -e '/modules_install/d' \
87 + drivers/ipoe/CMakeLists.txt \
88 + drivers/vlan_mon/CMakeLists.txt || die
89 +
90 + # Fix version
91 + sed -i -e "s/1.11/${PV}/" drivers/ipoe/ipoe.c || die
92 + sed -i -e "s/1.11/${PV}/" drivers/vlan_mon/vlan_mon.c || die
93 +
94 + # Bug #549918
95 + append-ldflags -Wl,-z,lazy
96 +
97 + cmake_src_prepare
98 +}
99 +
100 +src_configure() {
101 + local libdir="$(get_libdir)"
102 + local mycmakeargs=(
103 + -DLIB_SUFFIX="${libdir#lib}"
104 + -DBUILD_IPOE_DRIVER="$(usex ipoe)"
105 + -DBUILD_PPTP_DRIVER=no
106 + -DBUILD_VLAN_MON_DRIVER="$(usex ipoe)"
107 + -DCRYPTO="$(usex libtomcrypt TOMCRYPT OPENSSL)"
108 + -DLOG_PGSQL="$(usex postgres)"
109 + -DLUA="$(usex lua TRUE FALSE)"
110 + -DMEMDEBUG="$(usex debug)"
111 + -DNETSNMP="$(usex snmp)"
112 + -DRADIUS="$(usex radius)"
113 + -DSHAPER="$(usex shaper)"
114 + $(use debug && echo "-DVALGRIND=$(usex valgrind)")
115 + )
116 + cmake_src_configure
117 +}
118 +
119 +src_compile() {
120 + cmake_src_compile
121 +}
122 +
123 +src_install() {
124 + if use ipoe; then
125 + local MODULE_NAMES="ipoe(accel-ppp:${BUILD_DIR}/drivers/ipoe/driver) vlan_mon(accel-ppp:${BUILD_DIR}/drivers/vlan_mon/driver)"
126 + linux-mod_src_install
127 + fi
128 +
129 + cmake_src_install
130 +
131 + use doc && dodoc -r rfc
132 +
133 + if use snmp; then
134 + insinto /usr/share/snmp/mibs
135 + doins accel-pppd/extra/net-snmp/ACCEL-PPP-MIB.txt
136 + fi
137 +
138 + newinitd "${FILESDIR}"/${PN}.initd ${PN}d
139 + newconfd "${FILESDIR}"/${PN}.confd ${PN}d
140 +
141 + keepdir /var/log/accel-ppp
142 +}