On Fri, 10 Jun 2016 12:52:40 -0400 NP-Hardass <np-hard...@gentoo.org> wrote:
> On 06/10/2016 06:43 AM, Michał Górny wrote: > > Dnia 9 czerwca 2016 14:19:43 CEST, NP-Hardass <np-hard...@gentoo.org> > > napisał(a): > >> DEPEND="app-arch/xz-utils" > >> fi > >> > >> # @ECLASS-VARIABLE: MATE_TARBALL_SUFFIX > >> # @INTERNAL > >> # @DESCRIPTION: > >> # All projects hosted on mate-desktop.org provide tarballs as tar.xz. > >> # Undefined in live ebuilds. > >> [[ ${PV} != 9999 ]] && : ${MATE_TARBALL_SUFFIX:="xz"} > > > > You should ask upstream to supply .tar.lz instead, so they don't harm their > > users. > > > I can ask, but I don't think I understand what you mean by "harm their > users." It's an internal joke. But I can't find the reference quote right now. > >> # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PN > >> # @DESCRIPTION: > >> # Name of the package as hosted on mate-desktop.org. > >> # Leave unset if package name matches PN. > >> : ${MATE_DESKTOP_ORG_PN:=$PN} > >> > >> # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PV > >> # @DESCRIPTION: > >> # Package version string as listed on mate-desktop.org. > >> # Leave unset if package version string matches PV. > >> : ${MATE_DESKTOP_ORG_PV:=$PV} > >> > >> # @ECLASS-VARIABLE: MATE_BRANCH > >> # @DESCRIPTION: > >> # Major and minor numbers of the version number, unless live. > >> # If live ebuild, will be set to '9999'. > >> if [[ ${PV} == 9999 ]]; then > >> : ${MATE_BRANCH:=9999} > >> else > >> : ${MATE_BRANCH:=$(get_version_component_range 1-2)} > >> fi > > > > Unless I'm missing something, the 1-2 range will return 9999 in live > > version as well. Unless you are trying to avoid the inherit in the live > > ebuild -- then I don't think it's worth the extra code. > > > I will double check and reply again if it is different, but I believe > the concern had been that if there was a major change in a 9999, and I > temporarily revbumped the 9999 to 9999-r1, the 1-2 range would return > 9999-r1 rather then the expected 9999. Errr, but PV shouldn't contain '-r1'... > >> # Set SRC_URI or EGIT_REPO_URI based on whether live > >> if [[ ${PV} == 9999 ]]; then > >> EGIT_REPO_URI=" > >> https://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git > >> git://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git > >> http://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git > > > > Does github actually support http? > > > git clone works, though, I'm unsure if it is redirecting to https. I'll > have to double check on this. Please let me know what you find out. > >> case "${EAPI:-0}" in > >> 5|6) > >> EXPORT_FUNCTIONS src_prepare src_configure src_install > >> pkg_preinst > >> pkg_postinst pkg_postrm > >> ;; > >> *) die "EAPI=${EAPI} is not supported" ;; > > > > It is already dead after the first check. > > > If I drop EAPI 5 as suggested by perfinion, would you recommend keeping > this in a case statement for when future EAPIs are added? No, you can add a case when you need it. > >> } > >> > >> # @FUNCTION: mate_src_prepare > >> # @DESCRIPTION: > >> # Call gnome2_src_prepare to handle environment setup and patching, > >> then > >> # call eautoreconf if necessary > >> mate_src_prepare() { > >> debug-print-function ${FUNCNAME} "$@" > >> > >> local force_autoreconf=${FORCE_AUTORECONF:-false} > >> [[ ${PV} == 9999 ]] && force_autoreconf=true > >> > >> gen_chksum() { > >> find '(' -name 'Makefile.am' \ > >> -o -name 'configure.ac' \ > >> -o -name 'configure.in' ')' \ > >> -exec cksum {} + | sort -k2 > >> } > >> > >> local chksum=$(gen_chksum) > >> > >> gnome2_src_prepare "$@" > >> > >> if ${force_autoreconf} > > > > Don't execute random user-provided data. > > > Not sure I understand. force_autoreconf is a local variable that is > either when the ebuild explicitly says "I want to eautoreconf," when it > is a 9999, as upstream does not provide configured sources in git, or > when patching affects the build system, requiring an autoreconf. But you shouldn't do it the PHP way. Parse the value, not execute it. If one does FORCE_AUTORECONF=1, it won't work. If one does FORCE_AUTORECONF='rm -rf /', it won't work! -- Best regards, Michał Górny <http://dev.gentoo.org/~mgorny/>
pgpi68Ykf9Zig.pgp
Description: OpenPGP digital signature