summaryrefslogtreecommitdiff
path: root/www-apps/isso/isso-9999.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'www-apps/isso/isso-9999.ebuild')
-rw-r--r--www-apps/isso/isso-9999.ebuild40
1 files changed, 31 insertions, 9 deletions
diff --git a/www-apps/isso/isso-9999.ebuild b/www-apps/isso/isso-9999.ebuild
index f11766da..fec2a933 100644
--- a/www-apps/isso/isso-9999.ebuild
+++ b/www-apps/isso/isso-9999.ebuild
@@ -22,11 +22,20 @@ if [[ $PV == *9999* ]]; then
EGIT_REPO_URI=https://github.com/posativ/${PN}.git
JS_REPO_URIS=( https://github.com/jrburke/almond.git
https://github.com/jrburke/r.js.git
- https://github.com/requirejs/text.git )
+ https://github.com/requirejs/text.git
+ https://github.com/requirejs/domReady.git )
VCS_DEPEND="dev-vcs/git[curl]"
else
inherit user distutils-r1
- SRC_URI="https://github.com/posativ/${PN}/archive/${PV}.tar.gz"
+ ALMOND_PV=0.2.9
+ RJS_PV=2.1.11
+ TEXT_PV=2.0.10
+ DOMREADY_PV=2.0.1
+ SRC_URI="https://github.com/posativ/${PN}/archive/${PV}.tar.gz
+ https://github.com/jrburke/almond/archive/${ALMOND_PV}.tar.gz -> almond-${ALMOND_PV}.tar.gz
+ https://github.com/jrburke/r.js/archive/${RJS_PV}.tar.gz -> r.js-${RJS_PV}.tar.gz
+ https://github.com/requirejs/text/archive/${TEXT_PV}.tar.gz -> requirejs-text-${TEXT_PV}.tar.gz
+ https://github.com/requirejs/domReady/archive/${DOMREADY_PV}.tar.gz -> requirejs-domReady-${DOMREADY_PV}.tar.gz"
fi
DESCRIPTION="lightweight Disqus alternative"
@@ -61,6 +70,19 @@ RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
pkg_setup() {
enewuser ${PN}
+
+ if [[ ${PV} == *9999* ]]; then
+ TEXT_D=${WORKDIR}/text.git
+ ALMOND_D=${WORKDIR}/almond.git
+ RJS_D=${WORKDIR}/r.js.git
+ DOMREADY_D=${WORKDIR}/domReady.git
+ else
+ TEXT_D=${WORKDIR}/text-${TEXT_PV}
+ ALMOND_D=${WORKDIR}/almond-${ALMOND_PV}
+ RJS_D=${WORKDIR}/r.js-${RJS_PV}
+ DOMREADY_D=${WORKDIR}/domReady-${DOMREADY_PV}
+ fi
+ RJS=${RJS_D}/r.js
}
src_fetch() {
@@ -82,20 +104,20 @@ src_unpack() {
unset ${PN}_LIVE_REPO;
EGIT_CHECKOUT_DIR=${WORKDIR}/${EGIT_REPO_URI##*/} git-r3_src_unpack
); done
- mkdir -p "${S}"/isso/js/components/{requirejs-text,almond} || die
- cp "${WORKDIR}"/text.git/text.js "${S}"/isso/js/components/requirejs-text/ || die
- cp "${WORKDIR}"/almond.git/almond.js "${S}"/isso/js/components/almond/ || die
else
default
fi
+ mkdir -p "${S}"/isso/js/components/{requirejs-text,almond,requirejs-domready} || die
+ cp "${TEXT_D}"/text.js "${S}"/isso/js/components/requirejs-text/ || die
+ cp "${ALMOND_D}"/almond.js "${S}"/isso/js/components/almond/ || die
+ cp "${DOMREADY_D}"/domReady.js "${S}"/isso/js/components/requirejs-domready/ || die
}
src_compile() {
# build r.js
- pushd "${WORKDIR}"/r.js.git 2>/dev/null
+ pushd "${RJS_D}" 2>/dev/null || die
node dist.js || die
- popd 2>/dev/null
- local RJS=${WORKDIR}/r.js.git/r.js
+ popd 2>/dev/null || die
# generate css
scss isso/css/isso.scss isso/css/isso.css || die
@@ -122,7 +144,7 @@ src_compile() {
python_test() {
# doctests fail, require https://github.com/gnublade/doctest-ignore-unicode
- nosetests \
+ PYTHONPATH="${BUILD_DIR}:${PYTHONPATH}" nosetests \
--with-coverage --cover-package=isso \
isso/ specs/ \
|| die "tests failed"