summaryrefslogtreecommitdiff
path: root/app-backup/bacula
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-backup/bacula
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-backup/bacula')
-rw-r--r--app-backup/bacula/Manifest32
-rw-r--r--app-backup/bacula/bacula-5.2.13-r6.ebuild397
-rw-r--r--app-backup/bacula/bacula-9.0.6-r2.ebuild427
-rw-r--r--app-backup/bacula/bacula-9.0.6-r3.ebuild430
-rw-r--r--app-backup/bacula/files/5.2.10/bacula-5.2.10-fix-static.patch56
-rw-r--r--app-backup/bacula/files/5.2.12/bacula-5.2.12-depend.patch12
-rw-r--r--app-backup/bacula/files/5.2.3/bacula-5.2.3-Makefile.patch27
-rw-r--r--app-backup/bacula/files/5.2.3/bacula-5.2.3-as-needed.patch14
-rw-r--r--app-backup/bacula/files/5.2.3/bacula-5.2.3-doc.patch13
-rw-r--r--app-backup/bacula/files/5.2.3/bacula-5.2.3-ldflags.patch11
-rw-r--r--app-backup/bacula/files/5.2.3/bacula-5.2.3-lib-search-path.patch12
-rw-r--r--app-backup/bacula/files/5.2.3/bacula-5.2.3-openssl-1.patch25
-rw-r--r--app-backup/bacula/files/7.0.2/bacula-7.0.2-depend.patch12
-rw-r--r--app-backup/bacula/files/7.2.0/bacula-7.2.0-doc.patch12
-rw-r--r--app-backup/bacula/files/7.2.0/bacula-7.2.0-fix-static.patch56
-rw-r--r--app-backup/bacula/files/9.0.2/bacula-9.0.2-fix-static.patch63
-rw-r--r--app-backup/bacula/files/9.0.2/bacula-9.0.2-lib-search-path.patch25
-rw-r--r--app-backup/bacula/files/9.0.6/bacula-9.0.6-bat-pro.patch21
-rw-r--r--app-backup/bacula/files/9.0.6/bacula-9.0.6-fix-pages-h-qt-includes.patch15
-rw-r--r--app-backup/bacula/files/9.0.6/bacula-9.0.6-libressl.patch62
-rw-r--r--app-backup/bacula/files/bacula-dir.confd16
-rw-r--r--app-backup/bacula/files/bacula-dir.initd24
-rw-r--r--app-backup/bacula/files/bacula-fd.confd7
-rw-r--r--app-backup/bacula/files/bacula-fd.initd21
-rw-r--r--app-backup/bacula/files/bacula-fix-sonames.patch36
-rw-r--r--app-backup/bacula/files/bacula-sd.confd10
-rw-r--r--app-backup/bacula/files/bacula-sd.initd21
-rwxr-xr-xapp-backup/bacula/files/newscripts/bacula-dir.initd15
-rwxr-xr-xapp-backup/bacula/files/newscripts/bacula-fd.initd12
-rwxr-xr-xapp-backup/bacula/files/newscripts/bacula-sd.initd11
-rw-r--r--app-backup/bacula/metadata.xml18
31 files changed, 1913 insertions, 0 deletions
diff --git a/app-backup/bacula/Manifest b/app-backup/bacula/Manifest
new file mode 100644
index 000000000000..20f64f3c95e2
--- /dev/null
+++ b/app-backup/bacula/Manifest
@@ -0,0 +1,32 @@
+AUX 5.2.10/bacula-5.2.10-fix-static.patch 2833 BLAKE2B 5ffdc18b616326aeb81b31124938622680752ae2d28fb7e8e296c4804f56a2f169c3f98a4061f6ce88ef21ab416d08e8419755f31b65f13047d2f6b3ed099c87 SHA512 9982373d39eae1d6e24468cb0c0019cd4ab846d0971a1929242e5d67c05cb172a37aa0125883e42545b3d388e0e35a26240d541ec8d88e691b2444eee691518f
+AUX 5.2.12/bacula-5.2.12-depend.patch 627 BLAKE2B e2d356a9c157c5ba3979c8008b36276d51646bf65e78695072885e0de980b4a683a3dd1c869e08078dfd386372478e5e792cf481942c8474d17b75dfe4a4c6f9 SHA512 c48d2ea36e378f8a985f7f8c4456ce380e684e8a66749e6f6a95162b7eecf0f6a26b793ed4ec127b8e35b4217fed30f58841589b8c9ef74d281d6255d9345174
+AUX 5.2.3/bacula-5.2.3-Makefile.patch 924 BLAKE2B ea4e413f5e1ddb5d23aa030e5d7a4e96b23cd987fc86d2958c5275994198f8aa3705b5554e545440f31cfaed45283e34a08aa4e27087d81edc192d1e9884d63f SHA512 f1b5da39d01f6b00851810c6a0cbcda9ac0561fb165054f6f2c4540943b41af9d524a6a8aca1ae87d55fa8624aecf44c3c0db03c2d7c22690a84c16994289eed
+AUX 5.2.3/bacula-5.2.3-as-needed.patch 765 BLAKE2B be4e29d48974afd31894535dc89c51094f50344609ed1525c46d39a600778df5b458ce5587500a3455cb6e4b601c24dfdd567ad1cd264d108b9852d34e47e64e SHA512 5e303c5c53d6cef8e875d32811d23a9b6f354c394a6dce11646ad3f4c827b03cf1bd3c0267ff8873e1a176eb0b33314b712d8c9dc3c4c4ba24306d80b3bae4c7
+AUX 5.2.3/bacula-5.2.3-doc.patch 464 BLAKE2B d91cb05c18167f0fb00cef5181af07bbe771332b081b9c19c05c3199ebb543f0011d06830048921de6a3a4380500fda3b8871745e744f17605223a2eddf78ff3 SHA512 c4127364c9472f2f7d51ed1b4753e1c539e88c91bf7d796f1594f6c5e193a366fe169ee35818fd21349c3218a3b5631bd7f5110e2674744eb13ba5bbcc82a341
+AUX 5.2.3/bacula-5.2.3-ldflags.patch 389 BLAKE2B 9e1d80037755eba2ae47951aa1e603ac3bac1b26f1cbc0681730ab7ba08846f4670989c517bfe02a6b869b880456e992d3e40fd0d7488d63494a547a902c3c24 SHA512 811fd6ffc2a1c4aeef3afd9001fd2bf01c70ef3f75ed6949ec6b064a9e6ce7a4893ffe464e5c9c67e33fdf92e00b0601500930165891b70d403d31a2ee347434
+AUX 5.2.3/bacula-5.2.3-lib-search-path.patch 631 BLAKE2B 6d7f724d96d3111a09290549dd573f34fbbc856b3eb29671c928b597ce0cdf280f26028e27501f32e312326d9cf1face699ea6e67214e3c2beb6009f6f92f9af SHA512 cad584561a0f1be761c1e5dfd1e777215630aa174d26479397844873dabc63fb717a0123747f532bfc868c4943c1c1e48f12e0c2d4e05fdc871c1c7d6d80f3a2
+AUX 5.2.3/bacula-5.2.3-openssl-1.patch 863 BLAKE2B 32d49a53c8f639e762bd964f4fa1426952ccb2fd595717e015ee9c060e182d9189cf1749cb5e9d90d8712a0b1c3800ad98ba175e48935e7b6d172e6474719456 SHA512 729f01b5e88230561482cbe87fd185707be28ba92252e54a5111f0154f7d3df9cec9e31ee932bbdb34fe8b5e212cf43dc74d46460f68579e5f953ffe565a7a2c
+AUX 7.0.2/bacula-7.0.2-depend.patch 599 BLAKE2B be676329434260e65f7dcbefbfa8d9a04998856ab6743e5f3577e9e316346a22eed45a02960ed8590c946e079ba1e9d814061f67d6ef25c0a72f8bcafe38a48e SHA512 0474e077d89c5b1552f8b1929209db380ac67ca29add78987ad1593b139647a2d1822a0d89c3b117ca93024bffd74da7da5a5f23bc5095492c0cc9e4eddb24f6
+AUX 7.2.0/bacula-7.2.0-doc.patch 435 BLAKE2B 65d528b337f9a3e2eaf456b6dad37ddc59bc1a3f6e54208899346a6bc285fe2b19a464b39cc0c9439c4266baf98c1b3a06afd235b3ee7c88373d3c890163e01a SHA512 27d2839658e3471487dce023c806261e5b5d03212f12eab75885b9b61eb22e57c96e85c07a5f81c812974963904ab81b6ce15abf5381647bd2188abd14139b34
+AUX 7.2.0/bacula-7.2.0-fix-static.patch 2599 BLAKE2B 8b9119b0d6f47cace3e77a93434bec735276ddc8295157aaca67778dad1bbd62603201c011d5457f36b92b0ba9e7975fc4d0d7ca06d33decf510dd805759d210 SHA512 12b241ca20e7d3eff3c4fdf495c3f4f2074e41196379ae3bf5d655299413c0dec263200644745d081e77253fe20b07845d567de71dedb7564a6f64f134c3c905
+AUX 9.0.2/bacula-9.0.2-fix-static.patch 3637 BLAKE2B 4119db6091fdaf7d8d103a166ce672c405da8093e2a04eef5e9bda1cc0e0cde997fef378d92e0fa1531c39281e877aa10f8dd939377924fc7252d6c228722c86 SHA512 218febc3ccbfeccea4a5b05f6086aeff7f4e0e88e3a6670a8a0406101e7276c35d254f4bfa6b6782ea5bdcd1ad8fc5080cff80bb9befcf4d7f968075eb850360
+AUX 9.0.2/bacula-9.0.2-lib-search-path.patch 1431 BLAKE2B f04bbf695a926424092dd974994967eefcd48407f2de43b9e94bff25403e66f4a49cde08d667e3b5fc4fb9f8d273a786c3422325db3f589278d16f136d4a9a0c SHA512 3863102d2f8db4158dede306b07297da6550bbad1c77aea49a75de412a7f4630216ef2ae28fc51ffa8d8f9c373510e58982f28e32fdbb142a3551eef7f112b7d
+AUX 9.0.6/bacula-9.0.6-bat-pro.patch 667 BLAKE2B b8987c244025f029a182d6b44f30e0e0a6835b9f6cadb6b43b2b55ea33113e20c20b6a367d965ea12358597e9807c79846e45571b31f9b66dc3ad83265fed4e7 SHA512 d521759cad65ef73fb674cd6b58f9540ef6e86842bcd45ece4730f71a408076b38faea2088bf6f2993fed9a88d727ff2ff8c3e3619e27fcaa1d5afe4506640cf
+AUX 9.0.6/bacula-9.0.6-fix-pages-h-qt-includes.patch 306 BLAKE2B a6bca03d7e61051046083f1773ce65035f695dd8d5de45d58e0488eb5047580db444cbb52ae5e93068ff60028220a9286da9d1323d141335be31ebfb9c9acb44 SHA512 86a869f10e512eac6aa4500f73ace1cfe3883cc4d176c26d275f6dc51320763cb55c2d139a7a0230c57c40f4996651a0de71788e3a7ef343a4290e56f9585a22
+AUX 9.0.6/bacula-9.0.6-libressl.patch 2318 BLAKE2B 6d918bbf3eb0af17b3d1ccc5fe70788de21aed8823178a36dc04ada1198fef99425bf0af55d86bfff8342ba7df635e05e813548d3469cf51edb1c813836f45c3 SHA512 c6d7a386a89eaeaa3281cfe4bc2d8c48a84762d4a6e01d1f327110efeada0168261d03b3ab1183fffa5456975ff475b12b286f360d7001cf459f0a10be6ba8be
+AUX bacula-dir.confd 629 BLAKE2B 85eb7131fe1735ea3af0075b26c88408a11ce7653b92e27198d6bbfdbe2bf4d4e157eb6685f2cac79a8de1e4d24d9c4eb25f9d64b1b956162718fe09633018c4 SHA512 85ed5317313721a7b3776a257c204e0ac45a5221c6bd0b5886944cbd1e4829fe146e7af52cdc604cbf5e3d8722c955da40cbf989dc9ea7466653c98bf8c7cfdf
+AUX bacula-dir.initd 505 BLAKE2B 385c24291c0a0108baf441d078054f70fd0346dfe4b6de7a236f9c1e7a4416b895c73075509dfcc03d1b58760668ca1fc5415033188f9dcb3acceea7f5e1044a SHA512 de0003d6c873ecf9609a6e1838772a29555b4e5e251369035746ede296f4b0f1c85dcbe8822d526d6a5489ba0921a8566f7f2b963682fddb3560f6f7e817c40a
+AUX bacula-fd.confd 241 BLAKE2B fe41e6376e46e674ef1aa32f02e2dee9721189fb56c4d25c2f49bd6bb0b9c8bcc811cd58db62b9b8bffd80514a24e9d60385a395dfdb93627d473ba7bbf05131 SHA512 0e5a21d8ed3cd39135c8db5b8c59e615161848aaca582851d3599fe0e6ad4f47c04fede13cdc648a2cbdc032de6ca00aa954111bbb2930eb006e7e0984cb882f
+AUX bacula-fd.initd 430 BLAKE2B f16aff397175de0f58dd0569dbc77f90a5d923dfeb22c5cbf360ca3e818e93c49f3568864ff18d84b1ed282bd5faa517c4130e179fb0aa939eb48fe34f838108 SHA512 e6bad66d11c3c82ba32e052bb2040205c4e1c5994c8dadc09a6235b9c2e5e3c49ea33ef9a9a76d3bcec0054488a14350f9963590c1834b15023735138adad48d
+AUX bacula-fix-sonames.patch 1041 BLAKE2B 9b2b91cf3c281c1899bf545f02b4a48723bcba05f0305e531bdefb0ca822e805979e67d1d2f5ac949248d1e976126236d31c885d4e911e78c24d4ed013c9792f SHA512 0b7a78915ff789988c9fa2bc8fcfcd3d76d3cb8350720134563ece63a97162db273c7d61eee45365c4de8b94b409a3cd4576d6b0239853c2a0d3a9dc8ebf888f
+AUX bacula-sd.confd 391 BLAKE2B 922ebff1772470f611661b03e6216d3bf11a09e9e552e5df59d9fcd5c14bde1b943e151892648e6176cef643ede01ec710f0aa892c35b51753331c96885cbe9e SHA512 ee7372582f6f8c7b4552ed5fd71293f712af22d0de30d02e3f5e08b3738da978eebc42dd601d88735f0412b1429be624a28d86e5f32aba2ddb127ca1ebd10e0d
+AUX bacula-sd.initd 437 BLAKE2B f3c86121dae447807e32e7966372c710728fe1747177738df0ce36235b1b05d5d5291bebb66cec6544e6941bb6b0269631d06ed4cdfb8159aba09a96aa54b6e5 SHA512 50603d6d5d5df95ac1752ecc7c3a48a0a5f42eca6c5af390a4f1af084861dbbcfa5d476d3f24ec473fd9b225f6ac78f3542e26cce5d499289d1ec44e22c5682f
+AUX newscripts/bacula-dir.initd 318 BLAKE2B f482ce3c49ff8106244b62946ab8bc4ab14d32f3b5442e9d803f5f372c8e2ae73760b497800161f075f1c40da2d385871a77f5aa774dc85d950cd1863860b70d SHA512 aa6fddd67237f6f16e89e04290bc3540a87fe8ebaba9c641a3277d0d2f627cadf49dffb032a0fe5c77ab8983f4d67891b643279bad0a2aa9de5a86e6d64f196a
+AUX newscripts/bacula-fd.initd 253 BLAKE2B 38b87d2868f7cc0afb3270f81445832bdf876d20919bf3f5a779595507e50185457464371878b3e18293302a0c1016bce3aca7e432837397bde64a0e6188be8a SHA512 8230bde8cbfdf2fc4892fb90891a85e36b2be42e4f2ea2140248f08f22bcfe3f1d8c3b419347a9b40143c3f2b4c75d7834cbadb3ed8b8372462580ffcf268bf7
+AUX newscripts/bacula-sd.initd 252 BLAKE2B c27f6635ca72c96fc74d1d27c252934ca516cf768a5fec5e043a19d14e7fa67ccfbd6bbbf5da8ee6b718ca7f232565b23216f8ef3adc372681ea4f6bf763f46e SHA512 f4e1252d3e106ebd842cb23c6994cbe29e48e07cff15726479628d1cc5695bd45a0102652203316efcf8a3b3454ad2ca08ee7c6a673880064d15f96c43c395d4
+DIST bacula-5.2.13.tar.gz 4243395 BLAKE2B 5cad5d2675f8a2dd28a76c1a4e4c649d1bf9b031e5e4febfb537a72a0481c2f7c3e80d39b84657238bc147b58174ce544749aed70882f66678edfaa2fb51ac2f SHA512 dfdff353f5b6ed4d85013dc292526706bbd67066f7057a114012172926c819c8df1eb8779166d5a90db3a49a5584f0a8daf7566cc93cf4fa3f1bdda245b55cf0
+DIST bacula-9.0.6.tar.gz 3984215 BLAKE2B 89d0c83ae1ffd2c2677f5882eebc0feac12780a78f9fcf6d30e44981a09f29dd8bd3f0e55ba963a0ed03099117f2d645cf0402cf528fe939d88210ed547ea157 SHA512 a85b8e089951eb9949c9906af45f204a69cd4a7d2e0f29439b74a29ade20c05a49a8c38665189a46c0ad07af0c97380485e10da6aa53dfc47a22934f589f265e
+EBUILD bacula-5.2.13-r6.ebuild 11653 BLAKE2B 440c77c8b85dc4f65ff10f3a7bfc09d471a6f9e344ac3722163b592f48c2af18951fc54541e8c7b3e75cc445a0ea8364729ad0a2e411892989fedfb79a08a182 SHA512 6b6f9a5b04d7e818fbe4f73928f6b00f393b82e0a1d36e0c4a700ec95b5049006d8b73d1c2cd7906d405f15511d63862fbf19e1b42bed484c8e285dc8b29b07e
+EBUILD bacula-9.0.6-r2.ebuild 12450 BLAKE2B 405b703434852e97b72a68392c19078c6f9fd93446fa81b152bc347ad6c8a1acee7fc65909179faab1352429956e3fd5f4153a6c5a9ab509b3ea58406a1447d1 SHA512 6d3f4ba7e0d2a47b52df08a726374ef0febf026b3d3e63e6ff1c22ddc0032988e187c69d0f8ed63057e5af4636935759a8debf840813eaeda9798e6b7127a171
+EBUILD bacula-9.0.6-r3.ebuild 12555 BLAKE2B 970c7dadba73cf531c7d68dc68381b36333f80a3166e7c02fca6533540d67c871914af19a72da7355c5cfc23eace65aa1704e2f7e96a8e4e61bc28d0ac68092c SHA512 883f41666bfcbeb795f11c4a134575aad426fca89599a52e52ef47ba0a67a8296ba15290423c37fe27f2167a6fc34f3fb06277a66ef44c2997f57d20b0ef34c4
+MISC metadata.xml 626 BLAKE2B 5794ff725aacf865d2f20f402d057e6358a2c68be16f760f1446b2de5292c9582247ab86417131063e181168f003e1d6f5d200ac0dc3d47da24a3bca688dd93c SHA512 69d63f22a63a53daada5561d751f9903932c9a4596c164894a9aa6465a0f4ac90af99548439545fff1cfbcac9a1eb266a91119cbf73cb13edebd16b440613e55
diff --git a/app-backup/bacula/bacula-5.2.13-r6.ebuild b/app-backup/bacula/bacula-5.2.13-r6.ebuild
new file mode 100644
index 000000000000..463523e8d36b
--- /dev/null
+++ b/app-backup/bacula/bacula-5.2.13-r6.ebuild
@@ -0,0 +1,397 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+
+inherit eutils multilib python-single-r1 systemd user libtool
+
+MY_PV=${PV/_beta/-b}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Featureful client/server network backup suite"
+HOMEPAGE="http://www.bacula.org/"
+SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres python readline +sqlite ssl static tcpd vim-syntax X"
+
+DEPEND="
+ dev-libs/gmp:0
+ !bacula-clientonly? (
+ postgres? ( dev-db/postgresql:=[threads] )
+ mysql? ( virtual/mysql )
+ sqlite? ( dev-db/sqlite:3 )
+ !bacula-nodir? ( virtual/mta )
+ )
+ logwatch? ( sys-apps/logwatch )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ readline? ( sys-libs/readline:0 )
+ static? (
+ acl? ( virtual/acl[static-libs] )
+ sys-libs/zlib[static-libs]
+ dev-libs/lzo[static-libs]
+ sys-libs/ncurses:=[static-libs]
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[static-libs] )
+ libressl? ( dev-libs/libressl:0=[static-libs] )
+ )
+ )
+ !static? (
+ acl? ( virtual/acl )
+ sys-libs/zlib
+ dev-libs/lzo
+ sys-libs/ncurses:=
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ )
+ python? ( ${PYTHON_DEPS} )
+ "
+RDEPEND="${DEPEND}
+ !bacula-clientonly? (
+ !bacula-nosd? (
+ sys-block/mtx
+ app-arch/mt-st
+ )
+ )
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
+
+REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) )
+ static? ( bacula-clientonly )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ #XOR and !bacula-clientonly controlled by REQUIRED_USE
+ use mysql && export mydbtype="mysql"
+ use postgres && export mydbtype="postgresql"
+ use sqlite && export mydbtype="sqlite3"
+
+ # create the daemon group and user
+ if [ -z "$(egetent group bacula 2>/dev/null)" ]; then
+ enewgroup bacula
+ einfo
+ einfo "The group 'bacula' has been created. Any users you add to this"
+ einfo "group have access to files created by the daemons."
+ einfo
+ fi
+
+ if ! use bacula-clientonly; then
+ if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then
+ enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw
+ einfo
+ einfo "The user 'bacula' has been created. Please see the bacula manual"
+ einfo "for information about running bacula as a non-root user."
+ einfo
+ fi
+ fi
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # adjusts default configuration files for several binaries
+ # to /etc/bacula/<config> instead of ./<config>
+ pushd src >&/dev/null || die
+ for f in console/console.c dird/dird.c filed/filed.c \
+ stored/bcopy.c stored/bextract.c stored/bls.c \
+ stored/bscan.c stored/btape.c stored/stored.c \
+ qt-console/main.cpp; do
+ sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \
+ || die "sed on ${f} failed"
+ done
+ popd >&/dev/null || die
+
+ # bug 466688 drop deprecated categories from Desktop file
+ sed -i -e 's/Application;//' scripts/bat.desktop.in || die
+
+ # bug 466690 Use CXXFLAGS instead of CFLAGS
+ sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
+
+ # drop automatic install of unneeded documentation (for bug 356499)
+ epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-doc.patch
+
+ # bug #310087
+ epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch
+
+ # bug #311161
+ epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-lib-search-path.patch
+
+ # stop build for errors in subdirs
+ epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-Makefile.patch
+
+ # bat needs to respect LDFLAGS
+ epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-ldflags.patch
+
+ # bug #328701
+ epatch "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch
+
+ epatch "${FILESDIR}"/5.2.10/${PN}-5.2.10-fix-static.patch
+
+ # do not strip binaries
+ sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die
+ sed -i -e "s/strip /# strip /" src/console/Makefile.in || die
+
+ # fix file not found error during make depend
+ epatch "${FILESDIR}"/5.2.12/${PN}-5.2.12-depend.patch
+
+ # Fix systemd unit files:
+ # bug 497748
+ sed -i -e '/Requires/d' platforms/systemd/*.service.in || die
+ sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die
+ # bug 504370
+ sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die
+ # bug 584442 and 504368
+ sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die
+
+ # Fix tmpfiles config for client-only (no bacula user) install
+ # NOTE: Change only first occurance (user) not second (group)
+ # bug 528398 and 577486
+ if use bacula-clientonly; then
+ sed -i -e 's/bacula/root/' platforms/systemd/bacula.conf.in || die
+ fi
+
+ # fix bundled libtool (bug 466696)
+ # But first move directory with M4 macros out of the way.
+ # It is only needed by autoconf and gives errors during elibtoolize.
+ mv autoconf/libtool autoconf/libtool1 || die
+ elibtoolize
+}
+
+src_configure() {
+ local myconf=''
+
+ if use bacula-clientonly; then
+ myconf="${myconf} \
+ $(use_enable bacula-clientonly client-only) \
+ $(use_enable !static libtool) \
+ $(use_enable static static-cons) \
+ $(use_enable static static-fd)"
+ else
+ myconf="${myconf} \
+ $(use_enable !bacula-nodir build-dird) \
+ $(use_enable !bacula-nosd build-stored)"
+ # bug #311099
+ # database support needed by dir-only *and* sd-only
+ # build as well (for building bscan, btape, etc.)
+ myconf="${myconf} \
+ --with-${mydbtype} \
+ --enable-batch-insert"
+ fi
+
+ myconf="${myconf} \
+ --disable-tray-monitor \
+ $(use_with X x) \
+ $(use_with python) \
+ $(use_enable !readline conio) \
+ $(use_enable readline) \
+ $(use_with readline readline /usr) \
+ $(use_with ssl openssl) \
+ $(use_enable ipv6) \
+ $(use_enable acl) \
+ $(use_with tcpd tcp-wrappers)"
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --docdir=/usr/share/doc/${PF} \
+ --htmldir=/usr/share/doc/${PF}/html \
+ --with-pid-dir=/var/run \
+ --sysconfdir=/etc/bacula \
+ --with-subsys-dir=/var/lock/subsys \
+ --with-working-dir=/var/lib/bacula \
+ --with-logdir=/var/lib/bacula \
+ --with-scriptdir=/usr/libexec/bacula \
+ --with-systemd=$(systemd_get_unitdir) \
+ --with-dir-user=bacula \
+ --with-dir-group=bacula \
+ --with-sd-user=root \
+ --with-sd-group=bacula \
+ --with-fd-user=root \
+ --with-fd-group=bacula \
+ --enable-smartalloc \
+ --disable-afs \
+ --host=${CHOST} \
+ ${myconf}
+}
+
+src_compile() {
+ # Make build log verbose (bug #447806)
+ emake NO_ECHO=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ doicon scripts/bacula.png
+
+ # remove some scripts we don't need at all
+ rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql}
+
+ # rename statically linked apps
+ if use bacula-clientonly && use static ; then
+ pushd "${D}"/usr/sbin || die
+ mv static-bacula-fd bacula-fd || die
+ mv static-bconsole bconsole || die
+ popd || die
+ fi
+
+ # extra files which 'make install' doesn't cover
+ if ! use bacula-clientonly; then
+ # the database update scripts
+ diropts -m0750
+ insinto /usr/libexec/bacula/updatedb
+ insopts -m0754
+ doins "${S}"/updatedb/*
+ fperms 0640 /usr/libexec/bacula/updatedb/README
+
+ # the logrotate configuration
+ # (now unconditional wrt bug #258187)
+ diropts -m0755
+ insinto /etc/logrotate.d
+ insopts -m0644
+ newins "${S}"/scripts/logrotate bacula
+
+ # the logwatch scripts
+ if use logwatch; then
+ diropts -m0750
+ dodir /etc/log.d/scripts/services
+ dodir /etc/log.d/scripts/shared
+ dodir /etc/log.d/conf/logfiles
+ dodir /etc/log.d/conf/services
+ pushd "${S}"/scripts/logwatch >&/dev/null || die
+ emake DESTDIR="${D}" install
+ popd >&/dev/null || die
+ fi
+ fi
+
+ rm -vf "${D}"/usr/share/man/man1/bacula-bwxconsole.1*
+ rm -vf "${D}"/usr/share/man/man1/bat.1*
+ rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1*
+ if use bacula-clientonly || use bacula-nodir; then
+ rm -vf "${D}"/usr/share/man/man8/bacula-dir.8*
+ rm -vf "${D}"/usr/share/man/man8/dbcheck.8*
+ rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
+ rm -vf "${D}"/usr/libexec/bacula/create_*_database
+ rm -vf "${D}"/usr/libexec/bacula/drop_*_database
+ rm -vf "${D}"/usr/libexec/bacula/make_*_tables
+ rm -vf "${D}"/usr/libexec/bacula/update_*_tables
+ rm -vf "${D}"/usr/libexec/bacula/drop_*_tables
+ rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges
+ rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup
+ fi
+ if use bacula-clientonly || use bacula-nosd; then
+ rm -vf "${D}"/usr/share/man/man8/bacula-sd.8*
+ rm -vf "${D}"/usr/share/man/man8/bcopy.8*
+ rm -vf "${D}"/usr/share/man/man8/bextract.8*
+ rm -vf "${D}"/usr/share/man/man8/bls.8*
+ rm -vf "${D}"/usr/share/man/man8/bscan.8*
+ rm -vf "${D}"/usr/share/man/man8/btape.8*
+ rm -vf "${D}"/usr/libexec/bacula/disk-changer
+ rm -vf "${D}"/usr/libexec/bacula/mtx-changer
+ rm -vf "${D}"/usr/libexec/bacula/dvd-handler
+ fi
+
+ # documentation
+ dodoc ChangeLog ReleaseNotes SUPPORT technotes
+
+ # install examples (bug #457504)
+ if use examples; then
+ docinto examples/
+ dodoc -r examples/*
+ fi
+
+ # vim-files
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins scripts/bacula.vim
+ insinto /usr/share/vim/vimfiles/ftdetect
+ newins scripts/filetype.vim bacula_ft.vim
+ fi
+
+ # setup init scripts
+ myscripts="bacula-fd"
+ if ! use bacula-clientonly; then
+ if ! use bacula-nodir; then
+ myscripts="${myscripts} bacula-dir"
+ fi
+ if ! use bacula-nosd; then
+ myscripts="${myscripts} bacula-sd"
+ fi
+ fi
+ for script in ${myscripts}; do
+ # copy over init script and config to a temporary location
+ # so we can modify them as needed
+ cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
+ cp "${FILESDIR}/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
+
+ # now set the database dependancy for the director init script
+ case "${script}" in
+ bacula-dir)
+ case "${mydbtype}" in
+ sqlite3)
+ # sqlite databases don't have a daemon
+ sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die
+ ;;
+ *)
+ # all other databases have daemons
+ sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+
+ # install init script and config
+ newinitd "${T}/${script}".initd "${script}"
+ newconfd "${T}/${script}".confd "${script}"
+ done
+
+ systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service
+ systemd_dotmpfilesd "${S}"/platforms/systemd/bacula.conf
+
+ # make sure the working directory exists
+ diropts -m0750
+ keepdir /var/lib/bacula
+
+ # make sure bacula group can execute bacula libexec scripts
+ fowners -R root:bacula /usr/libexec/bacula
+}
+
+pkg_postinst() {
+ if use bacula-clientonly; then
+ fowners root:bacula /var/lib/bacula
+ else
+ fowners bacula:bacula /var/lib/bacula
+ fi
+
+ einfo
+ einfo "This Revision 6 of bacula-5.2.13 dropped support for building 'bat' as"
+ einfo "Qt4 is not longer supported by Gentoo. Please use it only for installations"
+ einfo "requiring an old file demon."
+ einfo
+ if ! use bacula-clientonly && ! use bacula-nodir; then
+ einfo
+ einfo "If this is a new install, you must create the ${mydbtype} databases with:"
+ einfo " /usr/libexec/bacula/create_${mydbtype}_database"
+ einfo " /usr/libexec/bacula/make_${mydbtype}_tables"
+ einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges"
+ einfo
+ fi
+
+ if use sqlite; then
+ einfo
+ einfo "Be aware that Bacula does not officially support SQLite database anymore."
+ einfo "Best use it only for a client-only installation. See Bug #445540."
+ einfo
+ fi
+
+ einfo "Please note that 'bconsole' will always be installed."
+ einfo
+}
diff --git a/app-backup/bacula/bacula-9.0.6-r2.ebuild b/app-backup/bacula/bacula-9.0.6-r2.ebuild
new file mode 100644
index 000000000000..879631e43da8
--- /dev/null
+++ b/app-backup/bacula/bacula-9.0.6-r2.ebuild
@@ -0,0 +1,427 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit qmake-utils desktop systemd user libtool
+
+MY_PV=${PV/_beta/-b}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Featureful client/server network backup suite"
+HOMEPAGE="http://www.bacula.org/"
+SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc ~sparc x86"
+IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt5 readline +sqlite ssl static tcpd vim-syntax X"
+
+DEPEND="
+ dev-libs/gmp:0
+ !bacula-clientonly? (
+ postgres? ( dev-db/postgresql:=[threads] )
+ mysql? ( virtual/mysql )
+ sqlite? ( dev-db/sqlite:3 )
+ !bacula-nodir? ( virtual/mta )
+ )
+ qt5? (
+ dev-qt/qtsvg:5
+ x11-libs/qwt:6
+ )
+ logwatch? ( sys-apps/logwatch )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ readline? ( sys-libs/readline:0 )
+ static? (
+ acl? ( virtual/acl[static-libs] )
+ sys-libs/zlib[static-libs]
+ dev-libs/lzo[static-libs]
+ sys-libs/ncurses:=[static-libs]
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[static-libs] )
+ libressl? ( dev-libs/libressl:0=[static-libs] )
+ )
+ )
+ !static? (
+ acl? ( virtual/acl )
+ sys-libs/zlib
+ dev-libs/lzo
+ sys-libs/ncurses:=
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ )"
+RDEPEND="${DEPEND}
+ !bacula-clientonly? (
+ !bacula-nosd? (
+ sys-block/mtx
+ app-arch/mt-st
+ )
+ )
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
+
+REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) )
+ static? ( bacula-clientonly )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ #XOR and !bacula-clientonly controlled by REQUIRED_USE
+ use mysql && export mydbtype="mysql"
+ use postgres && export mydbtype="postgresql"
+ use sqlite && export mydbtype="sqlite3"
+
+ # create the daemon group and user
+ if [ -z "$(egetent group bacula 2>/dev/null)" ]; then
+ enewgroup bacula
+ einfo
+ einfo "The group 'bacula' has been created. Any users you add to this"
+ einfo "group have access to files created by the daemons."
+ einfo
+ fi
+
+ if use bacula-clientonly && use static && use qt5; then
+ ewarn
+ ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt5' useflag."
+ ewarn
+ fi
+
+ if ! use bacula-clientonly; then
+ if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then
+ enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw
+ einfo
+ einfo "The user 'bacula' has been created. Please see the bacula manual"
+ einfo "for information about running bacula as a non-root user."
+ einfo
+ fi
+ fi
+}
+
+src_prepare() {
+ # adjusts default configuration files for several binaries
+ # to /etc/bacula/<config> instead of ./<config>
+ pushd src >&/dev/null || die
+ for f in console/console.c dird/dird.c filed/filed.c \
+ stored/bcopy.c stored/bextract.c stored/bls.c \
+ stored/bscan.c stored/btape.c stored/stored.c \
+ qt-console/main.cpp; do
+ sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \
+ || die "sed on ${f} failed"
+ done
+ popd >&/dev/null || die
+
+ # bug 466688 drop deprecated categories from Desktop file
+ sed -i -e 's/Application;//' scripts/bat.desktop.in || die
+
+ # bug 466690 Use CXXFLAGS instead of CFLAGS
+ sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
+
+ # drop automatic install of unneeded documentation (for bug 356499)
+ eapply -p0 "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch
+
+ # bug #310087
+ eapply "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch
+
+ # bug #311161
+ eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-lib-search-path.patch
+
+ # bat needs to respect LDFLAGS and CFLAGS
+ eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-bat-pro.patch
+
+ # bug #328701
+ eapply -p0 "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch
+
+ eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-fix-static.patch
+
+ # fix soname in libbaccat.so bug #602952
+ eapply -p0 "${FILESDIR}/bacula-fix-sonames.patch"
+
+ # do not strip binaries
+ sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die
+ sed -i -e "s/strip /# strip /" src/console/Makefile.in || die
+
+ # fix file not found error during make depend
+ eapply -p0 "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch
+
+ # fix missing QtGlobal include in src/qt-console/pages.h for Qt5
+ eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-fix-pages-h-qt-includes.patch
+ eapply_user
+
+ # Fix systemd unit files:
+ # bug 497748
+ sed -i -e '/Requires/d' platforms/systemd/*.service.in || die
+ sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die
+ # bug 504370
+ sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die
+ # bug 584442 and 504368
+ sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die
+
+ # build 'bat' for Qt5
+ export QMAKE="$(qt5_get_bindir)"/qmake
+
+ # adapt to >=Qt-5.9 (see bug #644566)
+ # qmake needs an existing target file to generate install instructions
+ sed -i -e 's#bins.files = bat#bins.files = .libs/bat#g' \
+ src/qt-console/bat.pro.in || die
+ mkdir src/qt-console/.libs || die
+ touch src/qt-console/.libs/bat || die
+ chmod 755 src/qt-console/.libs/bat || die
+
+ # fix bundled libtool (bug 466696)
+ # But first move directory with M4 macros out of the way.
+ # It is only needed by autoconf and gives errors during elibtoolize.
+ mv autoconf/libtool autoconf/libtool1 || die
+ elibtoolize
+}
+
+src_configure() {
+ local myconf=''
+
+ if use bacula-clientonly; then
+ myconf="${myconf} \
+ $(use_enable bacula-clientonly client-only) \
+ $(use_enable !static libtool) \
+ $(use_enable static static-cons) \
+ $(use_enable static static-fd)"
+ else
+ myconf="${myconf} \
+ $(use_enable !bacula-nodir build-dird) \
+ $(use_enable !bacula-nosd build-stored)"
+ # bug #311099
+ # database support needed by dir-only *and* sd-only
+ # build as well (for building bscan, btape, etc.)
+ myconf="${myconf}
+ --with-${mydbtype}"
+ if use mysql; then
+ myconf="${myconf} \
+ --disable-batch-insert"
+ else
+ myconf="${myconf} \
+ --enable-batch-insert"
+ fi
+ fi
+
+ # do not build bat if 'static' clientonly
+ if ! use bacula-clientonly || ! use static; then
+ myconf="${myconf} \
+ $(use_enable qt5 bat)"
+ fi
+
+ myconf="${myconf} \
+ $(use_with X x) \
+ $(use_enable !readline conio) \
+ $(use_enable readline) \
+ $(use_with readline readline /usr) \
+ $(use_with ssl openssl) \
+ $(use_enable ipv6) \
+ $(use_enable acl) \
+ $(use_with tcpd tcp-wrappers)"
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --docdir=/usr/share/doc/${PF} \
+ --htmldir=/usr/share/doc/${PF}/html \
+ --with-pid-dir=/var/run \
+ --sysconfdir=/etc/bacula \
+ --with-subsys-dir=/var/lock/subsys \
+ --with-working-dir=/var/lib/bacula \
+ --with-logdir=/var/lib/bacula \
+ --with-scriptdir=/usr/libexec/bacula \
+ --with-systemd=$(systemd_get_systemunitdir) \
+ --with-dir-user=bacula \
+ --with-dir-group=bacula \
+ --with-sd-user=root \
+ --with-sd-group=bacula \
+ --with-fd-user=root \
+ --with-fd-group=bacula \
+ --enable-smartalloc \
+ --disable-afs \
+ --host=${CHOST} \
+ ${myconf}
+}
+
+src_compile() {
+ # Make build log verbose (bug #447806)
+ emake NO_ECHO=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ doicon scripts/bacula.png
+
+ # install bat icon and desktop file when enabled
+ # (for some reason ./configure doesn't pick this up)
+ if use qt5 && ! use static ; then
+ doicon src/qt-console/images/bat_icon.png
+ domenu scripts/bat.desktop
+ fi
+
+ # remove some scripts we don't need at all
+ rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql}
+
+ # rename statically linked apps
+ if use bacula-clientonly && use static ; then
+ pushd "${D}"/usr/sbin || die
+ mv static-bacula-fd bacula-fd || die
+ mv static-bconsole bconsole || die
+ popd || die
+ fi
+
+ # extra files which 'make install' doesn't cover
+ if ! use bacula-clientonly; then
+ # the database update scripts
+ diropts -m0750
+ insinto /usr/libexec/bacula/updatedb
+ insopts -m0754
+ doins "${S}"/updatedb/*
+ fperms 0640 /usr/libexec/bacula/updatedb/README
+
+ # the logrotate configuration
+ # (now unconditional wrt bug #258187)
+ diropts -m0755
+ insinto /etc/logrotate.d
+ insopts -m0644
+ newins "${S}"/scripts/logrotate bacula
+
+ # the logwatch scripts
+ if use logwatch; then
+ diropts -m0750
+ dodir /usr/share/logwatch/scripts/services
+ dodir /usr/share/logwatch/scripts/shared
+ dodir /etc/logwatch/conf/logfiles
+ dodir /etc/logwatch/conf/services
+ pushd "${S}"/scripts/logwatch >&/dev/null || die
+ emake DESTDIR="${D}" install
+ popd >&/dev/null || die
+ fi
+ fi
+
+ if ! use qt5; then
+ rm -vf "${D}"/usr/share/man/man1/bat.1*
+ fi
+ rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1*
+ if use bacula-clientonly || use bacula-nodir; then
+ rm -vf "${D}"/usr/share/man/man8/bacula-dir.8*
+ rm -vf "${D}"/usr/share/man/man8/dbcheck.8*
+ rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
+ rm -vf "${D}"/usr/libexec/bacula/create_*_database
+ rm -vf "${D}"/usr/libexec/bacula/drop_*_database
+ rm -vf "${D}"/usr/libexec/bacula/make_*_tables
+ rm -vf "${D}"/usr/libexec/bacula/update_*_tables
+ rm -vf "${D}"/usr/libexec/bacula/drop_*_tables
+ rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges
+ rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup
+ fi
+ if use bacula-clientonly || use bacula-nosd; then
+ rm -vf "${D}"/usr/share/man/man8/bacula-sd.8*
+ rm -vf "${D}"/usr/share/man/man8/bcopy.8*
+ rm -vf "${D}"/usr/share/man/man8/bextract.8*
+ rm -vf "${D}"/usr/share/man/man8/bls.8*
+ rm -vf "${D}"/usr/share/man/man8/bscan.8*
+ rm -vf "${D}"/usr/share/man/man8/btape.8*
+ rm -vf "${D}"/usr/libexec/bacula/disk-changer
+ rm -vf "${D}"/usr/libexec/bacula/mtx-changer
+ rm -vf "${D}"/usr/libexec/bacula/dvd-handler
+ fi
+
+ # documentation
+ dodoc ChangeLog ReleaseNotes SUPPORT
+
+ # install examples (bug #457504)
+ if use examples; then
+ docinto examples/
+ dodoc -r examples/*
+ fi
+
+ # vim-files
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins scripts/bacula.vim
+ insinto /usr/share/vim/vimfiles/ftdetect
+ newins scripts/filetype.vim bacula_ft.vim
+ fi
+
+ # setup init scripts
+ myscripts="bacula-fd"
+ if ! use bacula-clientonly; then
+ if ! use bacula-nodir; then
+ myscripts="${myscripts} bacula-dir"
+ fi
+ if ! use bacula-nosd; then
+ myscripts="${myscripts} bacula-sd"
+ fi
+ fi
+ for script in ${myscripts}; do
+ # copy over init script and config to a temporary location
+ # so we can modify them as needed
+ cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
+ cp "${FILESDIR}/newscripts/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
+
+ # now set the database dependancy for the director init script
+ case "${script}" in
+ bacula-dir)
+ case "${mydbtype}" in
+ sqlite3)
+ # sqlite databases don't have a daemon
+ sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die
+ ;;
+ *)
+ # all other databases have daemons
+ sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+
+ # install init script and config
+ newinitd "${T}/${script}".initd "${script}"
+ newconfd "${T}/${script}".confd "${script}"
+ done
+
+ systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service
+
+ # make sure the working directory exists
+ diropts -m0750
+ keepdir /var/lib/bacula
+
+ # make sure bacula group can execute bacula libexec scripts
+ fowners -R root:bacula /usr/libexec/bacula
+}
+
+pkg_postinst() {
+ if use bacula-clientonly; then
+ fowners root:bacula /var/lib/bacula
+ else
+ fowners bacula:bacula /var/lib/bacula
+ fi
+
+ if ! use bacula-clientonly && ! use bacula-nodir; then
+ einfo
+ einfo "If this is a new install, you must create the ${mydbtype} databases with:"
+ einfo " /usr/libexec/bacula/create_${mydbtype}_database"
+ einfo " /usr/libexec/bacula/make_${mydbtype}_tables"
+ einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges"
+ einfo
+
+ ewarn "ATTENTION!"
+ ewarn "The format of the database may have changed."
+ ewarn "If you just upgraded from a version below 9.0.0 you must run"
+ ewarn "'update_bacula_tables' now."
+ ewarn "Make sure to have a backup of your catalog before."
+ ewarn
+ fi
+
+ if use sqlite; then
+ einfo
+ einfo "Be aware that Bacula does not officially support SQLite database anymore."
+ einfo "Best use it only for a client-only installation. See Bug #445540."
+ einfo
+ fi
+
+ einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
+ einfo "you have to enable 'USE=qt5'."
+ einfo
+}
diff --git a/app-backup/bacula/bacula-9.0.6-r3.ebuild b/app-backup/bacula/bacula-9.0.6-r3.ebuild
new file mode 100644
index 000000000000..f30acaa0b53f
--- /dev/null
+++ b/app-backup/bacula/bacula-9.0.6-r3.ebuild
@@ -0,0 +1,430 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit qmake-utils desktop systemd user libtool
+
+MY_PV=${PV/_beta/-b}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Featureful client/server network backup suite"
+HOMEPAGE="http://www.bacula.org/"
+SRC_URI="mirror://sourceforge/bacula/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="acl bacula-clientonly bacula-nodir bacula-nosd examples ipv6 libressl logwatch mysql postgres qt5 readline +sqlite ssl static tcpd vim-syntax X"
+
+DEPEND="
+ dev-libs/gmp:0
+ !bacula-clientonly? (
+ postgres? ( dev-db/postgresql:=[threads] )
+ mysql? ( virtual/mysql )
+ sqlite? ( dev-db/sqlite:3 )
+ !bacula-nodir? ( virtual/mta )
+ )
+ qt5? (
+ dev-qt/qtsvg:5
+ x11-libs/qwt:6
+ )
+ logwatch? ( sys-apps/logwatch )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ readline? ( sys-libs/readline:0 )
+ static? (
+ acl? ( virtual/acl[static-libs] )
+ sys-libs/zlib[static-libs]
+ dev-libs/lzo[static-libs]
+ sys-libs/ncurses:=[static-libs]
+ ssl? (
+ !libressl? ( dev-libs/openssl:0=[static-libs] )
+ libressl? ( dev-libs/libressl:0=[static-libs] )
+ )
+ )
+ !static? (
+ acl? ( virtual/acl )
+ sys-libs/zlib
+ dev-libs/lzo
+ sys-libs/ncurses:=
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ )"
+RDEPEND="${DEPEND}
+ !bacula-clientonly? (
+ !bacula-nosd? (
+ sys-block/mtx
+ app-arch/mt-st
+ )
+ )
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
+
+REQUIRED_USE="!bacula-clientonly? ( ^^ ( mysql postgres sqlite ) )
+ static? ( bacula-clientonly )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ #XOR and !bacula-clientonly controlled by REQUIRED_USE
+ use mysql && export mydbtype="mysql"
+ use postgres && export mydbtype="postgresql"
+ use sqlite && export mydbtype="sqlite3"
+
+ # create the daemon group and user
+ if [ -z "$(egetent group bacula 2>/dev/null)" ]; then
+ enewgroup bacula
+ einfo
+ einfo "The group 'bacula' has been created. Any users you add to this"
+ einfo "group have access to files created by the daemons."
+ einfo
+ fi
+
+ if use bacula-clientonly && use static && use qt5; then
+ ewarn
+ ewarn "Building statically linked 'bat' is not supported. Ignorig 'qt5' useflag."
+ ewarn
+ fi
+
+ if ! use bacula-clientonly; then
+ if [ -z "$(egetent passwd bacula 2>/dev/null)" ]; then
+ enewuser bacula -1 -1 /var/lib/bacula bacula,disk,tape,cdrom,cdrw
+ einfo
+ einfo "The user 'bacula' has been created. Please see the bacula manual"
+ einfo "for information about running bacula as a non-root user."
+ einfo
+ fi
+ fi
+}
+
+src_prepare() {
+ # adjusts default configuration files for several binaries
+ # to /etc/bacula/<config> instead of ./<config>
+ pushd src >&/dev/null || die
+ for f in console/console.c dird/dird.c filed/filed.c \
+ stored/bcopy.c stored/bextract.c stored/bls.c \
+ stored/bscan.c stored/btape.c stored/stored.c \
+ qt-console/main.cpp; do
+ sed -i -e 's|^\(#define CONFIG_FILE "\)|\1/etc/bacula/|g' "${f}" \
+ || die "sed on ${f} failed"
+ done
+ popd >&/dev/null || die
+
+ # bug 466688 drop deprecated categories from Desktop file
+ sed -i -e 's/Application;//' scripts/bat.desktop.in || die
+
+ # bug 466690 Use CXXFLAGS instead of CFLAGS
+ sed -i -e 's/@CFLAGS@/@CXXFLAGS@/' autoconf/Make.common.in || die
+
+ # drop automatic install of unneeded documentation (for bug 356499)
+ eapply -p0 "${FILESDIR}"/7.2.0/${PN}-7.2.0-doc.patch
+
+ # bug #310087
+ eapply "${FILESDIR}"/5.2.3/${PN}-5.2.3-as-needed.patch
+
+ # bug #311161
+ eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-lib-search-path.patch
+
+ # bat needs to respect LDFLAGS and CFLAGS
+ eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-bat-pro.patch
+
+ # bug #328701
+ eapply -p0 "${FILESDIR}"/5.2.3/${PN}-5.2.3-openssl-1.patch
+
+ eapply -p0 "${FILESDIR}"/9.0.2/${PN}-9.0.2-fix-static.patch
+
+ # fix soname in libbaccat.so bug #602952
+ eapply -p0 "${FILESDIR}/bacula-fix-sonames.patch"
+
+ # do not strip binaries
+ sed -i -e "s/strip /# strip /" src/filed/Makefile.in || die
+ sed -i -e "s/strip /# strip /" src/console/Makefile.in || die
+
+ # fix file not found error during make depend
+ eapply -p0 "${FILESDIR}"/7.0.2/${PN}-7.0.2-depend.patch
+
+ # fix missing QtGlobal include in src/qt-console/pages.h for Qt5
+ eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-fix-pages-h-qt-includes.patch
+ eapply_user
+
+ # Fix systemd unit files:
+ # bug 497748
+ sed -i -e '/Requires/d' platforms/systemd/*.service.in || die
+ sed -i -e '/StandardOutput/d' platforms/systemd/*.service.in || die
+ # bug 504370
+ sed -i -e '/Alias=bacula-dir/d' platforms/systemd/bacula-dir.service.in || die
+ # bug 584442 and 504368
+ sed -i -e 's/@dir_user@/root/g' platforms/systemd/bacula-dir.service.in || die
+
+ # build 'bat' for Qt5
+ export QMAKE="$(qt5_get_bindir)"/qmake
+
+ # adapt to >=Qt-5.9 (see bug #644566)
+ # qmake needs an existing target file to generate install instructions
+ sed -i -e 's#bins.files = bat#bins.files = .libs/bat#g' \
+ src/qt-console/bat.pro.in || die
+ mkdir src/qt-console/.libs || die
+ touch src/qt-console/.libs/bat || die
+ chmod 755 src/qt-console/.libs/bat || die
+
+ # fix wrong handling of libressl version
+ eapply -p0 "${FILESDIR}"/9.0.6/${PN}-9.0.6-libressl.patch
+
+ # fix bundled libtool (bug 466696)
+ # But first move directory with M4 macros out of the way.
+ # It is only needed by autoconf and gives errors during elibtoolize.
+ mv autoconf/libtool autoconf/libtool1 || die
+ elibtoolize
+}
+
+src_configure() {
+ local myconf=''
+
+ if use bacula-clientonly; then
+ myconf="${myconf} \
+ $(use_enable bacula-clientonly client-only) \
+ $(use_enable !static libtool) \
+ $(use_enable static static-cons) \
+ $(use_enable static static-fd)"
+ else
+ myconf="${myconf} \
+ $(use_enable !bacula-nodir build-dird) \
+ $(use_enable !bacula-nosd build-stored)"
+ # bug #311099
+ # database support needed by dir-only *and* sd-only
+ # build as well (for building bscan, btape, etc.)
+ myconf="${myconf}
+ --with-${mydbtype}"
+ if use mysql; then
+ myconf="${myconf} \
+ --disable-batch-insert"
+ else
+ myconf="${myconf} \
+ --enable-batch-insert"
+ fi
+ fi
+
+ # do not build bat if 'static' clientonly
+ if ! use bacula-clientonly || ! use static; then
+ myconf="${myconf} \
+ $(use_enable qt5 bat)"
+ fi
+
+ myconf="${myconf} \
+ $(use_with X x) \
+ $(use_enable !readline conio) \
+ $(use_enable readline) \
+ $(use_with readline readline /usr) \
+ $(use_with ssl openssl) \
+ $(use_enable ipv6) \
+ $(use_enable acl) \
+ $(use_with tcpd tcp-wrappers)"
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --docdir=/usr/share/doc/${PF} \
+ --htmldir=/usr/share/doc/${PF}/html \
+ --with-pid-dir=/var/run \
+ --sysconfdir=/etc/bacula \
+ --with-subsys-dir=/var/lock/subsys \
+ --with-working-dir=/var/lib/bacula \
+ --with-logdir=/var/lib/bacula \
+ --with-scriptdir=/usr/libexec/bacula \
+ --with-systemd=$(systemd_get_systemunitdir) \
+ --with-dir-user=bacula \
+ --with-dir-group=bacula \
+ --with-sd-user=root \
+ --with-sd-group=bacula \
+ --with-fd-user=root \
+ --with-fd-group=bacula \
+ --enable-smartalloc \
+ --disable-afs \
+ --host=${CHOST} \
+ ${myconf}
+}
+
+src_compile() {
+ # Make build log verbose (bug #447806)
+ emake NO_ECHO=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ doicon scripts/bacula.png
+
+ # install bat icon and desktop file when enabled
+ # (for some reason ./configure doesn't pick this up)
+ if use qt5 && ! use static ; then
+ doicon src/qt-console/images/bat_icon.png
+ domenu scripts/bat.desktop
+ fi
+
+ # remove some scripts we don't need at all
+ rm -f "${D}"/usr/libexec/bacula/{bacula,bacula-ctl-dir,bacula-ctl-fd,bacula-ctl-sd,startmysql,stopmysql}
+
+ # rename statically linked apps
+ if use bacula-clientonly && use static ; then
+ pushd "${D}"/usr/sbin || die
+ mv static-bacula-fd bacula-fd || die
+ mv static-bconsole bconsole || die
+ popd || die
+ fi
+
+ # extra files which 'make install' doesn't cover
+ if ! use bacula-clientonly; then
+ # the database update scripts
+ diropts -m0750
+ insinto /usr/libexec/bacula/updatedb
+ insopts -m0754
+ doins "${S}"/updatedb/*
+ fperms 0640 /usr/libexec/bacula/updatedb/README
+
+ # the logrotate configuration
+ # (now unconditional wrt bug #258187)
+ diropts -m0755
+ insinto /etc/logrotate.d
+ insopts -m0644
+ newins "${S}"/scripts/logrotate bacula
+
+ # the logwatch scripts
+ if use logwatch; then
+ diropts -m0750
+ dodir /usr/share/logwatch/scripts/services
+ dodir /usr/share/logwatch/scripts/shared
+ dodir /etc/logwatch/conf/logfiles
+ dodir /etc/logwatch/conf/services
+ pushd "${S}"/scripts/logwatch >&/dev/null || die
+ emake DESTDIR="${D}" install
+ popd >&/dev/null || die
+ fi
+ fi
+
+ if ! use qt5; then
+ rm -vf "${D}"/usr/share/man/man1/bat.1*
+ fi
+ rm -vf "${D}"/usr/share/man/man1/bacula-tray-monitor.1*
+ if use bacula-clientonly || use bacula-nodir; then
+ rm -vf "${D}"/usr/share/man/man8/bacula-dir.8*
+ rm -vf "${D}"/usr/share/man/man8/dbcheck.8*
+ rm -vf "${D}"/usr/share/man/man1/bsmtp.1*
+ rm -vf "${D}"/usr/libexec/bacula/create_*_database
+ rm -vf "${D}"/usr/libexec/bacula/drop_*_database
+ rm -vf "${D}"/usr/libexec/bacula/make_*_tables
+ rm -vf "${D}"/usr/libexec/bacula/update_*_tables
+ rm -vf "${D}"/usr/libexec/bacula/drop_*_tables
+ rm -vf "${D}"/usr/libexec/bacula/grant_*_privileges
+ rm -vf "${D}"/usr/libexec/bacula/*_catalog_backup
+ fi
+ if use bacula-clientonly || use bacula-nosd; then
+ rm -vf "${D}"/usr/share/man/man8/bacula-sd.8*
+ rm -vf "${D}"/usr/share/man/man8/bcopy.8*
+ rm -vf "${D}"/usr/share/man/man8/bextract.8*
+ rm -vf "${D}"/usr/share/man/man8/bls.8*
+ rm -vf "${D}"/usr/share/man/man8/bscan.8*
+ rm -vf "${D}"/usr/share/man/man8/btape.8*
+ rm -vf "${D}"/usr/libexec/bacula/disk-changer
+ rm -vf "${D}"/usr/libexec/bacula/mtx-changer
+ rm -vf "${D}"/usr/libexec/bacula/dvd-handler
+ fi
+
+ # documentation
+ dodoc ChangeLog ReleaseNotes SUPPORT
+
+ # install examples (bug #457504)
+ if use examples; then
+ docinto examples/
+ dodoc -r examples/*
+ fi
+
+ # vim-files
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins scripts/bacula.vim
+ insinto /usr/share/vim/vimfiles/ftdetect
+ newins scripts/filetype.vim bacula_ft.vim
+ fi
+
+ # setup init scripts
+ myscripts="bacula-fd"
+ if ! use bacula-clientonly; then
+ if ! use bacula-nodir; then
+ myscripts="${myscripts} bacula-dir"
+ fi
+ if ! use bacula-nosd; then
+ myscripts="${myscripts} bacula-sd"
+ fi
+ fi
+ for script in ${myscripts}; do
+ # copy over init script and config to a temporary location
+ # so we can modify them as needed
+ cp "${FILESDIR}/${script}".confd "${T}/${script}".confd || die "failed to copy ${script}.confd"
+ cp "${FILESDIR}/newscripts/${script}".initd "${T}/${script}".initd || die "failed to copy ${script}.initd"
+
+ # now set the database dependancy for the director init script
+ case "${script}" in
+ bacula-dir)
+ case "${mydbtype}" in
+ sqlite3)
+ # sqlite databases don't have a daemon
+ sed -i -e 's/need "%database%"/:/g' "${T}/${script}".initd || die
+ ;;
+ *)
+ # all other databases have daemons
+ sed -i -e "s:%database%:${mydbtype}:" "${T}/${script}".initd || die
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+
+ # install init script and config
+ newinitd "${T}/${script}".initd "${script}"
+ newconfd "${T}/${script}".confd "${script}"
+ done
+
+ systemd_dounit "${S}"/platforms/systemd/bacula-{dir,fd,sd}.service
+
+ # make sure the working directory exists
+ diropts -m0750
+ keepdir /var/lib/bacula
+
+ # make sure bacula group can execute bacula libexec scripts
+ fowners -R root:bacula /usr/libexec/bacula
+}
+
+pkg_postinst() {
+ if use bacula-clientonly; then
+ fowners root:bacula /var/lib/bacula
+ else
+ fowners bacula:bacula /var/lib/bacula
+ fi
+
+ if ! use bacula-clientonly && ! use bacula-nodir; then
+ einfo
+ einfo "If this is a new install, you must create the ${mydbtype} databases with:"
+ einfo " /usr/libexec/bacula/create_${mydbtype}_database"
+ einfo " /usr/libexec/bacula/make_${mydbtype}_tables"
+ einfo " /usr/libexec/bacula/grant_${mydbtype}_privileges"
+ einfo
+
+ ewarn "ATTENTION!"
+ ewarn "The format of the database may have changed."
+ ewarn "If you just upgraded from a version below 9.0.0 you must run"
+ ewarn "'update_bacula_tables' now."
+ ewarn "Make sure to have a backup of your catalog before."
+ ewarn
+ fi
+
+ if use sqlite; then
+ einfo
+ einfo "Be aware that Bacula does not officially support SQLite database anymore."
+ einfo "Best use it only for a client-only installation. See Bug #445540."
+ einfo
+ fi
+
+ einfo "Please note that 'bconsole' will always be installed. To compile 'bat'"
+ einfo "you have to enable 'USE=qt5'."
+ einfo
+}
diff --git a/app-backup/bacula/files/5.2.10/bacula-5.2.10-fix-static.patch b/app-backup/bacula/files/5.2.10/bacula-5.2.10-fix-static.patch
new file mode 100644
index 000000000000..458c188733a4
--- /dev/null
+++ b/app-backup/bacula/files/5.2.10/bacula-5.2.10-fix-static.patch
@@ -0,0 +1,56 @@
+--- src/console/Makefile.in.orig 2011-10-30 14:10:41.100802721 -0400
++++ src/console/Makefile.in 2011-10-30 14:14:42.330488174 -0400
+@@ -29,10 +29,11 @@
+ GETTEXT_LIBS = @LIBINTL@
+
+ CONS_INC=@CONS_INC@
+ CONS_LIBS=@CONS_LIBS@
+ CONS_LDFLAGS=@CONS_LDFLAGS@
++ZLIBS=@ZLIBS@
+
+ .SUFFIXES: .c .o
+ .PHONY:
+ .DONTCARE:
+
+@@ -46,17 +47,17 @@
+ @echo " "
+
+
+ bconsole: Makefile $(CONSOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+ $(LIBTOOL_LINK) $(CXX) -L../lib -L../cats $(LDFLAGS) $(CONS_LDFLAGS) -o $@ $(CONSOBJS) \
+- $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+- $(OPENSSL_LIBS)
++ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(ZLIBS) $(GETTEXT_LIBS) \
++ $(OPENSSL_LIBS) $(LIBS)
+
+ static-bconsole: Makefile $(CONSOBJS) ../lib/libbac.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+ $(LIBTOOL_LINK) $(CXX) -static $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
+- $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+- $(OPENSSL_LIBS)
++ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(ZLIBS) $(GETTEXT_LIBS) \
++ $(OPENSSL_LIBS) $(LIBS) $(ZLIBS)
+ strip $@
+
+
+ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
+ cd $(topdir) \
+--- src/filed/Makefile.in.orig 2012-06-28 16:52:03.000000000 +0200
++++ src/filed/Makefile.in 2012-08-16 11:08:09.000000000 +0200
+@@ -96,13 +96,13 @@
+ bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
+ @echo "Linking $@ ..."
+ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
+- $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(LIBS) \
+- $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZOLIBS)
++ $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) \
++ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZOLIBS)
+
+ static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a ../lib/libbacpy$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
+ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
+- $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) $(LIBS) \
+- $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZOLIBS)
++ $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbacpy -lbaccfg -lbac -lm $(PYTHON_LIBS) \
++ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZOLIBS)
+ strip $@
+
+ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
diff --git a/app-backup/bacula/files/5.2.12/bacula-5.2.12-depend.patch b/app-backup/bacula/files/5.2.12/bacula-5.2.12-depend.patch
new file mode 100644
index 000000000000..8c419a3bdfac
--- /dev/null
+++ b/app-backup/bacula/files/5.2.12/bacula-5.2.12-depend.patch
@@ -0,0 +1,12 @@
+# fix file not found error during make depend
+--- src/tools/Makefile.in.orig 2012-09-20 20:42:54.000000000 +0200
++++ src/tools/Makefile.in 2012-09-20 20:35:46.000000000 +0200
+@@ -194,7 +194,7 @@
+ @$(MV) Makefile Makefile.bak
+ @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
+ @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
+- @$(CXX) -S -M $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) *.c >> Makefile
++ @$(CXX) -S -M $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) -I../filed -I../dird -I../stored *.c >> Makefile
+ @if test -f Makefile ; then \
+ $(RMF) Makefile.bak; \
+ else \
diff --git a/app-backup/bacula/files/5.2.3/bacula-5.2.3-Makefile.patch b/app-backup/bacula/files/5.2.3/bacula-5.2.3-Makefile.patch
new file mode 100644
index 000000000000..3cdee15d4db7
--- /dev/null
+++ b/app-backup/bacula/files/5.2.3/bacula-5.2.3-Makefile.patch
@@ -0,0 +1,27 @@
+# stop build if there are errors in subdirs
+--- Makefile.in.orig 2010-07-20 16:53:44.000000000 +0000
++++ Makefile.in 2010-07-20 16:55:50.000000000 +0000
+@@ -44,9 +44,8 @@
+
+ all: Makefile
+ @for I in ${all_subdirs}; \
+- do (cd $$I; echo "==>Entering directory `pwd`"; \
+- $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+- echo ""; echo ""; exit 1;)); \
++ do \
++ $(MAKE) DESTDIR=$(DESTDIR) -C $$I $@ || exit 1; \
+ done
+
+ depend:
+@@ -55,9 +54,8 @@
+
+ bacula-fd: Makefile
+ @for I in ${fd_subdirs}; \
+- do (cd $$I; echo "==>Entering directory `pwd`"; \
+- $(MAKE) DESTDIR=$(DESTDIR) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+- echo ""; echo ""; exit 1;)); \
++ do \
++ $(MAKE) DESTDIR=$(DESTDIR) -C $$I all || exit 1; \
+ done
+
+ #-------------------------------------------------------------------------
diff --git a/app-backup/bacula/files/5.2.3/bacula-5.2.3-as-needed.patch b/app-backup/bacula/files/5.2.3/bacula-5.2.3-as-needed.patch
new file mode 100644
index 000000000000..4b52d214cf76
--- /dev/null
+++ b/app-backup/bacula/files/5.2.3/bacula-5.2.3-as-needed.patch
@@ -0,0 +1,14 @@
+# see bug #310087
+diff -urN bacula-5.2.1.orig/src/findlib/Makefile.in bacula-5.2.1/src/findlib/Makefile.in
+--- bacula-5.2.1.orig/src/findlib/Makefile.in 2010-02-24 16:33:48.000000000 +0100
++++ bacula-5.2.1/src/findlib/Makefile.in 2010-03-22 17:37:43.772805754 +0100
+@@ -59,7 +59,7 @@
+
+ libbacfind.la: Makefile $(LIBBACFIND_LOBJS)
+ @echo "Making $@ ..."
+- $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBACFIND_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBACFIND_LT_RELEASE)
++ $(LIBTOOL_LINK) $(CXX) $(DEFS) $(DEBUG) $(LDFLAGS) -o $@ $(LIBBACFIND_LOBJS) -export-dynamic -rpath $(libdir) -release $(LIBBACFIND_LT_RELEASE) -L../lib -lbac $(LIBS) $(OPENSSL_LIBS)
+
+ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
+ cd $(topdir) \
+
diff --git a/app-backup/bacula/files/5.2.3/bacula-5.2.3-doc.patch b/app-backup/bacula/files/5.2.3/bacula-5.2.3-doc.patch
new file mode 100644
index 000000000000..98c6e6ce34be
--- /dev/null
+++ b/app-backup/bacula/files/5.2.3/bacula-5.2.3-doc.patch
@@ -0,0 +1,13 @@
+# drop automatic installation of doc files
+--- Makefile.in.orig 2011-02-26 09:05:21.000000000 +0000
++++ Makefile.in 2011-02-26 09:06:01.000000000 +0000
+@@ -34,8 +34,7 @@
+ autoconf/config.h.in autoconf/acconfig.h autoconf/Make.common.in \
+ autoconf/install-sh autoconf/mkinstalldirs
+
+-doc_files = VERIFYING technotes ChangeLog README ReleaseNotes LICENSE \
+- INSTALL
++doc_files =
+
+ MKDIR = $(srcdir)/autoconf/mkinstalldirs
+ LIBTOOL_DEPS = @LIBTOOL_DEPS@
diff --git a/app-backup/bacula/files/5.2.3/bacula-5.2.3-ldflags.patch b/app-backup/bacula/files/5.2.3/bacula-5.2.3-ldflags.patch
new file mode 100644
index 000000000000..94d8fb60120e
--- /dev/null
+++ b/app-backup/bacula/files/5.2.3/bacula-5.2.3-ldflags.patch
@@ -0,0 +1,11 @@
+# bat needs to respect LDFLAGS
+--- src/qt-console/bat.pro.in.orig 2010-07-20 18:28:50.000000000 +0000
++++ src/qt-console/bat.pro.in 2010-07-20 18:29:25.000000000 +0000
+@@ -26,6 +26,7 @@
+ QMAKE_LINK = $${LIBTOOL_LINK} $(CXX)
+ QMAKE_INSTALL_PROGRAM = $${LIBTOOL_INSTALL} install -m @SBINPERM@ -p
+ QMAKE_CLEAN += .libs/* bat
++QMAKE_LFLAGS += @LDFLAGS@
+
+ qwt {
+ INCLUDEPATH += @QWT_INC@
diff --git a/app-backup/bacula/files/5.2.3/bacula-5.2.3-lib-search-path.patch b/app-backup/bacula/files/5.2.3/bacula-5.2.3-lib-search-path.patch
new file mode 100644
index 000000000000..c3bded40ad03
--- /dev/null
+++ b/app-backup/bacula/files/5.2.3/bacula-5.2.3-lib-search-path.patch
@@ -0,0 +1,12 @@
+# If upgrading the old libraries gets linked first. So fix order of lib search path.
+--- src/console/Makefile.in.orig 2010-03-29 11:35:00.000000000 +0000
++++ src/console/Makefile.in 2010-03-29 11:45:14.000000000 +0000
+@@ -47,7 +47,7 @@
+
+
+ bconsole: Makefile $(CONSOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
++ $(LIBTOOL_LINK) $(CXX) -L../lib -L../cats $(LDFLAGS) $(CONS_LDFLAGS) -o $@ $(CONSOBJS) \
+ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+ $(OPENSSL_LIBS)
+
diff --git a/app-backup/bacula/files/5.2.3/bacula-5.2.3-openssl-1.patch b/app-backup/bacula/files/5.2.3/bacula-5.2.3-openssl-1.patch
new file mode 100644
index 000000000000..58d26316ca7d
--- /dev/null
+++ b/app-backup/bacula/files/5.2.3/bacula-5.2.3-openssl-1.patch
@@ -0,0 +1,25 @@
+http://bugs.gentoo.org/328701
+http://cvs.fedoraproject.org/viewvc/rpms/bacula/devel/bacula-5.0.2-openssl.patch?revision=1.3&view=markup
+
+--- src/lib/crypto.c
++++ src/lib/crypto.c
+@@ -51,7 +51,7 @@
+ * For OpenSSL version 1.x, EVP_PKEY_encrypt no longer
+ * exists. It was not an official API.
+ */
+-#ifdef HAVE_OPENSSLv1
++#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
+ #define EVP_PKEY_encrypt EVP_PKEY_encrypt_old
+ #define EVP_PKEY_decrypt EVP_PKEY_decrypt_old
+ #endif
+--- src/lib/tls.c
++++ src/lib/tls.c
+@@ -315,7 +315,7 @@ bool tls_postconnect_verify_host(JCR *jc
+ extname = OBJ_nid2sn(OBJ_obj2nid(X509_EXTENSION_get_object(ext)));
+
+ if (strcmp(extname, "subjectAltName") == 0) {
+-#ifdef HAVE_OPENSSLv1
++#if (OPENSSL_VERSION_NUMBER >= 0x10000000L)
+ const X509V3_EXT_METHOD *method;
+ #else
+ X509V3_EXT_METHOD *method;
diff --git a/app-backup/bacula/files/7.0.2/bacula-7.0.2-depend.patch b/app-backup/bacula/files/7.0.2/bacula-7.0.2-depend.patch
new file mode 100644
index 000000000000..e076cd6478cc
--- /dev/null
+++ b/app-backup/bacula/files/7.0.2/bacula-7.0.2-depend.patch
@@ -0,0 +1,12 @@
+# fix file not found error during make depend
+--- src/tools/Makefile.in.orig 2012-09-20 20:42:54.000000000 +0200
++++ src/tools/Makefile.in 2012-09-20 20:35:46.000000000 +0200
+@@ -194,7 +194,7 @@
+ @$(MV) Makefile Makefile.bak
+ @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
+ @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
+- @$(CXX) -S -M $(CPPFLAGS) -I$(srcdir) -I$(basedir) *.c >> Makefile
++ @$(CXX) -S -M $(CPPFLAGS) -I$(srcdir) -I$(basedir) -I../filed -I../dird -I../stored *.c >> Makefile
+ @if test -f Makefile ; then \
+ $(RMF) Makefile.bak; \
+ else \
diff --git a/app-backup/bacula/files/7.2.0/bacula-7.2.0-doc.patch b/app-backup/bacula/files/7.2.0/bacula-7.2.0-doc.patch
new file mode 100644
index 000000000000..155746a876dd
--- /dev/null
+++ b/app-backup/bacula/files/7.2.0/bacula-7.2.0-doc.patch
@@ -0,0 +1,12 @@
+--- Makefile.in.orig 2015-09-03 20:03:22.000000000 +0200
++++ Makefile.in 2015-09-03 20:03:50.000000000 +0200
+@@ -35,8 +35,7 @@
+ autoconf/config.h.in autoconf/acconfig.h autoconf/Make.common.in \
+ autoconf/install-sh autoconf/mkinstalldirs
+
+-doc_files = VERIFYING ChangeLog README ReleaseNotes LICENSE \
+- LICENSE-FAQ LICENSE-FOSS INSTALL
++doc_files =
+
+ MKDIR = $(srcdir)/autoconf/mkinstalldirs
+ LIBTOOL_DEPS = @LIBTOOL_DEPS@
diff --git a/app-backup/bacula/files/7.2.0/bacula-7.2.0-fix-static.patch b/app-backup/bacula/files/7.2.0/bacula-7.2.0-fix-static.patch
new file mode 100644
index 000000000000..faf0d065b90f
--- /dev/null
+++ b/app-backup/bacula/files/7.2.0/bacula-7.2.0-fix-static.patch
@@ -0,0 +1,56 @@
+--- src/console/Makefile.in.orig 2011-10-30 14:10:41.100802721 -0400
++++ src/console/Makefile.in 2011-10-30 14:14:42.330488174 -0400
+@@ -29,10 +29,11 @@
+ GETTEXT_LIBS = @LIBINTL@
+
+ CONS_INC=@CONS_INC@
+ CONS_LIBS=@CONS_LIBS@
+ CONS_LDFLAGS=@CONS_LDFLAGS@
++ZLIBS=@ZLIBS@
+
+ .SUFFIXES: .c .o
+ .PHONY:
+ .DONTCARE:
+
+@@ -46,17 +47,17 @@
+ @echo " "
+
+
+ bconsole: Makefile $(CONSOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+ $(LIBTOOL_LINK) $(CXX) -L../lib -L../cats $(LDFLAGS) $(CONS_LDFLAGS) -o $@ $(CONSOBJS) \
+- $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+- $(OPENSSL_LIBS)
++ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(ZLIBS) $(GETTEXT_LIBS) \
++ $(OPENSSL_LIBS) $(LIBS)
+
+ static-bconsole: Makefile $(CONSOBJS) ../lib/libbac.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+ $(LIBTOOL_LINK) $(CXX) -static $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
+- $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+- $(OPENSSL_LIBS)
++ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(ZLIBS) $(GETTEXT_LIBS) \
++ $(OPENSSL_LIBS) $(LIBS) $(ZLIBS)
+ strip $@
+
+
+ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
+ cd $(topdir) \
+--- src/filed/Makefile.in.orig 2015-09-04 12:47:13.000000000 +0200
++++ src/filed/Makefile.in 2015-09-04 12:49:39.000000000 +0200
+@@ -66,13 +66,13 @@
+ bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+ @echo "Linking $@ ..."
+ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
+- $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
+- $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
++ $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm \
++ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
+
+ static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
+- $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
+- $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
++ $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm \
++ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
+ strip $@
+
+ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
diff --git a/app-backup/bacula/files/9.0.2/bacula-9.0.2-fix-static.patch b/app-backup/bacula/files/9.0.2/bacula-9.0.2-fix-static.patch
new file mode 100644
index 000000000000..bf6630a74a29
--- /dev/null
+++ b/app-backup/bacula/files/9.0.2/bacula-9.0.2-fix-static.patch
@@ -0,0 +1,63 @@
+--- src/console/Makefile.in.orig 2017-07-25 19:03:05.664760298 +0200
++++ src/console/Makefile.in 2017-07-25 19:05:43.576706091 +0200
+@@ -24,6 +24,7 @@
+ CONSSRCS = console.c console_conf.c authenticate.c @CONS_SRC@
+ CONSOBJS = console.o console_conf.o authenticate.o @CONS_OBJ@
+ JSONOBJS = bbconsjson.o console_conf.o
++ZLIBS=@ZLIBS@
+
+ # these are the objects that are changed by the .configure process
+ EXTRAOBJS = @OBJLIST@
+@@ -50,18 +51,18 @@
+
+ bconsole: Makefile $(CONSOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+ $(LIBTOOL_LINK) $(CXX) -L../lib -L../cats $(LDFLAGS) $(CONS_LDFLAGS) -o $@ $(CONSOBJS) \
+- $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+- $(OPENSSL_LIBS)
++ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(ZLIBS) $(GETTEXT_LIBS) \
++ $(OPENSSL_LIBS) $(LIBS)
+
+ bbconsjson: Makefile $(JSONOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+ $(LIBTOOL_LINK) $(CXX) -L../lib -L../cats $(LDFLAGS) $(CONS_LDFLAGS) -o $@ $(JSONOBJS) \
+- $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+- $(OPENSSL_LIBS)
++ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(ZLIBS) $(GETTEXT_LIBS) \
++ $(OPENSSL_LIBS) $(LIBS)
+
+ static-bconsole: Makefile $(CONSOBJS) ../lib/libbac.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+ $(LIBTOOL_LINK) $(CXX) -static -L../lib -L../cats $(LDFLAGS) $(CONS_LDFLAGS) -o $@ $(CONSOBJS) \
+- $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+- $(OPENSSL_LIBS)
++ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(ZLIBS) $(GETTEXT_LIBS) \
++ $(OPENSSL_LIBS) $(LIBS)
+ strip $@
+
+
+--- src/filed/Makefile.in.orig 2017-07-25 19:09:19.655852979 +0200
++++ src/filed/Makefile.in 2017-07-25 19:11:39.519558592 +0200
+@@ -69,19 +69,19 @@
+ bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+ @echo "Linking $@ ..."
+ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
+- $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
+- $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
++ $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm \
++ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
+
+ bfdjson: Makefile $(JSONOBJS) ../findlib/libbacfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) @WIN32@
+ @echo "Linking $@ ..."
+ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(JSONOBJS) \
+- $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
+- $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
++ $(WIN32LIBS) $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm \
++ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
+
+ static-bacula-fd: Makefile $(SVROBJS) ../findlib/libbacfind.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE)
+ $(LIBTOOL_LINK) $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
+- $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm $(LIBS) \
+- $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
++ $(FDLIBS) $(ZLIBS) -lbacfind -lbaccfg -lbac -lm \
++ $(DLIB) $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) $(LIBS) $(CAP_LIBS) $(AFS_LIBS) $(LZO_LIBS)
+ strip $@
+
+ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
diff --git a/app-backup/bacula/files/9.0.2/bacula-9.0.2-lib-search-path.patch b/app-backup/bacula/files/9.0.2/bacula-9.0.2-lib-search-path.patch
new file mode 100644
index 000000000000..33cf83dcf150
--- /dev/null
+++ b/app-backup/bacula/files/9.0.2/bacula-9.0.2-lib-search-path.patch
@@ -0,0 +1,25 @@
+# If upgrading the old libraries gets linked first. So fix order of
+# lib search path.
+--- src/console/Makefile.in.orig 2017-07-26 15:03:07.000000000 +0200
++++ src/console/Makefile.in 2017-07-23 18:31:57.000000000 +0200
+@@ -49,17 +49,17 @@
+
+
+ bconsole: Makefile $(CONSOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
++ $(LIBTOOL_LINK) $(CXX) -L../lib -L../cats $(LDFLAGS) $(CONS_LDFLAGS) -o $@ $(CONSOBJS) \
+ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+ $(OPENSSL_LIBS)
+
+ bbconsjson: Makefile $(JSONOBJS) ../lib/libbac$(DEFAULT_ARCHIVE_TYPE) ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(JSONOBJS) \
++ $(LIBTOOL_LINK) $(CXX) -L../lib -L../cats $(LDFLAGS) $(CONS_LDFLAGS) -o $@ $(JSONOBJS) \
+ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+ $(OPENSSL_LIBS)
+
+ static-bconsole: Makefile $(CONSOBJS) ../lib/libbac.a ../lib/libbaccfg$(DEFAULT_ARCHIVE_TYPE)
+- $(LIBTOOL_LINK) $(CXX) -static $(LDFLAGS) $(CONS_LDFLAGS) -L../lib -L../cats -o $@ $(CONSOBJS) \
++ $(LIBTOOL_LINK) $(CXX) -static -L../lib -L../cats $(LDFLAGS) $(CONS_LDFLAGS) -o $@ $(CONSOBJS) \
+ $(DLIB) $(CONS_LIBS) -lbaccfg -lbac -lm $(LIBS) $(GETTEXT_LIBS) \
+ $(OPENSSL_LIBS)
+ strip $@
diff --git a/app-backup/bacula/files/9.0.6/bacula-9.0.6-bat-pro.patch b/app-backup/bacula/files/9.0.6/bacula-9.0.6-bat-pro.patch
new file mode 100644
index 000000000000..3d055b8c3077
--- /dev/null
+++ b/app-backup/bacula/files/9.0.6/bacula-9.0.6-bat-pro.patch
@@ -0,0 +1,21 @@
+--- src/qt-console/bat.pro.in.orig 2018-02-18 16:17:21.027921363 +0100
++++ src/qt-console/bat.pro.in 2018-02-18 16:18:12.554137528 +0100
+@@ -12,7 +12,7 @@
+ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
+ bins.path = /$(DESTDIR)@sbindir@
+-bins.files = bat
++bins.files = .libs/bat
+ confs.path = /$(DESTDIR)@sysconfdir@
+ confs.commands = ./install_conf_file
+ help.path = /$(DESTDIR)@docdir@
+@@ -29,6 +29,9 @@
+ QMAKE_LINK = $${LIBTOOL_LINK} $(CXX)
+ QMAKE_INSTALL_PROGRAM = $${LIBTOOL_INSTALL} install -m @SBINPERM@ -p
+ QMAKE_CLEAN += .libs/* bat
++QMAKE_LFLAGS += @LDFLAGS@
++QMAKE_CFLAGS += @CFLAGS@
++QMAKE_CXXFLAGS += @CXXFLAGS@
+
+ qwt {
+ INCLUDEPATH += @QWT_INC@
diff --git a/app-backup/bacula/files/9.0.6/bacula-9.0.6-fix-pages-h-qt-includes.patch b/app-backup/bacula/files/9.0.6/bacula-9.0.6-fix-pages-h-qt-includes.patch
new file mode 100644
index 000000000000..9d6507c9c71a
--- /dev/null
+++ b/app-backup/bacula/files/9.0.6/bacula-9.0.6-fix-pages-h-qt-includes.patch
@@ -0,0 +1,15 @@
+--- src/qt-console/pages.h.orig 2017-11-21 12:37:16.000000000 -0500
++++ src/qt-console/pages.h 2018-02-07 13:11:46.223273248 -0500
+@@ -20,10 +20,11 @@
+ */
+ /*
+ * Dirk Bartley, March 2007
+ */
+
++#include <QtGlobal>
+ #if QT_VERSION >= 0x050000
+ #include <QtWidgets>
+ #else
+ #include <QtGui>
+ #endif
+
diff --git a/app-backup/bacula/files/9.0.6/bacula-9.0.6-libressl.patch b/app-backup/bacula/files/9.0.6/bacula-9.0.6-libressl.patch
new file mode 100644
index 000000000000..3df4285c2e2e
--- /dev/null
+++ b/app-backup/bacula/files/9.0.6/bacula-9.0.6-libressl.patch
@@ -0,0 +1,62 @@
+--- src/lib/crypto.c.orig 2018-02-02 15:34:39.420489000 -0600
++++ src/lib/crypto.c 2018-02-02 15:35:44.000524000 -0600
+@@ -195,7 +195,7 @@
+ IMPLEMENT_ASN1_FUNCTIONS(SignatureData)
+ IMPLEMENT_ASN1_FUNCTIONS(CryptoData)
+
+-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
++#if ( (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) )
+ DEFINE_STACK_OF(SignerInfo);
+ DEFINE_STACK_OF(RecipientInfo);
+ #else
+--- src/lib/openssl-compat.h.orig 2018-02-02 15:26:04.182557000 -0600
++++ src/lib/openssl-compat.h 2018-02-02 15:27:50.229100000 -0600
+@@ -1,7 +1,7 @@
+ #ifndef __OPENSSL_COPMAT__H__
+ #define __OPENSSL_COPMAT__H__
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if ( (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) )
+ static inline int EVP_PKEY_up_ref(EVP_PKEY *pkey)
+ {
+ CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY);
+--- src/lib/openssl.c.orig 2018-02-16 08:36:24.092583000 -0600
++++ src/lib/openssl.c 2018-02-16 08:37:23.795454000 -0600
+@@ -69,7 +69,7 @@
+ }
+ }
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if ( (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) )
+ /* Array of mutexes for use with OpenSSL static locking */
+ static pthread_mutex_t *mutexes;
+
+@@ -263,7 +263,7 @@
+ {
+ int stat = 0;
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if ( (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) )
+ if ((stat = openssl_init_threads()) != 0) {
+ berrno be;
+ Jmsg1(NULL, M_ABORT, 0,
+@@ -310,7 +310,7 @@
+ Jmsg0(NULL, M_ERROR, 0, _("Failed to save OpenSSL PRNG\n"));
+ }
+
+-#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
++#if ( (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) )
+ openssl_cleanup_threads();
+
+ /* Free libssl and libcrypto error strings */
+--- src/lib/tls.c.orig 2017-11-21 18:37:16.000000000 +0100
++++ src/lib/tls.c 2018-04-16 20:00:54.082000000 +0200
+@@ -116,7 +116,7 @@
+ ctx = (TLS_CONTEXT *)malloc(sizeof(TLS_CONTEXT));
+
+ /* Allocate our OpenSSL TLS Context */
+-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
++#if ( (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) )
+ /* Allows SSLv3, TLSv1, TLSv1.1 and TLSv1.2 protocols */
+ ctx->openssl = SSL_CTX_new(TLS_method());
+
diff --git a/app-backup/bacula/files/bacula-dir.confd b/app-backup/bacula/files/bacula-dir.confd
new file mode 100644
index 000000000000..59f684660cda
--- /dev/null
+++ b/app-backup/bacula/files/bacula-dir.confd
@@ -0,0 +1,16 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Config file for /etc/init.d/bacula-dir
+
+# If the database server where you store your bacula catalog
+# is on a different machine, please set this to 0.
+# Setting it to 1 makes bacula-dir depend on the corresponding
+# database service selected at package compile time.
+LOCAL_DB=1
+
+# Options for the director daemon.
+# The director can be run as a non-root user, however
+# please ensure that this user has proper permissions to
+# access your backup devices.
+DIR_OPTIONS="-u root -g bacula -c /etc/bacula/bacula-dir.conf"
diff --git a/app-backup/bacula/files/bacula-dir.initd b/app-backup/bacula/files/bacula-dir.initd
new file mode 100644
index 000000000000..0601ca56e2c4
--- /dev/null
+++ b/app-backup/bacula/files/bacula-dir.initd
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ if [ "${LOCAL_DB}" -eq 1 ]; then
+ need "%database%"
+ fi
+ use dns bacula-fd bacula-sd
+}
+
+start() {
+ ebegin "Starting bacula director"
+ start-stop-daemon --start --quiet --exec /usr/sbin/bacula-dir \
+ -- ${DIR_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bacula director"
+ start-stop-daemon --stop --quiet --pidfile /var/run/bacula-dir.*.pid
+ eend $?
+}
diff --git a/app-backup/bacula/files/bacula-fd.confd b/app-backup/bacula/files/bacula-fd.confd
new file mode 100644
index 000000000000..eed82ccbc6f4
--- /dev/null
+++ b/app-backup/bacula/files/bacula-fd.confd
@@ -0,0 +1,7 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Config file for /etc/init.d/bacula-fd
+
+# Options for the file daemon.
+FD_OPTIONS="-u root -g bacula -c /etc/bacula/bacula-fd.conf"
diff --git a/app-backup/bacula/files/bacula-fd.initd b/app-backup/bacula/files/bacula-fd.initd
new file mode 100644
index 000000000000..1cc636edbf9c
--- /dev/null
+++ b/app-backup/bacula/files/bacula-fd.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ use dns
+}
+
+start() {
+ ebegin "Starting bacula file daemon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/bacula-fd \
+ -- ${FD_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bacula file daemon"
+ start-stop-daemon --stop --quiet --pidfile /var/run/bacula-fd.*.pid
+ eend $?
+}
diff --git a/app-backup/bacula/files/bacula-fix-sonames.patch b/app-backup/bacula/files/bacula-fix-sonames.patch
new file mode 100644
index 000000000000..d05b2b9a37fb
--- /dev/null
+++ b/app-backup/bacula/files/bacula-fix-sonames.patch
@@ -0,0 +1,36 @@
+=== modified file 'autoconf/ltmain.sh'
+--- autoconf/ltmain.sh 2011-11-06 20:34:58 +0000
++++ autoconf/ltmain.sh 2012-02-09 17:27:13 +0000
+@@ -2428,6 +2428,7 @@
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
++ -soname SONAME override the standard shared object name
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+@@ -5422,6 +5423,11 @@
+ prev=
+ continue
+ ;;
++ soname)
++ soname_spec="$arg"
++ prev=
++ continue
++ ;;
+ weak)
+ func_append weak_libs " $arg"
+ prev=
+@@ -5741,6 +5747,11 @@
+ continue
+ ;;
+
++ -soname)
++ prev=soname
++ continue
++ ;;
++
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+
diff --git a/app-backup/bacula/files/bacula-sd.confd b/app-backup/bacula/files/bacula-sd.confd
new file mode 100644
index 000000000000..8d6f7d2e60d4
--- /dev/null
+++ b/app-backup/bacula/files/bacula-sd.confd
@@ -0,0 +1,10 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Config file for /etc/init.d/bacula-sd
+
+# Options for the storage daemon.
+# The storage daemon can be run as a non-root user, however
+# please ensure that this user has proper permissions to
+# access your backup devices.
+SD_OPTIONS="-u root -g bacula -c /etc/bacula/bacula-sd.conf"
diff --git a/app-backup/bacula/files/bacula-sd.initd b/app-backup/bacula/files/bacula-sd.initd
new file mode 100644
index 000000000000..a18840242efa
--- /dev/null
+++ b/app-backup/bacula/files/bacula-sd.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+ use dns
+}
+
+start() {
+ ebegin "Starting bacula storage daemon"
+ start-stop-daemon --start --quiet --exec /usr/sbin/bacula-sd \
+ -- ${SD_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bacula storage daemon"
+ start-stop-daemon --stop --quiet --pidfile /var/run/bacula-sd.*.pid
+ eend $?
+}
diff --git a/app-backup/bacula/files/newscripts/bacula-dir.initd b/app-backup/bacula/files/newscripts/bacula-dir.initd
new file mode 100755
index 000000000000..d717f07f7926
--- /dev/null
+++ b/app-backup/bacula/files/newscripts/bacula-dir.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+command=/usr/sbin/bacula-dir
+command_args="${DIR_OPTIONS}"
+pidfile=/var/run/bacula-dir.9101.pid
+
+depend() {
+ need net
+ if [ "${LOCAL_DB}" -eq 1 ]; then
+ :
+ fi
+ use dns bacula-fd bacula-sd
+}
+
diff --git a/app-backup/bacula/files/newscripts/bacula-fd.initd b/app-backup/bacula/files/newscripts/bacula-fd.initd
new file mode 100755
index 000000000000..fe6a8815b9fd
--- /dev/null
+++ b/app-backup/bacula/files/newscripts/bacula-fd.initd
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/sbin/bacula-fd
+command_args="${FD_OPTIONS}"
+pidfile=/var/run/bacula-fd.9102.pid
+
+depend() {
+ need net
+ use dns
+}
diff --git a/app-backup/bacula/files/newscripts/bacula-sd.initd b/app-backup/bacula/files/newscripts/bacula-sd.initd
new file mode 100755
index 000000000000..07facefbb4a4
--- /dev/null
+++ b/app-backup/bacula/files/newscripts/bacula-sd.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+command=/usr/sbin/bacula-sd
+command_args="${SD_OPTIONS}"
+pidfile=/var/run/bacula-sd.9103.pid
+
+depend() {
+ need net
+ use dns
+}
diff --git a/app-backup/bacula/metadata.xml b/app-backup/bacula/metadata.xml
new file mode 100644
index 000000000000..1ebf5f232fac
--- /dev/null
+++ b/app-backup/bacula/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tomjbe@gentoo.org</email>
+ <name>Thomas Beierlein</name>
+ </maintainer>
+ <use>
+ <flag name="bacula-clientonly">Disable DB support, and just build a
+ client</flag>
+ <flag name="bacula-nodir">Disable building of director</flag>
+ <flag name="bacula-nosd">Disable building of storage daemon</flag>
+ <flag name="logwatch">Install support files for logwatch</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">bacula</remote-id>
+ </upstream>
+</pkgmetadata>