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.
83 lines
2.0 KiB
83 lines
2.0 KiB
# Copyright 1999-2013 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libRocket/libRocket-1.2.1.ebuild,v 1.5 2013/09/05 18:29:52 mgorny Exp $
|
|
|
|
EAPI=5
|
|
|
|
PYTHON_COMPAT=( python{2_6,2_7} )
|
|
inherit cmake-utils eutils python-r1
|
|
|
|
DESCRIPTION="A HTML/CSS User Interface library"
|
|
HOMEPAGE="http://librocket.com/"
|
|
SRC_URI="https://github.com/lloydw/libRocket/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
|
|
|
|
LICENSE="MIT"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~x86"
|
|
IUSE="python samples"
|
|
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
|
|
|
RDEPEND="media-libs/freetype
|
|
python? (
|
|
${PYTHON_DEPS}
|
|
dev-libs/boost[python,${PYTHON_USEDEP}]
|
|
)"
|
|
DEPEND="${RDEPEND}"
|
|
|
|
S=${WORKDIR}/${PN}-release-${PV}
|
|
python_BUILD_DIR=${WORKDIR}/${P}_build_python
|
|
CMAKE_USE_DIR="${S}"/Build
|
|
|
|
src_prepare() {
|
|
epatch "${FILESDIR}"/${P}-build.patch
|
|
}
|
|
|
|
src_configure() {
|
|
local mycmakeargs=(
|
|
-DBUILD_PYTHON_BINDINGS=OFF
|
|
$(cmake-utils_use_build samples SAMPLES)
|
|
-DSAMPLES_DIR=/usr/share/${PN}/samples
|
|
)
|
|
|
|
cmake-utils_src_configure
|
|
|
|
if use python ; then
|
|
cfgpybind() {
|
|
local mycmakeargs=(
|
|
-DBUILD_PYTHON_BINDINGS=ON
|
|
-DCMAKE_SKIP_RPATH=YES
|
|
)
|
|
BUILD_DIR="${python_BUILD_DIR}-${EPYTHON}" cmake-utils_src_configure
|
|
}
|
|
einfo "configuring python binding"
|
|
python_foreach_impl cfgpybind
|
|
fi
|
|
}
|
|
|
|
src_compile() {
|
|
cmake-utils_src_compile
|
|
|
|
if use python ; then
|
|
buildpybind() {
|
|
cp "${WORKDIR}"/${P}_build/{libRocketCore*,libRocketControls*} "${python_BUILD_DIR}-${EPYTHON}"/ || die
|
|
BUILD_DIR="${python_BUILD_DIR}-${EPYTHON}" cmake-utils_src_make _rocketcontrols/fast _rocketcore/fast
|
|
}
|
|
einfo "compiling python binding"
|
|
python_foreach_impl buildpybind
|
|
fi
|
|
}
|
|
|
|
src_install() {
|
|
cmake-utils_src_install
|
|
|
|
if use python ; then
|
|
instpybind() {
|
|
python_domodule bin/rocket.py
|
|
exeinto "$(python_get_sitedir)"
|
|
doexe ${python_BUILD_DIR}-${EPYTHON}/_rocket{core,controls}.so
|
|
}
|
|
einfo "installing python binding"
|
|
python_foreach_impl instpybind
|
|
fi
|
|
}
|