Lines 20-44
Link Here
|
20 |
IUSE="${IUSE} linguas_${X%_*}" |
20 |
IUSE="${IUSE} linguas_${X%_*}" |
21 |
done |
21 |
done |
22 |
|
22 |
|
23 |
for X in ${LANGSLONG};do |
23 |
for X in ${LANGSLONG}; do |
24 |
IUSE="${IUSE} linguas_${X}" |
24 |
IUSE="${IUSE} linguas_${X}" |
25 |
done |
25 |
done |
26 |
|
26 |
|
27 |
qt4-edge_pkg_setup() { |
27 |
qt4-edge_pkg_setup() { |
28 |
case ${EAPI} in |
28 |
case ${EAPI} in |
29 |
2) : ;; |
29 |
2) ;; |
30 |
*) ewarn "The qt4-edge eclass requires EAPI=2, but this ebuild does not" |
30 |
*) |
31 |
ewarn "have EAPI=2 set. The ebuild author or editor failed. This ebuild needs" |
31 |
eerror |
32 |
ewarn "to be fixed. Using qt4-edge eclass without EAPI=2 will fail." |
32 |
eerror "The ${ECLASS} eclass requires EAPI=2, but this ebuild does not" |
33 |
die "qt4-edge eclass requires EAPI=2 set";; |
33 |
eerror "have EAPI=2 set. The ebuild author or editor failed. This ebuild needs" |
34 |
|
34 |
eerror "to be fixed. Using ${ECLASS} eclass without EAPI=2 will fail." |
|
|
35 |
eerror |
36 |
die "${ECLASS} eclass requires EAPI=2" |
37 |
;; |
35 |
esac |
38 |
esac |
36 |
} |
39 |
} |
37 |
|
40 |
|
38 |
# @ECLASS-VARIABLE: PATCHES |
41 |
# @ECLASS-VARIABLE: PATCHES |
39 |
# @DESCRIPTION: |
42 |
# @DESCRIPTION: |
40 |
# In case you have pathes to apply , specify them on PATCHES variable. Make sure |
43 |
# In case you have patches to apply, specify them in PATCHES variable. Make sure |
41 |
# to specify the full path, Thjs variable is necessary for src_prepare phase. |
44 |
# to specify the full path. This variable is necessary for src_prepare phase. |
42 |
# example: |
45 |
# example: |
43 |
# PATCHES="${FILESDIR}"/mypatch.patch |
46 |
# PATCHES="${FILESDIR}"/mypatch.patch |
44 |
# ${FILESDIR}"/mypatch2.patch" |
47 |
# ${FILESDIR}"/mypatch2.patch" |
Lines 53-65
Link Here
|
53 |
# @DESCRIPTION: |
56 |
# @DESCRIPTION: |
54 |
# Same as above, but this variable is for LINGUAS that must be in long format. |
57 |
# Same as above, but this variable is for LINGUAS that must be in long format. |
55 |
# Remember to set this variable before inheriting qt4-edge eclass. |
58 |
# Remember to set this variable before inheriting qt4-edge eclass. |
56 |
# Look at ${PORTDIR}/profiles/desc/linguas.desc for details |
59 |
# Look at ${PORTDIR}/profiles/desc/linguas.desc for details. |
57 |
# |
60 |
# |
58 |
# @ECLASS-VARIABLE: DOCS |
61 |
# @ECLASS-VARIABLE: DOCS |
59 |
# @DESCRIPTION: |
62 |
# @DESCRIPTION: |
60 |
# Use this variable if you want to install any documentation. |
63 |
# Use this variable if you want to install any documentation. |
61 |
# example: DOCS="README AUTHORS" |
64 |
# example: DOCS="README AUTHORS" |
62 |
# |
65 |
|
63 |
# @FUNCTION: qt4-edge_src_prepare |
66 |
# @FUNCTION: qt4-edge_src_prepare |
64 |
# @DESCRIPTION: |
67 |
# @DESCRIPTION: |
65 |
# Default src_prepare function for packages that depends on qt4. If you have to |
68 |
# Default src_prepare function for packages that depends on qt4. If you have to |
Lines 103-115
Link Here
|
103 |
# @FUNCTION: qt4-edge_src_install |
106 |
# @FUNCTION: qt4-edge_src_install |
104 |
# @DESCRIPTION: |
107 |
# @DESCRIPTION: |
105 |
# Default src_install function for qt4-based packages. Installs compiled code, |
108 |
# Default src_install function for qt4-based packages. Installs compiled code, |
106 |
# documentation ( via DOCS variabled ) and translations ( via LANGS and |
109 |
# documentation (via DOCS variable) and translations (via LANGS and |
107 |
# LANGSLONG ) variables |
110 |
# LANGSLONG variables). |
108 |
|
|
|
109 |
qt4-edge_src_install() { |
111 |
qt4-edge_src_install() { |
110 |
debug-print-functions $FUNCNAME "$@" |
112 |
debug-print-functions $FUNCNAME "$@" |
111 |
|
113 |
|
112 |
emake INSTALL_ROOT="${D}" install |
114 |
emake INSTALL_ROOT="${D}" install || die "emake install failed" |
113 |
|
115 |
|
114 |
# install documentation |
116 |
# install documentation |
115 |
[[ -n "${DOCS}" ]] && { dodoc ${DOCS} || die "dodoc failed" ; } |
117 |
[[ -n "${DOCS}" ]] && { dodoc ${DOCS} || die "dodoc failed" ; } |
Lines 120-146
Link Here
|
120 |
|
122 |
|
121 |
prepare_translations() { |
123 |
prepare_translations() { |
122 |
local LANG= |
124 |
local LANG= |
123 |
local trans="${S}" |
125 |
local trans="${S}" dir= |
124 |
# Find translations directory |
126 |
# Find translations directory |
125 |
for directory in langs translations;do |
127 |
for dir in langs translations; do |
126 |
if [[ -d ${directory} ]];then |
128 |
[[ -d ${dir} ]] && trans="${dir}" |
127 |
trans="${directory}" |
|
|
128 |
fi |
129 |
done |
129 |
done |
130 |
if [[ ${trans} == ${S} ]];then |
130 |
if [[ ${trans} == ${S} ]]; then |
131 |
insinto /usr/share/${PN}/ |
131 |
insinto /usr/share/${PN}/ |
132 |
else |
132 |
else |
133 |
insinto /usr/share/${PN}/${trans}/ |
133 |
insinto /usr/share/${PN}/${trans}/ |
134 |
fi |
134 |
fi |
135 |
for LANG in ${LINGUAS};do |
135 |
for LANG in ${LINGUAS}; do |
136 |
for X in ${LANGS};do |
136 |
for X in ${LANGS}; do |
137 |
if [[ ${LANG} == ${X%_*} ]];then |
137 |
if [[ ${LANG} == ${X%_*} ]]; then |
138 |
doins -r ${trans}/${PN}_${X}.qm || die "failed to install translations" |
138 |
doins "${trans}"/${PN}_${X}.qm || die "failed to install translations" |
139 |
fi |
139 |
fi |
140 |
done |
140 |
done |
141 |
for X in ${LANGSLONG};do |
141 |
for X in ${LANGSLONG}; do |
142 |
if [[ ${LANG} == ${X} ]];then |
142 |
if [[ ${LANG} == ${X} ]]; then |
143 |
doins -r ${trans}/${PN}_${X}.qm || die "failed to install translations" |
143 |
doins "${trans}"/${PN}_${X}.qm || die "failed to install translations" |
144 |
fi |
144 |
fi |
145 |
done |
145 |
done |
146 |
done |
146 |
done |
Lines 149-157
Link Here
|
149 |
# @FUNCTION: eqmake4 |
149 |
# @FUNCTION: eqmake4 |
150 |
# @USAGE: [.pro file] [additional parameters to qmake] |
150 |
# @USAGE: [.pro file] [additional parameters to qmake] |
151 |
# @DESCRIPTION: |
151 |
# @DESCRIPTION: |
152 |
# Runs qmake on the specified .pro file (defaults to |
152 |
# Runs qmake on the specified .pro file (defaults to ${PN}.pro if called |
153 |
# ${PN}.pro if eqmake4 was called with no argument). |
153 |
# without arguments). Additional parameters are appended unmodified to |
154 |
# Additional parameters are passed unmodified to qmake. |
154 |
# qmake command line. For recursive build systems, i.e. those based on |
|
|
155 |
# the subdirs template, you should run eqmake4 on the top-level project |
156 |
# file only, unless you have strong reasons to do things differently. |
157 |
# During the building, qmake will be automatically re-invoked with the |
158 |
# right arguments on every directory specified inside the top-level |
159 |
# project file by the SUBDIRS variable. |
155 |
eqmake4() { |
160 |
eqmake4() { |
156 |
local projectfile="${1:-${PN}.pro}" |
161 |
local projectfile="${1:-${PN}.pro}" |
157 |
shift |
162 |
shift |