1 |
Dnia 2015-10-10, o godz. 13:51:34 |
2 |
Michał Górny <mgorny@g.o> napisał(a): |
3 |
|
4 |
> Dnia 2015-10-10, o godz. 11:31:45 |
5 |
> "Manuel Rüger" <mrueg@g.o> napisał(a): |
6 |
> |
7 |
> > commit: 9d15a1c12b3c4f98445a45c051733eb2a67fdb28 |
8 |
> > Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
9 |
> > AuthorDate: Sat Oct 10 11:30:54 2015 +0000 |
10 |
> > Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
11 |
> > CommitDate: Sat Oct 10 11:30:54 2015 +0000 |
12 |
> > URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d15a1c1 |
13 |
> > |
14 |
> > dev-libs/libgit2: Version bump |
15 |
> > |
16 |
> > Package-Manager: portage-2.2.23 |
17 |
> |
18 |
> Pretty much picking up a random commit to point out a common mistake. |
19 |
|
20 |
(removed mrueg@ from CC as he doesn't wish to be notified of QA issues |
21 |
with his commits) |
22 |
|
23 |
> > [...] |
24 |
> > |
25 |
> > +src_configure() { |
26 |
> > + local mycmakeargs=( |
27 |
> > + -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)" |
28 |
> > + $(cmake-utils_use_build test CLAR) |
29 |
> > + $(cmake-utils_use_enable trace TRACE) |
30 |
> |
31 |
> The second argument is redundant. cmake-utils has some internal magic |
32 |
> to uppercase stuff, so trace->TRACE happens automagically. |
33 |
|
34 |
Kensington from KDE team just asked me not to promote this automagic |
35 |
feature. Therefore, only suggestion about usex holds. |
36 |
|
37 |
> |
38 |
> Of course, some of us (like me) really hate unexpected magic like this. |
39 |
> Then, it's more readable (and often shorter) to use: |
40 |
> |
41 |
> -DENABLE_TRACE=$(usex trace) |
42 |
> |
43 |
> [just to be clear, yes/no returned by usex is as good as ON/OFF for |
44 |
> cmake] |
45 |
> |
46 |
> > + $(cmake-utils_use_use gssapi GSSAPI) |
47 |
> > + $(cmake-utils_use_use ssh SSH) |
48 |
> > + $(cmake-utils_use threads THREADSAFE) |
49 |
> > + ) |
50 |
> |
51 |
> For comparison: |
52 |
> |
53 |
> local mycmakeargs=( |
54 |
> -DLIB_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)" |
55 |
> -DBUILD_CLAR=$(usex test) |
56 |
> -DENABLE_TRACE=$(usex trace) |
57 |
> -DUSE_GSSAPI=$(usex gssapi) |
58 |
> -DUSE_SSH=$(usex ssh) |
59 |
> -DTHREADSAFE=$(usex threads) |
60 |
> ) |
61 |
> |
62 |
> Which one is shorter and less ambiguous? |
63 |
> |
64 |
> > [...] |
65 |
> |
66 |
|
67 |
|
68 |
|
69 |
-- |
70 |
Best regards, |
71 |
Michał Górny |
72 |
<http://dev.gentoo.org/~mgorny/> |