diff options
Diffstat (limited to 'net-libs/libcrafter')
-rw-r--r-- | net-libs/libcrafter/Manifest | 7 | ||||
-rw-r--r-- | net-libs/libcrafter/files/libcrafter-0.3_p20171019-libpcap.patch | 59 | ||||
-rw-r--r-- | net-libs/libcrafter/libcrafter-0.3_p20171019.ebuild | 40 | ||||
-rw-r--r-- | net-libs/libcrafter/libcrafter-1.0.ebuild | 42 | ||||
-rw-r--r-- | net-libs/libcrafter/libcrafter-9999.ebuild | 15 |
5 files changed, 157 insertions, 6 deletions
diff --git a/net-libs/libcrafter/Manifest b/net-libs/libcrafter/Manifest index b2090e0a0cdd..890ec8f1ab9a 100644 --- a/net-libs/libcrafter/Manifest +++ b/net-libs/libcrafter/Manifest @@ -1,4 +1,9 @@ +AUX libcrafter-0.3_p20171019-libpcap.patch 1679 BLAKE2B a11d50715c98a087b5a858b3a2205fbef50762e1c553887e3e49e10bca39c88e82dff8110288e97eec3614e38cbfc839f1a2ef93de92495f859654b90daed96b SHA512 9d4e2eb90d74511ca9d192e855e72fa691a725af4db273cae9241d6c19b2340882a7e659c8eba62657ade5aa634f32a7aaa2e00a1ca43a2a1cde67c88743f9c2 DIST libcrafter-0.3.tar.gz 104051 BLAKE2B 6349c260d32ab6f270c05c156dbcf7cf20e85808ce7b8df8747fa9d6e1d413f96c12ff55b3c227952b348f2654cde81b5ca73753da61a9593c3c1699ed96bd7d SHA512 7c396ba942b304dddfaa569adb44697f75568d3ef2ed48dda758e281f3b7c172439309033bbf5498069a4a61a952f93e41af99b129ce874ce76b5ec08da58116 +DIST libcrafter-0.3_p20171019.tar.xz 90152 BLAKE2B 4837a98a45ecdf924a63e916fd2cfdd481624c0cb5b673e0b43eaace328cbcb761ac2d09c50242602730ec2c69ceb8836b7092cbd286c887819db2095ceba749 SHA512 eb53ed641abbce3555f6b7bc3756bc9dc45068bf58320ba0f78dbcefc04cbfe669b12625c81a185fa377bf89e8453b52e0f9bef5c9e1ebfae34bc56eca090438 +DIST libcrafter-1.0.tar.gz 116514 BLAKE2B 6f7adee30b1f7be1bf03fedd39deb53ddc7284934f908ebb056726c31adcaa133405a13c06fa6d35b066992e5ccf24eb971d46a44dcad6932009c1d35fc0c0f7 SHA512 146f34831bf26047be06a0dea406ed0495990fd4256c598b5a4ddea4ab8cc6635dbbe98010cb73ada94ec6bd8be65cdcb3489de7dd9b961711707047f94fb48d EBUILD libcrafter-0.3.ebuild 663 BLAKE2B e05dd9b8312201e93436cb91ad135af32143bfa026fe29fe78ec4a2bf6f6c46f11e3beddf2fff850c585a2e52583b852840165390fe6e9d5291a224971cb10b8 SHA512 aeecf9713732f0a28ab57fe8592ba254b45e4fa92239bb6496d834fd6bf90aff672667da01f851698873751949f72eab3729429a7e1ecaafda3c73f8b7df771d -EBUILD libcrafter-9999.ebuild 642 BLAKE2B faf88eeb20b297e2e835e68df5865dfcc957a09ba7cf1b07995acd72c7b3c6e58c18419659639c75d6f175c320936c6297c664dd6f63f17b803d700399c80d9a SHA512 fe00ffa1ac8a4905d3a71201e5412b74b19e025be2107ce9b5d3aa475d81cb5462504e0fbe58018b518d9796a48082b877b6c012b87294660c098b57e69ba230 +EBUILD libcrafter-0.3_p20171019.ebuild 680 BLAKE2B 6912dbdf074b622b8deec9a55ebfbbc92a2f54d0153bdda02247f3e28196c7b5ac59333d8a52feaf54ad5b350201613bba481fb54842b87231e884730d445ddb SHA512 663184cfc5ee58d3fd55279bd0ee32ab389c9e29006fb0a605fa98de7f0f1388d12d81091de4833d8e594fef1501819ecb6c6b2be73611383bf7ce576abf9c52 +EBUILD libcrafter-1.0.ebuild 786 BLAKE2B 8db66b1266e2ddd24954f0f0f45e7a3b08fcbb1b931411d272da8d248c2f32bd901cd24ee0e8d232357f64af79270f81154a2b580439f656bb0d23d2b05ebebb SHA512 82d315fceac37eb42a91d752939512d632ab5397337b8ed1f48c5c245fc423113dec8cac90e271abb2fd45425eb59dcaa0305ad6e1f7d7ed5d3537d9317f6fcf +EBUILD libcrafter-9999.ebuild 714 BLAKE2B 76cbdfbeb1b4c767933d94cf485267911ca2cff473d1af72f235eb8bf2306c1a102986a1744932c12acebeebaf75c67a2805550fdf6afaaf2d9b52c095608422 SHA512 6e732a478998c07602e04053cc438fe46bb11c18b5684e442c061940c999366e4061233bc35e5a2e545fa0b40c6fd8b15619f3eb2d08eceae6c1e8a1be852b12 MISC metadata.xml 1647 BLAKE2B d6ea5e5df1a27925827497df3022b86f82b0fa5c05e8dc87503b836ade2efb04e0e19b07ccf58b512528ba562caff2be6f14e1d56c5ea0f6040419c708287899 SHA512 6e1ee9e3402a26c3981552ff8fd7193f75dae388fb6d1e59739e1cc4e6f027c995cc68b1984fc13d39d56c152fee6b4b6ee82c9c79f6033627b5e9e0261bdc87 diff --git a/net-libs/libcrafter/files/libcrafter-0.3_p20171019-libpcap.patch b/net-libs/libcrafter/files/libcrafter-0.3_p20171019-libpcap.patch new file mode 100644 index 000000000000..252a71db47c7 --- /dev/null +++ b/net-libs/libcrafter/files/libcrafter-0.3_p20171019-libpcap.patch @@ -0,0 +1,59 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -12,6 +12,8 @@ + AC_PROG_CXX + LT_INIT([disable-static]) + ++PKG_PROG_PKG_CONFIG ++ + AC_CHECK_TYPE(u_int32_t, uint32_t) + AC_CHECK_TYPE(u_int64_t, uint64_t) + AC_CHECK_TYPE(u_int16_t, uint16_t) +@@ -20,46 +22,7 @@ + AC_CANONICAL_HOST + + ## Checks for libpcap +-AC_MSG_CHECKING(for libpcap) +-AC_ARG_WITH(libpcap, +-[ --with-libpcap=DIR use libpcap in DIR], +-[ case "$withval" in +- yes|no) +- AC_MSG_RESULT(no) +- ;; +- *) +- AC_MSG_RESULT($withval) +- if test -f $withval/pcap.h -a -f $withval/libpcap.a; then +- owd=`pwd` +- if cd $withval; then withval=`pwd`; cd $owd; fi +- PCAPINC="-I$withval -I$withval/bpf" +- PCAPLIB="-L$withval -lpcap" +- elif test -f $withval/include/pcap.h -a \ +- -f $withval/include/net/bpf.h -a \ +- -f $withval/lib/libpcap.a; then +- owd=`pwd` +- if cd $withval; then withval=`pwd`; cd $owd; fi +- PCAPINC="-I$withval/include" +- PCAPLIB="-L$withval/lib -lpcap" +- else +- AC_ERROR(pcap.h, net/bpf.h, or libpcap.a not found in $withval) +- fi +- ;; +- esac ], +-[ if test -f ${prefix}/include/pcap.h; then +- PCAPINC="-I${prefix}/include" +- PCAPLIB="-L${prefix}/lib -lpcap" +- elif test -f /usr/include/pcap/pcap.h; then +- PCAPINC="-I/usr/include/pcap" +- PCAPLIB="-lpcap" +- elif test -f /usr/include/pcap.h; then +- PCAPLIB="-lpcap" +- else +- AC_MSG_RESULT(no) +- AC_ERROR(libpcap not found) +- fi +- AC_MSG_RESULT(yes) ] +-) ++PKG_CHECK_MODULES([PCAP], [libpcap], [PCAPINC="${PCAP_CFLAGS}"; PCAPLIB="${PCAP_LIBS}"],AC_MSG_ERROR([libpcap is required])) + AC_SUBST(PCAPINC) + AC_SUBST(PCAPLIB) + AC_CHECK_LIB([pcap], [pcap_set_immediate_mode], diff --git a/net-libs/libcrafter/libcrafter-0.3_p20171019.ebuild b/net-libs/libcrafter/libcrafter-0.3_p20171019.ebuild new file mode 100644 index 000000000000..e9f0d9bec4a9 --- /dev/null +++ b/net-libs/libcrafter/libcrafter-0.3_p20171019.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="A high level C++ network packet sniffing and crafting library" +HOMEPAGE="https://github.com/pellegre/libcrafter" +SRC_URI="https://dev.gentoo.org/~jer/${P}.tar.xz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static-libs" + +RDEPEND=" + net-libs/libpcap +" +DEPEND=" + ${RDEPEND} +" +S=${WORKDIR}/${PN} +PATCHES=( + "${FILESDIR}"/${PN}-0.3_p20171019-libpcap.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf $(use_enable static-libs static) +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-libs/libcrafter/libcrafter-1.0.ebuild b/net-libs/libcrafter/libcrafter-1.0.ebuild new file mode 100644 index 000000000000..7b919920ad00 --- /dev/null +++ b/net-libs/libcrafter/libcrafter-1.0.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit autotools + +DESCRIPTION="A high level C++ network packet sniffing and crafting library" +HOMEPAGE="https://github.com/pellegre/libcrafter" +SRC_URI="https://github.com/pellegre/${PN}/archive/version-${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="static-libs" + +RDEPEND=" + net-libs/libpcap +" +DEPEND=" + ${RDEPEND} +" +PATCHES=( + "${FILESDIR}"/${PN}-0.3_p20171019-libpcap.patch +) +S=${WORKDIR}/${PN}-version-${PV}/${PN} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf $(use_enable static-libs static) +} + +src_install() { + default + + dodoc "${WORKDIR}"/${PN}-version-${PV}/README + + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-libs/libcrafter/libcrafter-9999.ebuild b/net-libs/libcrafter/libcrafter-9999.ebuild index 1aac305c3cc0..16291e489096 100644 --- a/net-libs/libcrafter/libcrafter-9999.ebuild +++ b/net-libs/libcrafter/libcrafter-9999.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 -inherit autotools eutils git-r3 ltprune +EAPI=7 +inherit autotools git-r3 -DESCRIPTION="a high level library for C++ designed to make easier the creation and decoding of network packets" +DESCRIPTION="A high level C++ network packet sniffing and crafting library" HOMEPAGE="https://github.com/pellegre/libcrafter" EGIT_REPO_URI="https://github.com/pellegre/${PN}" @@ -19,10 +19,13 @@ RDEPEND=" DEPEND=" ${RDEPEND} " - +PATCHES=( + "${FILESDIR}"/${PN}-0.3_p20171019-libpcap.patch +) S=${WORKDIR}/${P}/${PN} src_prepare() { + default eautoreconf } @@ -33,5 +36,7 @@ src_configure() { src_install() { default - prune_libtool_files + dodoc "${WORKDIR}"/${P}/README + + find "${ED}" -name '*.la' -delete || die } |