src_prepare-overlay/media-libs/opentimelineio/opentimelineio-0.15.ebuild

83 lines
2.2 KiB
Bash
Raw Normal View History

# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Open Source API and interchange format for editorial timeline information."
HOMEPAGE="https://opentimeline.io"
if [[ "${PV}" == "9999" ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/AcademySoftwareFoundation/OpenTimelineIO.git"
EGIT_SUBMODULES="src/deps/{any,optional-lite,rapidjson}"
else
MY_PN="OpenTimelineIO"
ANY_COMMIT="bfc77f2e4be6e9a093dd645ef3f1aa30620c9205"
OPTIONAL_LITE_COMMIT="be720ebfd7add22abe60e49602735de9231105d0"
RAPIDJSON_COMMIT="06d58b9e848c650114556a23294d0b6440078c61"
SRC_URI="
https://github.com/AcademySoftwareFoundation/${MY_PN}/archive/refs/tags/v${PV}.tar.gz
-> ${P}.tar.gz
https://github.com/thelink2012/any/archive/${ANY_COMMIT}.tar.gz
-> any-${ANY_COMMIT}.tar.gz
https://github.com/martinmoene/optional-lite/archive/${OPTIONAL_LITE_COMMIT}.tar.gz
-> optional-lite-${OPTIONAL_LITE_COMMIT}.tar.gz
https://github.com/Tencent/rapidjson/archive/${RAPIDJSON_COMMIT}.tar.gz
-> rapidjson-${RAPDIJSON_COMMIT}.tar.gz
"
S="${WORKDIR}/${MY_PN}-${PV}"
KEYWORDS="~amd64"
fi
LICENSE="Apache-2.0"
SLOT="0"
DEPEND="
|| (
dev-libs/imath
media-libs/ilmbase
)
"
RDEPEND="${DEPEND}"
BDEPEND=""
#TODO: python
src_prepare() {
if [[ "${PV}" != "9999" ]]; then
rmdir "${S}/src/deps/"{any,optional-lite,rapidjson} || die
mv "${WORKDIR}/any-${ANY_COMMIT}" "${S}/src/deps/any" || die
mv "${WORKDIR}/optional-lite-${OPTIONAL_LITE_COMMIT}" "${S}/src/deps/optional-lite" || die
mv "${WORKDIR}/rapidjson-${RAPIDJSON_COMMIT}" "${S}/src/deps/rapidjson" || die
fi
eapply_user
sed -i \
"s|\(set(OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR \"\${CMAKE_INSTALL_PREFIX}/\)lib\")|\1$(get_libdir)\")|" \
CMakeLists.txt || die
cmake_src_prepare
}
src_configure() {
local mycmakeargs=(
-DOTIO_CXX_INSTALL=ON
-DOTIO_PYTHON_INSTALL=OFF
-DOTIO_DEPENDENCIES_INSTALL=ON
-DOTIO_INSTALL_PURE_MODULES=OFF
-DOTIO_INSTALL_COMMANDLINE_TOOLS=ON
-DOTIO_INSTALL_CONTRIB=OFF
-DOTIO_SHARED_LIBS=ON
-DOTIO_CXX_COVERAGE=OFF
-DOTIO_CXX_EXAMPLES=OFF
-DOTIO_AUTOMATIC_SUBMODULES=OFF
-DOTIO_FIND_IMATH=ON
)
cmake_src_configure
}