dev-libs/libatasmart: Add from Gentoo

It's from Gentoo commit 2f6a333fb9bed9c7ab9b5a49065d157b62e48420
This commit is contained in:
Simon Campion 2024-03-13 13:37:53 +01:00
parent 5d0e408434
commit 2c26b8efa3
3 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,2 @@
DIST libatasmart_0.19-5.debian.tar.xz 6452 BLAKE2B 09bde3d5d79062d4df82e5582e932b6b566a91607086ddd805925d1966cdee4cb4ba43863f4b7d26a98588479b117841050f762d23c6719448635bf1e681b315 SHA512 434b6ef3ea377485ce745e147da8bb72851b2eeabe6f418379511650f0161f15a9ee21f4f0b5f9beb218b99eb417c1aeafdea4640995efbaf45024f40ce71802
DIST libatasmart_0.19.orig.tar.xz 251204 BLAKE2B 7e2a9823c27eee5a41f93464b28236239891349639162c5fdc114c241a70fb39a3046c3de16ce402787cd86e13609fff0578bd26f7a2c994fefe3c9756d45968 SHA512 ec9edb019c477873b01289ba365ad0ed0946505d651c1f6f83a63ef61b3976a5db6439c8a0c74d9a55325db9a3a587ad6f655f8d1af9387b0d08356eccabdb62

View File

@ -0,0 +1,51 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit toolchain-funcs
DESCRIPTION="A small and lightweight parser library for ATA S.M.A.R.T. hard disks"
HOMEPAGE="https://salsa.debian.org/utopia-team/libatasmart"
SRC_URI="mirror://debian/pool/main/liba/${PN}/${PN}_${PV/_p*}.orig.tar.xz
mirror://debian/pool/main/liba/${PN}/${PN}_${PV/_p/-}.debian.tar.xz"
LICENSE="LGPL-2.1"
SLOT="0/4"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
IUSE="static-libs"
RDEPEND="virtual/libudev:="
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
S="${WORKDIR}/${P/_p*}"
src_prepare() {
# https://bugs.gentoo.org/470874
local d="${WORKDIR}/debian/patches"
sed -i -e '/#/d' \
-e "s|^|${d}/|" "${d}"/series || die
eapply $(<"${d}"/series)
eapply_user
}
src_configure() {
econf $(use_enable static-libs static)
}
src_compile() {
if tc-is-cross-compiler; then
tc-export_build_env
emake -C strpool strpool \
CFLAGS="${BUILD_CFLAGS}" \
CPPFLAGS="${BUILD_CPPFLAGS}" \
LDFLAGS="${BUILD_LDFLAGS}"
fi
emake
}
src_install() {
default
find "${ED}" -type f -name "*.la" -delete || die
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>freedesktop-bugs@gentoo.org</email>
</maintainer>
</pkgmetadata>