Skip to content

Commit

Permalink
dev-libs/utfcpp: Add live ebuild.
Browse files Browse the repository at this point in the history
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
  • Loading branch information
Arfrever Frehtes Taifersar Arahesis authored and floppym committed Aug 9, 2019
1 parent 5ebeabb commit 5a5f555
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions dev-libs/utfcpp/utfcpp-9999.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2015-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="7"

inherit cmake-utils

if [[ "${PV}" == "9999" ]]; then
inherit git-r3

EGIT_REPO_URI="https://github.com/nemtrif/utfcpp"
EGIT_SUBMODULES=()
fi

DESCRIPTION="UTF-8 C++ library"
HOMEPAGE="https://github.com/nemtrif/utfcpp"
if [[ "${PV}" == "9999" ]]; then
SRC_URI=""
else
SRC_URI="https://github.com/nemtrif/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
fi

LICENSE="Boost-1.0"
SLOT="0"
KEYWORDS=""
IUSE="test"

BDEPEND=""
DEPEND="test? ( dev-cpp/gtest )"
RDEPEND=""

src_prepare() {
sed -e "/add_subdirectory(extern\/gtest)/d" -i CMakeLists.txt || die
sed -e "s/gtest_main/gtest &/" -i tests/CMakeLists.txt || die

cmake-utils_src_prepare
}

src_configure() {
local mycmakeargs=(
-DUTF8_SAMPLES=OFF
-DUTF8_TESTS=$(usex test ON OFF)
)

cmake-utils_src_configure
}

0 comments on commit 5a5f555

Please sign in to comment.