1 |
On Fri, 10 Jun 2016 12:52:40 -0400 |
2 |
NP-Hardass <NP-Hardass@g.o> wrote: |
3 |
|
4 |
> On 06/10/2016 06:43 AM, Michał Górny wrote: |
5 |
> > Dnia 9 czerwca 2016 14:19:43 CEST, NP-Hardass <NP-Hardass@g.o> napisał(a): |
6 |
> >> DEPEND="app-arch/xz-utils" |
7 |
> >> fi |
8 |
> >> |
9 |
> >> # @ECLASS-VARIABLE: MATE_TARBALL_SUFFIX |
10 |
> >> # @INTERNAL |
11 |
> >> # @DESCRIPTION: |
12 |
> >> # All projects hosted on mate-desktop.org provide tarballs as tar.xz. |
13 |
> >> # Undefined in live ebuilds. |
14 |
> >> [[ ${PV} != 9999 ]] && : ${MATE_TARBALL_SUFFIX:="xz"} |
15 |
> > |
16 |
> > You should ask upstream to supply .tar.lz instead, so they don't harm their users. |
17 |
> > |
18 |
> I can ask, but I don't think I understand what you mean by "harm their |
19 |
> users." |
20 |
|
21 |
It's an internal joke. But I can't find the reference quote right now. |
22 |
|
23 |
> >> # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PN |
24 |
> >> # @DESCRIPTION: |
25 |
> >> # Name of the package as hosted on mate-desktop.org. |
26 |
> >> # Leave unset if package name matches PN. |
27 |
> >> : ${MATE_DESKTOP_ORG_PN:=$PN} |
28 |
> >> |
29 |
> >> # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PV |
30 |
> >> # @DESCRIPTION: |
31 |
> >> # Package version string as listed on mate-desktop.org. |
32 |
> >> # Leave unset if package version string matches PV. |
33 |
> >> : ${MATE_DESKTOP_ORG_PV:=$PV} |
34 |
> >> |
35 |
> >> # @ECLASS-VARIABLE: MATE_BRANCH |
36 |
> >> # @DESCRIPTION: |
37 |
> >> # Major and minor numbers of the version number, unless live. |
38 |
> >> # If live ebuild, will be set to '9999'. |
39 |
> >> if [[ ${PV} == 9999 ]]; then |
40 |
> >> : ${MATE_BRANCH:=9999} |
41 |
> >> else |
42 |
> >> : ${MATE_BRANCH:=$(get_version_component_range 1-2)} |
43 |
> >> fi |
44 |
> > |
45 |
> > 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. |
46 |
> > |
47 |
> I will double check and reply again if it is different, but I believe |
48 |
> the concern had been that if there was a major change in a 9999, and I |
49 |
> temporarily revbumped the 9999 to 9999-r1, the 1-2 range would return |
50 |
> 9999-r1 rather then the expected 9999. |
51 |
|
52 |
Errr, but PV shouldn't contain '-r1'... |
53 |
|
54 |
> >> # Set SRC_URI or EGIT_REPO_URI based on whether live |
55 |
> >> if [[ ${PV} == 9999 ]]; then |
56 |
> >> EGIT_REPO_URI=" |
57 |
> >> https://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git |
58 |
> >> git://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git |
59 |
> >> http://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git |
60 |
> > |
61 |
> > Does github actually support http? |
62 |
> > |
63 |
> git clone works, though, I'm unsure if it is redirecting to https. I'll |
64 |
> have to double check on this. |
65 |
|
66 |
Please let me know what you find out. |
67 |
|
68 |
> >> case "${EAPI:-0}" in |
69 |
> >> 5|6) |
70 |
> >> EXPORT_FUNCTIONS src_prepare src_configure src_install pkg_preinst |
71 |
> >> pkg_postinst pkg_postrm |
72 |
> >> ;; |
73 |
> >> *) die "EAPI=${EAPI} is not supported" ;; |
74 |
> > |
75 |
> > It is already dead after the first check. |
76 |
> > |
77 |
> If I drop EAPI 5 as suggested by perfinion, would you recommend keeping |
78 |
> this in a case statement for when future EAPIs are added? |
79 |
|
80 |
No, you can add a case when you need it. |
81 |
|
82 |
> >> } |
83 |
> >> |
84 |
> >> # @FUNCTION: mate_src_prepare |
85 |
> >> # @DESCRIPTION: |
86 |
> >> # Call gnome2_src_prepare to handle environment setup and patching, |
87 |
> >> then |
88 |
> >> # call eautoreconf if necessary |
89 |
> >> mate_src_prepare() { |
90 |
> >> debug-print-function ${FUNCNAME} "$@" |
91 |
> >> |
92 |
> >> local force_autoreconf=${FORCE_AUTORECONF:-false} |
93 |
> >> [[ ${PV} == 9999 ]] && force_autoreconf=true |
94 |
> >> |
95 |
> >> gen_chksum() { |
96 |
> >> find '(' -name 'Makefile.am' \ |
97 |
> >> -o -name 'configure.ac' \ |
98 |
> >> -o -name 'configure.in' ')' \ |
99 |
> >> -exec cksum {} + | sort -k2 |
100 |
> >> } |
101 |
> >> |
102 |
> >> local chksum=$(gen_chksum) |
103 |
> >> |
104 |
> >> gnome2_src_prepare "$@" |
105 |
> >> |
106 |
> >> if ${force_autoreconf} |
107 |
> > |
108 |
> > Don't execute random user-provided data. |
109 |
> > |
110 |
> Not sure I understand. force_autoreconf is a local variable that is |
111 |
> either when the ebuild explicitly says "I want to eautoreconf," when it |
112 |
> is a 9999, as upstream does not provide configured sources in git, or |
113 |
> when patching affects the build system, requiring an autoreconf. |
114 |
|
115 |
But you shouldn't do it the PHP way. Parse the value, not execute it. |
116 |
If one does FORCE_AUTORECONF=1, it won't work. If one does |
117 |
FORCE_AUTORECONF='rm -rf /', it won't work! |
118 |
|
119 |
-- |
120 |
Best regards, |
121 |
Michał Górny |
122 |
<http://dev.gentoo.org/~mgorny/> |