overlay/x11-libs/libui/libui-0.4.1.ebuild

54 lines
886 B
Bash

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DESCRIPTION="A cross platform UI library in C"
HOMEPAGE="https://github.com/andlabs/libui"
SRC_URI="https://github.com/andlabs/libui/archive/alpha4.1.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="
>=x11-libs/gtk+-3.0.0
x11-libs/libX11
x11-libs/libxcb
virtual/libffi
"
BDEPEND="
${DEPEND}
sys-devel/make
sys-devel/gcc
dev-util/cmake
dev-util/meson
dev-util/ninja
"
src_unpack() {
if [[ -n ${A} ]]; then
unpack ${A}
fi
mv libui-alpha4.1 libui-0.4.1 || die "rename source dir failed"
}
src_compile() {
mkdir -p build || die "could not make build dir"
cd build
cmake .. || die "cmake failed"
make || die "make failed"
}
src_install() {
dolib.so build/out/libui.so
dolib.so build/out/libui.so.0
doheader ui.h
doheader ui_unix.h
}