diff options
Diffstat (limited to 'dev-libs/libsolv')
-rw-r--r-- | dev-libs/libsolv/Manifest | 2 | ||||
-rw-r--r-- | dev-libs/libsolv/libsolv-0.6.36.ebuild | 106 |
2 files changed, 108 insertions, 0 deletions
diff --git a/dev-libs/libsolv/Manifest b/dev-libs/libsolv/Manifest new file mode 100644 index 0000000..c89d873 --- /dev/null +++ b/dev-libs/libsolv/Manifest @@ -0,0 +1,2 @@ +DIST libsolv-0.6.36.tar.gz 647054 BLAKE2B 0052602d977e54dba65398ec123bf070300753d4f7af11304b65b0aaa433b46a0d299ac7a61d777fbd2a87a532aecd4a1d1e14342bc2d53ab9e536fdbd2df188 SHA512 aa1e17130a0f57019656015d55170693a9b3868ab958f6a8ae326b8d0de11defe043eefa089481d22d8ea5469cef8753acb4bcd0b0b8dd0d028fb1e81009d781 +EBUILD libsolv-0.6.36.ebuild 2954 BLAKE2B 4d104c3163b21771f3d8085f4937b0824c22afbc8251cd8c814b0c7b87c8adb320f6e2acc6d5f004ce50efece8d349635a6af300f66b6eab03ff5fe0dcbedb59 SHA512 946e769570854afc379e07002345168e7f713e8b38e1d22d8f53225d121f7051ff3514f7da1afe38d49da8c0ea211fd67fffb73d79c76e3df789eefea29bce96 diff --git a/dev-libs/libsolv/libsolv-0.6.36.ebuild b/dev-libs/libsolv/libsolv-0.6.36.ebuild new file mode 100644 index 0000000..87016d2 --- /dev/null +++ b/dev-libs/libsolv/libsolv-0.6.36.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# DS: We first may need to build with USE="-ruby -python" as otherwise linking fails. + +EAPI="5" + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) +USE_RUBY=( ruby25 ) +RUBY_OPTIONAL=yes + +inherit cmake-utils python-r1 ruby-ng perl-module multilib + +DESCRIPTION="Library for solving packages and reading repositories" +HOMEPAGE="https://doc.opensuse.org/projects/libzypp/HEAD/ https://github.com/openSUSE/libsolv" +SRC_URI="https://github.com/openSUSE/libsolv/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~ppc ~ppc64 x86" +IUSE="bzip2 lzma perl python rpm ruby tcl" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + dev-libs/expat + sys-libs/zlib + bzip2? ( app-arch/bzip2 ) + lzma? ( app-arch/xz-utils ) + perl? ( dev-lang/perl:= ) + python? ( ${PYTHON_DEPS} ) + rpm? ( app-arch/rpm ) + ruby? ( $(ruby_implementations_depend) ) + tcl? ( dev-lang/tcl:0= )" + +DEPEND="${RDEPEND} + perl? ( dev-lang/swig:0 ) + python? ( dev-lang/swig:0 ) + ruby? ( dev-lang/swig:0 ) + tcl? ( dev-lang/swig:0 ) + sys-devel/gettext" + +# The ruby-ng eclass is stupid and breaks this for no good reason. +S="${WORKDIR}/${P}" +#S="${WORKDIR}/all/${P}" + +pkg_setup() { + use perl && perl_set_version + use ruby && ruby-ng_pkg_setup +} + +src_prepare() { + cmake-utils_src_prepare + + # The python bindings are tightly integrated w/cmake. + sed -i \ + -e 's: libsolv: -lsolv:g' \ + bindings/python/CMakeLists.txt || die +} + +src_configure() { + local mycmakeargs=( + -DUSE_VENDORDIRS=1 + -DLIB="$(get_libdir)" + -DENABLE_PYTHON=0 + $(cmake-utils_use_enable bzip2 BZIP2_COMPRESSION) + $(cmake-utils_use_enable lzma LZMA_COMPRESSION) + $(cmake-utils_use_enable perl PERL) + $(cmake-utils_use_enable rpm RPMDB) + $(cmake-utils_use_enable rpm RPMMD) + $(cmake-utils_use_enable ruby RUBY) + $(cmake-utils_use_enable tcl TCL) + ) + + cmake-utils_src_configure + + if use python ; then + # python_foreach_impl will create a unique BUILD_DIR for + # us to run inside of, so no need to manage it ourselves. + mycmakeargs+=( + # Rework the bindings for a minor configure speedup. + -DENABLE_PYTHON=1 + -DENABLE_{PERL,RUBY,TCL}=0 + ) + # Link against the common library so the bindings don't + # have to rebuild it. + LDFLAGS="-L${BUILD_DIR}/src ${LDFLAGS}" \ + python_foreach_impl cmake-utils_src_configure + fi +} + +pysolv_phase_func() { + BUILD_DIR="${BUILD_DIR}/bindings/python" \ + cmake-utils_${EBUILD_PHASE_FUNC} +} + +src_compile() { + cmake-utils_src_compile + + use python && python_foreach_impl pysolv_phase_func +} + +src_install() { + cmake-utils_src_install + + use python && python_foreach_impl pysolv_phase_func + use perl && perl_delete_localpod +} |