diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-12-15 21:34:37 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-12-15 21:34:37 +0000 |
commit | da407288bb9fc771488c3fee13fc2f8561681e66 (patch) | |
tree | f424c3ecbe17ec2f2e75f726f6337bed848b2ccf /dev-libs/libspnav/libspnav-1.1.ebuild | |
parent | dc0ab0fa29dee64ee586cc23ddd306c0ad9ae7dc (diff) |
gentoo auto-resync : 15:12:2022 - 21:34:37
Diffstat (limited to 'dev-libs/libspnav/libspnav-1.1.ebuild')
-rw-r--r-- | dev-libs/libspnav/libspnav-1.1.ebuild | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/dev-libs/libspnav/libspnav-1.1.ebuild b/dev-libs/libspnav/libspnav-1.1.ebuild new file mode 100644 index 000000000000..921b6229777e --- /dev/null +++ b/dev-libs/libspnav/libspnav-1.1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +inherit toolchain-funcs + +MY_PN='spacenav' +DESCRIPTION="libspnav is a replacement for the magellan library with a cleaner API" +HOMEPAGE="http://spacenav.sourceforge.net/" +SRC_URI="https://github.com/FreeSpacenav/libspnav/releases/download/v${PV}/libspnav-${PV}.tar.gz" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="static-libs X" + +CDEPEND="X? ( x11-libs/libX11 )" +RDEPEND="app-misc/spacenavd[X?] + ${CDEPEND}" +DEPEND="${CDEPEND}" + +src_configure() { + local args=( + --disable-opt + --disable-debug + $(use_enable X x11) + ) + econf "${args[@]}" + + # https://bugs.gentoo.org/838349 + sed "/^Libs:/ s,/lib,/$(get_libdir)," -i spnav.pc || die +} + +src_compile() { + local args=( + AR="$(tc-getAR)" + CC="$(tc-getCC)" + incpaths=-I. + libpaths= + ) + emake "${args[@]}" +} + +src_install() { + local args=( + DESTDIR="${D}" + libdir="$(get_libdir)" + ) + emake "${args[@]}" install + + # The custom configure script does not support --disable-static + # and conditionally patching $(lib_a) out of Makefile.in does not + # seem like a very maintainable option, hence we delete the .a file + # after "make install", instead. + use static-libs || find "${D}" -type f -name \*.a -delete +} |