mirror of
https://github.com/gentoo-mirror/guru.git
synced 2025-04-18 23:39:00 -04:00
dev-libs/nanopb: new package, add 0.4.9.1, 9999
Signed-off-by: Vincent Ahluwalia <vincentahluwalia@protonmail.com>
This commit is contained in:
parent
fb519e4b42
commit
87f4080654
1
dev-libs/nanopb/Manifest
Normal file
1
dev-libs/nanopb/Manifest
Normal file
@ -0,0 +1 @@
|
|||||||
|
DIST nanopb-0.4.9.1.tar.gz 1186352 BLAKE2B 430b50b433bd9a9e464afb6353740397b7f1187a861f4b1fcfa7188f3537ab94735f9d7fc74cea9df65e3537a539c825b83acee45491a3485d4d7ea13b1f33ad SHA512 1580c94d558f707c88d8d2ddf4aa3bf4ef244ddc07b13e02de7124da8d156fb30a6999bb3c54ff0497abb033e498fb85ea671774f2fb817f55fa64937f537c77
|
14
dev-libs/nanopb/metadata.xml
Normal file
14
dev-libs/nanopb/metadata.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>vincentahluwalia@protonmail.com</email>
|
||||||
|
<name>Vincent Ahluwalia</name>
|
||||||
|
</maintainer>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="github">nanopb/nanopb</remote-id>
|
||||||
|
</upstream>
|
||||||
|
<use>
|
||||||
|
<flag name="pb-malloc">Enable dynamic allocation support in the decoder</flag>
|
||||||
|
</use>
|
||||||
|
</pkgmetadata>
|
52
dev-libs/nanopb/nanopb-0.4.9.1.ebuild
Normal file
52
dev-libs/nanopb/nanopb-0.4.9.1.ebuild
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{10..13} python3_13t )
|
||||||
|
|
||||||
|
inherit cmake flag-o-matic python-single-r1
|
||||||
|
|
||||||
|
DESCRIPTION="plain-C Protocol Buffers for embedded/memory-constrained systems"
|
||||||
|
HOMEPAGE="https://jpa.kapsi.fi/nanopb/ https://github.com/nanopb/nanopb"
|
||||||
|
if [[ ${PV} == 9999 ]]; then
|
||||||
|
inherit git-r3
|
||||||
|
EGIT_REPO_URI="https://github.com/nanopb/nanopb"
|
||||||
|
else
|
||||||
|
SRC_URI="https://github.com/nanopb/nanopb/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="ZLIB"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="+pb-malloc test"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
dev-libs/protobuf
|
||||||
|
${PYTHON_DEPS}
|
||||||
|
"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
test? ( dev-build/scons )
|
||||||
|
${RDEPEND}
|
||||||
|
"
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
use pb-malloc && append-cppflags "-DPB_ENABLE_MALLOC"
|
||||||
|
if is-flagq "-flto" ; then
|
||||||
|
append-cflags "-fno-use-linker-plugin -fwhole-program"
|
||||||
|
fi
|
||||||
|
cmake_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
cd "${S}"/tests
|
||||||
|
scons
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
cmake_src_install
|
||||||
|
python_optimize
|
||||||
|
}
|
52
dev-libs/nanopb/nanopb-9999.ebuild
Normal file
52
dev-libs/nanopb/nanopb-9999.ebuild
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# Copyright 1999-2025 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
PYTHON_COMPAT=( python3_{10..13} python3_13t )
|
||||||
|
|
||||||
|
inherit cmake flag-o-matic python-single-r1
|
||||||
|
|
||||||
|
DESCRIPTION="plain-C Protocol Buffers for embedded/memory-constrained systems"
|
||||||
|
HOMEPAGE="https://jpa.kapsi.fi/nanopb/ https://github.com/nanopb/nanopb"
|
||||||
|
if [[ ${PV} == 9999 ]]; then
|
||||||
|
inherit git-r3
|
||||||
|
EGIT_REPO_URI="https://github.com/nanopb/nanopb"
|
||||||
|
else
|
||||||
|
SRC_URI="https://github.com/nanopb/nanopb/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
|
KEYWORDS="~amd64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="ZLIB"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="+pb-malloc test"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
dev-libs/protobuf
|
||||||
|
${PYTHON_DEPS}
|
||||||
|
"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
test? ( dev-build/scons )
|
||||||
|
${RDEPEND}
|
||||||
|
"
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
use pb-malloc && append-cppflags "-DPB_ENABLE_MALLOC"
|
||||||
|
if is-flagq "-flto" ; then
|
||||||
|
append-cflags "-fno-use-linker-plugin -fwhole-program"
|
||||||
|
fi
|
||||||
|
cmake_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
src_test() {
|
||||||
|
cd "${S}"/tests
|
||||||
|
scons
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
cmake_src_install
|
||||||
|
python_optimize
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user