# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="5" [[ ${PV} = *9999* ]] && VCS_ECLASS="git-2" || VCS_ECLASS="" inherit cmake-utils ${VCS_ECLASS} DESCRIPTION="Asynchronous HTTP server framework written in C" HOMEPAGE="https://github.com/kellabyte/Haywire" EGIT_REPO_URI="https://github.com/kellabyte/Haywire.git" LICENSE="Apache-2.0" SLOT="0" if [[ ${PV} == *9999* ]] ; then KEYWORDS="" else KEYWORDS="~amd64 ~x86" fi IUSE="debug static-libs" RDEPEND=" dev-libs/libuv " DEPEND="${RDEPEND}" src_prepare() { sed -i \ -e 's/-Weffc++/-fPIC/' \ -e '/add_definitions(-Weffc++)/d' \ -e '/.*Hello world sample.*/,$d' \ CMakeLists.txt || die if ! use static-libs; then sed -i -e '/add_library(haywire_static STATIC.*/d' \ CMakeLists.txt || die fi sed -i \ -e "$ afile( GLOB includes \${CMAKE_CURRENT_SOURCE_DIR}/include/*.h )" \ -e "$ ainstall( FILES \${includes} DESTINATION include/${PN} )" \ -e "$ aset_target_properties( haywire_shared PROPERTIES OUTPUT_NAME haywire )" \ -e "$ ainstall( TARGETS haywire_shared DESTINATION lib )" \ CMakeLists.txt || die if use static-libs; then sed -i \ -e "$ aset_target_properties( haywire_static PROPERTIES OUTPUT_NAME haywire )" \ -e "$ ainstall( TARGETS haywire_static DESTINATION lib )" \ CMakeLists.txt || die fi cmake-utils_src_prepare } src_configure() { if ! use debug; then mycmakeargs+=( -DCMAKE_BUILD_TYPE=Release ) fi cmake-utils_src_configure }