Fork me on GitHub

How to obtain source code from bitbucket.org

Gentoo Mono Handbook
see also mercurial, vcs-snapshot
It is not very good idea to use mercurial itself, because it will clone the repository.

EHG_REPO_URI
EHG_PROJECT
EHG_REVISION = 40-digit hexadecimal string is treated as a unique revision identifier, see `hg help revisions`
EHG_STORE_DIR = "${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}/hg-src"

Github provides snapshot for each sha1. The same does bitbucket - provides snapshot by id.

inherit vcs-snapshot
SRC_URI=...

Where is described the bitbucket feature for converting revision indentifier to snapshot archive name?

http://stackoverflow.com/a/16930983/1709408
http://stackoverflow.com/a/28424137/1709408
${P}
Package name and version (excluding revision, if any), for example vim-6.3.
${PN}
Package name, for example vim.
${PV}
Package version (excluding revision, if any), for example 6.3. It should reflect the upstream versioning scheme.
# find /usr/portage -iname *.ebuild -print0 | xargs -0 grep -lE "inherit.*vcs-snapshot" | xargs grep -h SRC_URI | grep bitbucket | sed "s/[ \t]*//" | sort | uniq
SRC_URI="https://bitbucket.org/camlspotter/camlimages/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
SRC_URI="https://bitbucket.org/camlspotter/camlimages/get/v4.0.1.tar.bz2 -> ${P}.tar.bz2"
SRC_URI="https://bitbucket.org/cthedot/cssutils/get/${HG_COMMIT}.tar.gz -> ${P}.tar.gz"
SRC_URI="https://bitbucket.org/DavidVilla/python-${PN}/get/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI="https://bitbucket.org/glotzer/${PN}/get/v${PV}.tar.bz2 -> ${P}.tar.bz2"
SRC_URI="https://bitbucket.org/ignitionrobotics/ign-math/get/${PN}2_${PV}.tar.bz2"
SRC_URI="https://bitbucket.org/ignitionrobotics/ign-math/get/${PN}_${PV}.tar.bz2"
SRC_URI="https://bitbucket.org/kovisoft/${PN}/get/${PV}.tar.bz2 -> ${P}.tar.bz2"
SRC_URI="https://bitbucket.org/mmueller2012/${PN}/get/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI="https://bitbucket.org/neilb/csvfix/get/version-${PV}.tar.bz2 -> ${P}.tar.bz2
SRC_URI="https://bitbucket.org/${PN//+/p}/${PN//+/p}/get/v${PV}.tar.bz2 -> ${P}.tar.bz2"
SRC_URI="https://bitbucket.org/sinbad/ogre/get/v${PV//./-}.tar.bz2 -> ${P}.tar.bz2"