1 |
kde5-functions.eclass |
2 |
|
3 |
> inherit versionator |
4 |
|
5 |
versionator doesn't export any phase functions so it can stay inside the |
6 |
_KDE5_FUNCTIONS_ECLASS conditional block. |
7 |
|
8 |
> case ${EAPI:-0} in |
9 |
|
10 |
I believe :-0 is unnecessary here, "*)" will match anyway, but it doesn't |
11 |
hurt either. |
12 |
|
13 |
> *) die "EAPI=${EAPI} is not supported" ;; |
14 |
|
15 |
Here ${EAPI:-0} is needed instead. |
16 |
|
17 |
> if [[ ${CATEGORY} = kde-base ]]; then |
18 |
> debug-print "${ECLASS}: KDEBASE ebuild recognized" |
19 |
> KDEBASE=kde-base |
20 |
> elif [[ ${CATEGORY} = kde-frameworks ]]; then |
21 |
> debug-print "${ECLASS}: KDEFRAMEWORKS ebuild recognized" |
22 |
> KDEBASE=kde-frameworks |
23 |
> elif [[ ${KMNAME-${PN}} = kdevelop ]]; then |
24 |
> debug-print "${ECLASS}: KDEVELOP ebuild recognized" |
25 |
> KDEBASE=kdevelop |
26 |
> fi |
27 |
|
28 |
Can you move the print after the if-fi block to avoid duplication? |
29 |
debug-print "${ECLASS}: ${KDEBASE} ebuild recognized" |
30 |
|
31 |
> case ${KDE_SCM} in |
32 |
> svn|git) ;; |
33 |
|
34 |
I thought ":" was necessary for syntax reasons but apparently it's not. You |
35 |
may want to add it anyway for consistency with the previous case statement. |
36 |
|
37 |
> if [[ -a "CMakeLists.txt" ]]; then |
38 |
|
39 |
Unnecessary quoting. Also, -e is more common than -a |
40 |
|
41 |
> sed -e |
42 |
"/add_subdirectory[[:space:]]*([[:space:]]*${1}[[:space:]]*)/s/^/#DONOTCOMPILE |
43 |
/" \ |
44 |
|
45 |
What if ${1} contains slashes? |
46 |
|
47 |
> [[ -z ${1} ]] && die "Missing parameter" |
48 |
|
49 |
Sanity checking of arguments should be done at the beginning of the |
50 |
function body. Also, is $2 allowed to be empty? |
51 |
|
52 |
> # @FUNCTION: add_frameworks_dep |
53 |
|
54 |
Add @USAGE eclass doc. |
55 |
|
56 |
> local ver=${1:-${PV}} |
57 |
> local major=$(get_major_version ${ver}) |
58 |
> local minor=$(get_version_component_range 2 ${ver}) |
59 |
> local micro=$(get_version_component_range 3 ${ver}) |
60 |
> if [[ ${ver} == 9999 ]]; then |
61 |
|
62 |
No wildcard match here? (*9999) |
63 |
|
64 |
Thanks, |
65 |
Davide |