Lines 1-11
Link Here
|
1 |
# Copyright 1999-2017 Gentoo Foundation |
1 |
# Copyright 1999-2017 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
3 |
|
4 |
EAPI="5" |
4 |
EAPI="6" |
5 |
|
5 |
|
6 |
inherit eutils multilib qt4-r2 systemd user libtool |
6 |
inherit qmake-utils desktop systemd user libtool |
7 |
|
7 |
|
8 |
MY_PV=${PV/_beta/-b} |
8 |
MY_PV=${PV/_beta/-b} |
9 |
MY_P=${PN}-${MY_PV} |
9 |
MY_P=${PN}-${MY_PV} |
10 |
|
10 |
|
11 |
DESCRIPTION="Featureful client/server network backup suite" |
11 |
DESCRIPTION="Featureful client/server network backup suite" |
Lines 13-23
Link Here
|
13 |
SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz" |
13 |
SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz" |
14 |
|
14 |
|
15 |
LICENSE="AGPL-3" |
15 |
LICENSE="AGPL-3" |
16 |
SLOT="0" |
16 |
SLOT="0" |
17 |
KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
17 |
KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
18 |
IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt4 readline +sqlite ssl static tcpd vim-syntax X" |
18 |
IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt4 qt5 readline +sqlite ssl static tcpd vim-syntax X" |
19 |
|
19 |
|
20 |
DEPEND=" |
20 |
DEPEND=" |
21 |
dev-libs/gmp:0 |
21 |
dev-libs/gmp:0 |
22 |
!bacula-clientonly? ( |
22 |
!bacula-clientonly? ( |
23 |
postgres? ( dev-db/postgresql:=[threads] ) |
23 |
postgres? ( dev-db/postgresql:=[threads] ) |
Lines 27-36
Link Here
|
27 |
) |
27 |
) |
28 |
qt4? ( |
28 |
qt4? ( |
29 |
dev-qt/qtsvg:4 |
29 |
dev-qt/qtsvg:4 |
30 |
x11-libs/qwt:5 |
30 |
x11-libs/qwt:5 |
31 |
) |
31 |
) |
|
|
32 |
qt5? ( |
33 |
dev-qt/qtsvg:5 |
34 |
x11-libs/qwt:6 |
35 |
) |
32 |
logwatch? ( sys-apps/logwatch ) |
36 |
logwatch? ( sys-apps/logwatch ) |
33 |
tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
37 |
tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
34 |
readline? ( sys-libs/readline:0 ) |
38 |
readline? ( sys-libs/readline:0 ) |
35 |
static? ( |
39 |
static? ( |
36 |
acl? ( virtual/acl[static-libs] ) |
40 |
acl? ( virtual/acl[static-libs] ) |
Lines 85-94
Link Here
|
85 |
ewarn |
89 |
ewarn |
86 |
ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag." |
90 |
ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt4' useflag." |
87 |
ewarn |
91 |
ewarn |
88 |
fi |
92 |
fi |
89 |
|
93 |
|
|
|
94 |
if use bacula-clientonly && use static && use qt5; then |
95 |
ewarn |
96 |
ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt5' useflag." |
97 |
ewarn |
98 |
fi |
99 |
|
90 |
if ! use bacula-clientonly; then |
100 |
if ! use bacula-clientonly; then |
91 |
if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then |
101 |
if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then |
92 |
enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw |
102 |
enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw |
93 |
einfo |
103 |
einfo |
94 |
einfo "The user 'bacula' has been created. Please see the bacula manual" |
104 |
einfo "The user 'bacula' has been created. Please see the bacula manual" |
Lines 116-150
Link Here
|
116 |
|
126 |
|
117 |
# bug 466690 Use CXXFLAGS instead of CFLAGS |
127 |
# bug 466690 Use CXXFLAGS instead of CFLAGS |
118 |
sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
128 |
sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die |
119 |
|
129 |
|
120 |
# drop automatic install of unneeded documentation (for bug 356499) |
130 |
# drop automatic install of unneeded documentation (for bug 356499) |
121 |
epatch "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch |
131 |
eapply -p0 "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch |
122 |
|
132 |
|
123 |
# bug #310087 |
133 |
# bug #310087 |
124 |
epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch |
134 |
eapply "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch |
125 |
|
135 |
|
126 |
# bug #311161 |
136 |
# bug #311161 |
127 |
epatch "${FILESDIR}"/9.0.2/${PN}-9.0.2-lib-search-path.patch |
137 |
eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-lib-search-path.patch |
128 |
|
138 |
|
129 |
# bat needs to respect LDFLAGS |
139 |
# bat needs to respect LDFLAGS |
130 |
epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-ldflags.patch |
140 |
eapply -p0 "${FILESDIR}"/5.2.3/${PN}-5.2.3-ldflags.patch |
131 |
|
141 |
|
132 |
# bug #328701 |
142 |
# bug #328701 |
133 |
epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch |
143 |
eapply -p0 "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch |
134 |
|
144 |
|
135 |
epatch "${FILESDIR}"/9.0.2/${PN}-9.0.2-fix-static.patch |
145 |
eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-fix-static.patch |
136 |
|
146 |
|
137 |
# fix soname in libbaccat.so bug #602952 |
147 |
# fix soname in libbaccat.so bug #602952 |
138 |
epatch "${FILESDIR}/bacula-fix-sonames.patch" |
148 |
eapply -p0 "${FILESDIR}/bacula-fix-sonames.patch" |
139 |
|
149 |
|
140 |
# do not strip binaries |
150 |
# do not strip binaries |
141 |
sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die |
151 |
sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die |
142 |
sed -i -e "s/strip /# strip /" src/console/Makefile.in || die |
152 |
sed -i -e "s/strip /# strip /" src/console/Makefile.in || die |
143 |
|
153 |
|
144 |
# fix file not found error during make depend |
154 |
# fix file not found error during make depend |
145 |
epatch "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch |
155 |
eapply -p0 "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch |
|
|
156 |
|
157 |
# fix missing QtGlobal include in src/qt-console/pages.h |
158 |
eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-fix-pages-h-qt-includes.patch |
159 |
eapply_user |
146 |
|
160 |
|
147 |
# Fix systemd unit files: |
161 |
# Fix systemd unit files: |
148 |
# bug 497748 |
162 |
# bug 497748 |
149 |
sed -i -e '/Requires/d' platforms/systemd/*.service.in || die |
163 |
sed -i -e '/Requires/d' platforms/systemd/*.service.in || die |
150 |
sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die |
164 |
sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die |
Lines 187-198
Link Here
|
187 |
fi |
201 |
fi |
188 |
fi |
202 |
fi |
189 |
|
203 |
|
190 |
# do not build bat if 'static' clientonly |
204 |
# do not build bat if 'static' clientonly |
191 |
if ! use bacula-clientonly || ! use static; then |
205 |
if ! use bacula-clientonly || ! use static; then |
192 |
myconf="${myconf} \ |
206 |
if use qt4; then |
193 |
$(use_enable qt4 bat)" |
207 |
myconf="${myconf} \ |
|
|
208 |
$(use_enable qt4 bat)" |
209 |
elif use qt5; then |
210 |
myconf="${myconf} \ |
211 |
$(use_enable qt5 bat)" |
212 |
fi |
194 |
fi |
213 |
fi |
195 |
|
214 |
|
196 |
myconf="${myconf} \ |
215 |
myconf="${myconf} \ |
197 |
$(use_with X x) \ |
216 |
$(use_with X x) \ |
198 |
$(use_enable !readline conio) \ |
217 |
$(use_enable !readline conio) \ |
Lines 211-236
Link Here
|
211 |
--sysconfdir=/etc/bacula \ |
230 |
--sysconfdir=/etc/bacula \ |
212 |
--with-subsys-dir=/var/lock/subsys \ |
231 |
--with-subsys-dir=/var/lock/subsys \ |
213 |
--with-working-dir=/var/lib/bacula \ |
232 |
--with-working-dir=/var/lib/bacula \ |
214 |
--with-logdir=/var/lib/bacula \ |
233 |
--with-logdir=/var/lib/bacula \ |
215 |
--with-scriptdir=/usr/libexec/bacula \ |
234 |
--with-scriptdir=/usr/libexec/bacula \ |
216 |
--with-systemd=$(systemd_get_unitdir) \ |
235 |
--with-systemd=$(systemd_get_systemunitdir) \ |
217 |
--with-dir-user=bacula \ |
236 |
--with-dir-user=bacula \ |
218 |
--with-dir-group=bacula \ |
237 |
--with-dir-group=bacula \ |
219 |
--with-sd-user=root \ |
238 |
--with-sd-user=root \ |
220 |
--with-sd-group=bacula \ |
239 |
--with-sd-group=bacula \ |
221 |
--with-fd-user=root \ |
240 |
--with-fd-user=root \ |
222 |
--with-fd-group=bacula \ |
241 |
--with-fd-group=bacula \ |
223 |
--enable-smartalloc \ |
242 |
--enable-smartalloc \ |
224 |
--disable-afs \ |
243 |
--disable-afs \ |
225 |
--host=${CHOST} \ |
244 |
--host=${CHOST} \ |
226 |
${myconf} |
245 |
${myconf} |
|
|
246 |
|
227 |
# correct configuration for QT based bat |
247 |
# correct configuration for QT based bat |
228 |
if use qt4 ; then |
248 |
if use qt4 ; then |
229 |
pushd src/qt-console |
249 |
pushd src/qt-console |
230 |
eqmake4 |
250 |
eqmake4 |
231 |
popd |
251 |
popd |
|
|
252 |
elif use qt5 ; then |
253 |
pushd src/qt-console |
254 |
eqmake5 |
255 |
popd |
232 |
fi |
256 |
fi |
233 |
} |
257 |
} |
234 |
|
258 |
|
235 |
src_compile() { |
259 |
src_compile() { |
236 |
# Make build log verbose (bug #447806) |
260 |
# Make build log verbose (bug #447806) |
Lines 241-251
Link Here
|
241 |
emake DESTDIR="${D}" install |
265 |
emake DESTDIR="${D}" install |
242 |
doicon scripts/bacula.png |
266 |
doicon scripts/bacula.png |
243 |
|
267 |
|
244 |
# install bat icon and desktop file when enabled |
268 |
# install bat icon and desktop file when enabled |
245 |
# (for some reason ./configure doesn't pick this up) |
269 |
# (for some reason ./configure doesn't pick this up) |
246 |
if use qt4 && ! use static ; then |
270 |
if (use qt4 || use qt5) && ! use static ; then |
247 |
doicon src/qt-console/images/bat_icon.png |
271 |
doicon src/qt-console/images/bat_icon.png |
248 |
domenu scripts/bat.desktop |
272 |
domenu scripts/bat.desktop |
249 |
fi |
273 |
fi |
250 |
|
274 |
|
251 |
# remove some scripts we don't need at all |
275 |
# remove some scripts we don't need at all |
Lines 286-296
Link Here
|
286 |
emake DESTDIR="${D}" install |
310 |
emake DESTDIR="${D}" install |
287 |
popd >&/dev/null || die |
311 |
popd >&/dev/null || die |
288 |
fi |
312 |
fi |
289 |
fi |
313 |
fi |
290 |
|
314 |
|
291 |
if ! use qt4; then |
315 |
if ! use qt4 && ! use qt5; then |
292 |
rm -vf "${D}"/usr/share/man/man1/bat.1* |
316 |
rm -vf "${D}"/usr/share/man/man1/bat.1* |
293 |
fi |
317 |
fi |
294 |
rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1* |
318 |
rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1* |
295 |
if use bacula-clientonly || use bacula-nodir; then |
319 |
if use bacula-clientonly || use bacula-nodir; then |
296 |
rm -vf "${D}"/usr/share/man/man8/bacula-dir.8* |
320 |
rm -vf "${D}"/usr/share/man/man8/bacula-dir.8* |
Lines 411-418
Link Here
|
411 |
einfo "Best use it only for a client-only installation. See Bug #445540." |
435 |
einfo "Best use it only for a client-only installation. See Bug #445540." |
412 |
einfo |
436 |
einfo |
413 |
fi |
437 |
fi |
414 |
|
438 |
|
415 |
einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
439 |
einfo "Please note that 'bconsole' will always be installed. To compile 'bat'" |
416 |
einfo "you have to enable 'USE=qt4'." |
440 |
einfo "you have to enable 'USE=qt4' or 'USE=qt5'." |
417 |
einfo |
441 |
einfo |
418 |
} |
442 |
} |