summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-11-25 12:13:26 +0000
committerSam James <sam@gentoo.org>2023-11-25 12:14:00 +0000
commit3bd92bbf3356a4cba7c86dfbf7e31a6a0c0591a9 (patch)
treeea21ecbfeeb1089bea3b00aab0d3c4c534f7d796 /net-libs
parentsci-libs/openblas: fix USE=index-64bit (diff)
downloadgentoo-3bd92bbf3356a4cba7c86dfbf7e31a6a0c0591a9.tar.gz
gentoo-3bd92bbf3356a4cba7c86dfbf7e31a6a0c0591a9.tar.bz2
gentoo-3bd92bbf3356a4cba7c86dfbf7e31a6a0c0591a9.zip
net-libs/libnet: include pre-generated man pages
Avoid a fairly heavy dep on doxygen given some common sysadmin etc tools depend on this. Ultimately need to fix the upstream build logic but not got time to do it right now. Bug: https://github.com/libnet/libnet/issues/169 Closes: https://bugs.gentoo.org/916025 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/libnet/Manifest1
-rw-r--r--net-libs/libnet/libnet-1.3-r1.ebuild61
2 files changed, 62 insertions, 0 deletions
diff --git a/net-libs/libnet/Manifest b/net-libs/libnet/Manifest
index 53731e2c05bd..a82807e0e478 100644
--- a/net-libs/libnet/Manifest
+++ b/net-libs/libnet/Manifest
@@ -1,2 +1,3 @@
DIST libnet-1.2.tar.gz 649191 BLAKE2B bc463c7869e0327ec2f7663c2e66a27302e368f9846235f6774f36aed66263655badaf980e7e7fb08cc2f9a7f2620129c193bbdd49bbee58401f229a69c50c2a SHA512 84430f24e000eb7728b1fbb5e620716d13d193e8b9e024cf56a08fbeeeaaf56c9122caaf7647f01e6b38b73212e592fa5cc4e8ff56b1d5f5a73aea462e84edd6
+DIST libnet-1.3-docs.tar.xz 21264 BLAKE2B a2c837cde6966a580b5b0cae12bfd8bb33793a5835c3c1ff1ecc273055f56d0f0084b48d7ebe768c1326ed54b67bed5dd23bb9f7524590a2095283950036e848 SHA512 b36bdd7cf9b7acca261004d2308ea6bcf11a67efe581f15ac77548dd02ed1f3e86f1daeb00cef4e774db983e13a95d7f79062258229909cb41886a45f8fd974a
DIST libnet-1.3.tar.gz 595500 BLAKE2B b43f15143e6a1de3350b814d7acd4a41d61eb08e6dfeb729868e55f65c445942ae52905953f3a4fad00402b47fc5119634233ea3ae28806c1869bb34ef6fba9b SHA512 c434327108b61e73b61acc5f2b346d049ab5d58e494db21971368eac733a9a0a3e9d95e0b4523c20629b02ed0feef086c50c582719635f21e980c440d55dd462
diff --git a/net-libs/libnet/libnet-1.3-r1.ebuild b/net-libs/libnet/libnet-1.3-r1.ebuild
new file mode 100644
index 000000000000..af851efcc470
--- /dev/null
+++ b/net-libs/libnet/libnet-1.3-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# TODO: Fix upstream dist tarballs to include man pages!
+# https://github.com/libnet/libnet/issues/169
+#
+# Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-libnet-docs
+# Set to 1 if prebuilt, 0 if not
+# (the construct below is to allow overriding from env for script)
+: ${LIBNET_DOCS_PREBUILT:=1}
+
+LIBNET_DOCS_PREBUILT_DEV=sam
+LIBNET_DOCS_VERSION="${PV}"
+# Default to generating docs (inc. man pages) if no prebuilt; overridden later
+# bug #830088
+LIBNET_DOCS_USEFLAG="+man"
+
+DESCRIPTION="Library for commonly used low-level network functions"
+HOMEPAGE="http://libnet-dev.sourceforge.net/ https://github.com/libnet/libnet"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
+if [[ ${LIBNET_DOCS_PREBUILT} == 1 ]] ; then
+ SRC_URI+=" !man? ( https://dev.gentoo.org/~${LIBNET_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${LIBNET_DOCS_VERSION}-docs.tar.xz )"
+ LIBNET_DOCS_USEFLAG="man"
+fi
+
+LICENSE="BSD BSD-2"
+SLOT="1.1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="${LIBNET_DOCS_USEFLAG} static-libs test"
+# Fails in sandbox, tries to access /proc/self/uid_map.
+RESTRICT="!test? ( test ) test"
+
+BDEPEND="
+ man? ( app-doc/doxygen )
+ test? ( dev-util/cmocka )
+"
+
+DOCS=( ChangeLog.md README.md doc/MIGRATION.md )
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable man doxygen-doc)
+ $(use_enable man doxygen-man)
+ $(use_enable static-libs static)
+ $(use_enable test tests)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ if ! use man && [[ ${LIBNET_DOCS_PREBUILT} == 1 ]] ; then
+ doman "${WORKDIR}"/${PN}-${LIBNET_DOCS_VERSION}-docs/man/*/*.[0-8]
+ fi
+
+ find "${D}" -name '*.la' -delete || die
+}