diff options
Diffstat (limited to 'www-apps/isso/isso-9999.ebuild')
| -rw-r--r-- | www-apps/isso/isso-9999.ebuild | 54 |
1 files changed, 40 insertions, 14 deletions
diff --git a/www-apps/isso/isso-9999.ebuild b/www-apps/isso/isso-9999.ebuild index c442e2d2..2812aee9 100644 --- a/www-apps/isso/isso-9999.ebuild +++ b/www-apps/isso/isso-9999.ebuild @@ -20,6 +20,10 @@ PYTHON_COMPAT=( python2_7 ) if [[ $PV == *9999* ]]; then inherit distutils-r1 git-r3 EGIT_REPO_URI=https://github.com/posativ/isso.git + JS_REPO_URIS=( https://github.com/jrburke/almond.git + https://github.com/jrburke/r.js.git + https://github.com/requirejs/text.git ) + VCS_DEPEND="dev-vcs/git[curl]" else inherit distutils-r1 SRC_URI=mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz @@ -49,34 +53,56 @@ LIBDEPEND="dev-python/html5lib[${PYTHON_USEDEP}] 'python3*')" HDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" if [[ ${PV} == *9999* ]]; then - HDEPEND+=" dev-ruby/sass + HDEPEND+=" ${VCS_DEPEND} + dev-ruby/sass net-libs/nodejs - net-misc/wget doc? ( dev-python/sphinx )" fi DEPEND="${HDEPEND}\ ${LIBDEPEND}" RDEPEND="${LIBDEPEND}" -python_prepare_all() { +src_fetch() { + if [[ ${PV} == *9999* ]]; then + git-r3_src_fetch + for EGIT_REPO_URI in "${JS_REPO_URIS[@]}"; do + git-r3_src_fetch + done + else + default + fi +} + +src_unpack() { + if [[ ${PV} == *9999* ]]; then + git-r3_src_unpack + for EGIT_REPO_URI in "${JS_REPO_URIS[@]}"; do + 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 + + # TODO: Consider building r.js + cp "${WORKDIR}"/r.js.git/dist/r.js "${S}"/bin/ || die + else + default + fi +} + +src_compile() { if [[ ${PV} == *9999* ]]; then mkdir -p isso/css || die scss isso/css/isso.scss isso/css/isso.css || die - #TODO: This sucks. - mkdir -p isso/js/components/{requirejs-text,almond} || die - wget -O isso/js/components/requirejs-text/text.js https://raw.github.com/requirejs/text/master/text.js || die - wget -O isso/js/components/almond/almond.js https://raw.github.com/jrburke/almond/master/almond.js || die - wget -O "${T}"/r.js https://raw.github.com/jrburke/r.js/master/dist/r.js || die - - node "${T}"/r.js -o isso/js/build.embed.js || die - node "${T}"/r.js -o isso/js/build.count.js || die + node bin/r.js -o isso/js/build.embed.js || die + node bin/r.js -o isso/js/build.count.js || die if use debug; then - node "${T}"/r.js -o isso/js/build.embed.js optimize="none" out="isso/js/embed.dev.js" || die - node "${T}"/r.js -o isso/js/build.count.js optimize="none" out="isso/js/count.dev.js" || die + node bin/r.js -o isso/js/build.embed.js optimize="none" out="isso/js/embed.dev.js" || die + node bin/r.js -o isso/js/build.count.js optimize="none" out="isso/js/count.dev.js" || die fi fi - distutils-r1_python_prepare_all + distutils-r1_src_compile } python_compile_all() { |
