You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
994 B
53 lines
994 B
3 years ago
|
# Copyright 1999-2020 Gentoo Authors
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=7
|
||
|
|
||
|
inherit toolchain-funcs
|
||
|
|
||
|
DESCRIPTION="Simple implementation of msgpack in C"
|
||
|
HOMEPAGE="https://github.com/libmpack/libmpack"
|
||
|
SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||
|
|
||
|
LICENSE="MIT"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||
|
|
||
|
DEPEND=""
|
||
|
RDEPEND="${DEPEND}"
|
||
|
BDEPEND=""
|
||
|
|
||
|
src_prepare() {
|
||
|
default
|
||
|
|
||
|
# Make compiling verbose
|
||
|
sed -e 's/@$(LIBTOOL)/$(LIBTOOL)/g' -i Makefile || die
|
||
|
|
||
|
# Respect users CFLAGS
|
||
|
sed -e 's/-ggdb//g' -i Makefile || die
|
||
|
sed -e 's/-O3//g' -i .config/release.mk || die
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
local myemakeargs=(
|
||
|
"CC=$(tc-getCC)"
|
||
|
"config=release"
|
||
|
"LIBDIR=/usr/$(get_libdir)"
|
||
|
)
|
||
|
|
||
|
emake "${myemakeargs[@]}" lib-bin
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
local myemakeargs=(
|
||
|
"PREFIX=/usr"
|
||
|
"DESTDIR=${ED}"
|
||
|
"LIBDIR=/usr/$(get_libdir)"
|
||
|
"XLDFLAGS=-shared"
|
||
|
)
|
||
|
|
||
|
emake "${myemakeargs[@]}" install
|
||
|
|
||
|
find "${ED}" -name '*.la' -delete || die
|
||
|
}
|