diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2014-12-02 03:51:12 +0200 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2014-12-02 03:51:12 +0200 |
commit | 7909b397c0bb431d84bc890504171cc9e242a8ff (patch) | |
tree | 2581b2201253b5e798d6f722c6b72943fa33a662 | |
parent | f71bb82d9f97c2d09b4e5df7b91bb0cc3147c955 (diff) |
Added R packages eclass && qtbase
-rw-r--r-- | dev-qt/qtbase/Manifest | 2 | ||||
-rw-r--r-- | dev-qt/qtbase/qtbase-1.0.4-r1.ebuild | 16 | ||||
-rw-r--r-- | dev-qt/qtbase/qtbase-1.0.4.ebuild | 16 | ||||
-rw-r--r-- | eclass/R-packages.eclass | 50 |
4 files changed, 84 insertions, 0 deletions
diff --git a/dev-qt/qtbase/Manifest b/dev-qt/qtbase/Manifest new file mode 100644 index 00000000..b1967b84 --- /dev/null +++ b/dev-qt/qtbase/Manifest @@ -0,0 +1,2 @@ +DIST cran_qtbase_1.0.4.tar.gz 609730 SHA256 e5780c83eb5f688704676e50970c7c20423e1f43a147af921f16b3c9fda6d10b SHA512 1ed47329212de444a024e0af3f87e9e53444ae828a2a992add86386ff2e2b59da43fd2f08a39683ff8ae5bc1a72a74a4c04ac2e32e0f86d8ee418daf57dea2e0 WHIRLPOOL 7af70d6a36c9a5dd77c7e579270af403339ca5c9879214fbd458630ee5c3a0fa3ff944d90d94800c9f65a561f9944a6f14fa220a6de419e5a2d18fcd285516fc +DIST qtbase_1.0.4-r1.tar.gz 609730 SHA256 e5780c83eb5f688704676e50970c7c20423e1f43a147af921f16b3c9fda6d10b SHA512 1ed47329212de444a024e0af3f87e9e53444ae828a2a992add86386ff2e2b59da43fd2f08a39683ff8ae5bc1a72a74a4c04ac2e32e0f86d8ee418daf57dea2e0 WHIRLPOOL 7af70d6a36c9a5dd77c7e579270af403339ca5c9879214fbd458630ee5c3a0fa3ff944d90d94800c9f65a561f9944a6f14fa220a6de419e5a2d18fcd285516fc diff --git a/dev-qt/qtbase/qtbase-1.0.4-r1.ebuild b/dev-qt/qtbase/qtbase-1.0.4-r1.ebuild new file mode 100644 index 00000000..68ae9873 --- /dev/null +++ b/dev-qt/qtbase/qtbase-1.0.4-r1.ebuild @@ -0,0 +1,16 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit R-packages + +DESCRIPTION='Interface between R and Qt' +SRC_URI="http://cran.r-project.org/src/contrib/qtbase_1.0.4.tar.gz -> qtbase_1.0.4-r1.tar.gz" +LICENSE='GPL-2+' + +RDEPEND="${DEPEND-} + dev-qt/qtcore + dev-util/cmake +" diff --git a/dev-qt/qtbase/qtbase-1.0.4.ebuild b/dev-qt/qtbase/qtbase-1.0.4.ebuild new file mode 100644 index 00000000..c639e3e3 --- /dev/null +++ b/dev-qt/qtbase/qtbase-1.0.4.ebuild @@ -0,0 +1,16 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit R-packages + +DESCRIPTION='Interface between R and Qt' +SRC_URI="http://cran.r-project.org/src/contrib/qtbase_1.0.4.tar.gz -> cran_qtbase_1.0.4.tar.gz" +LICENSE='GPL-2+' + +RDEPEND="${DEPEND-} + dev-qt/qtcore + dev-util/cmake +" diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass new file mode 100644 index 00000000..8544e70c --- /dev/null +++ b/eclass/R-packages.eclass @@ -0,0 +1,50 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils + +EXPORT_FUNCTIONS src_unpack src_prepare src_compile src_install pkg_postinst + +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="byte-compile" + +DEPEND="dev-lang/R" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +R-packages_src_unpack() { + unpack ${A} + mv ${PN//_/.} ${P} +} + +R-packages_src_prepare() { + cd ${P} + epatch_user +} + +R-packages_src_compile() { + MAKEFLAGS="CFLAGS=${CFLAGS// /\\ } CXXFLAGS=${CXXFLAGS// /\\ } FFLAGS=${FFLAGS// /\\ } FCFLAGS=${FCFLAGS// /\\ } LDFLAGS=${LDFLAGS// /\\ }" \ + R CMD INSTALL ${S}/${P} -l . $(use byte-compile && echo "--byte-compile") +} + +R-packages_src_install() { + insinto /usr/$(get_libdir)/R/site-library + doins -r ${PN//_/.} +} + +R-packages_pkg_postinst() { + if [[ "${_UNRESOLVABLE_PACKAGES:-}" ]]; then + # _UNRESOLVABLE_PACKAGES is only set if it has more than zero items + local _max=${#_UNRESOLVABLE_PACKAGES[*]} i= + + einfo "Dependency(-ies):" + for (( i=0; i<${_max}; i++ )); do + einfo "- ${_UNRESOLVABLE_PACKAGES[$i]}" + done + einfo 'are (is) suggested by upstream but could not be found.' + einfo 'Please install it manually from the R interpreter if you need it.' + fi +} |