Skip to content

Commit

Permalink
bacula: update to 15.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dgilman committed Sep 14, 2024
1 parent a4bfe38 commit aeb420e
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 53 deletions.
53 changes: 17 additions & 36 deletions sysutils/bacula/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
PortSystem 1.0

name bacula
version 9.4.4
revision 1
version 15.0.2
revision 0
categories sysutils
platforms darwin
license {AGPL-3 OpenSSLException}
maintainers nomaintainer

Expand All @@ -18,9 +17,9 @@ long_description Bacula is a set of computer programs that permit you to \
homepage http://www.bacula.org/
master_sites sourceforge

checksums rmd160 775b0da2ae838ed34b4f515c53883551569a85f3 \
sha256 0fe37a02ca768a720099d0d03509c364aff2390c05544d663f4819f8e7fc20be \
size 4159759
checksums rmd160 b8016d60363baca6db83287ac02202c18984e52f \
sha256 55515c2a66af9a86b955daea4089378b864d051b2e6e30383bef36e693acea7a \
size 6524812

depends_build port:pkgconfig
depends_lib port:gawk \
Expand All @@ -32,6 +31,8 @@ depends_lib port:gawk \
port:zlib \
port:lzo2

patchfiles dynamic_lookup-11.patch

configure.ccache no
configure.args --mandir=${prefix}/share/man \
--docdir=${prefix}/share/doc/bacula \
Expand All @@ -54,7 +55,7 @@ configure.args --mandir=${prefix}/share/man \
--with-tcp-wrappers

configure.cppflags-append -I${prefix}/ncurses
configure.ldflags ""
configure.ldflags "-framework CoreFoundation"

destroot.keepdirs ${destroot}${prefix}/var/run/subsys \
${destroot}${prefix}/var/bacula/working
Expand All @@ -74,7 +75,7 @@ startupitem.stop "\[ -r \${PID} \] && /bin/kill \$(cat \${PID})"
notes "To use the Bacula FD client, you'll need to configure \"${prefix}/etc/bacula/bacula-fd.conf\"."
notes-append "To use bconsole, you'll need to configure \"${prefix}/etc/bacula/bconsole.conf\"."

variant client_only conflicts mysql51 mysql55 postgresql83 postgresql84 sqlite3 description "Install bacula client (bacula-fd) only" {
variant client_only conflicts mysql51 mysql55 postgresql16 sqlite3 description "Install bacula client (bacula-fd) only" {
configure.args-append --enable-client-only
}

Expand All @@ -99,7 +100,7 @@ variant console_bat description "Install BAT console GUI application" {
notes-append "To use the Bacula BAT GUI, you'll need to configure \"${prefix}/etc/bacula/bat.conf\"."
}

variant mysql51 conflicts client_only mysql55 postgresql83 postgresql84 sqlite3 description "Install bacula client and server with mysql 5.1 backend" {
variant mysql51 conflicts client_only mysql55 postgresql16 sqlite3 description "Install bacula client and server with mysql 5.1 backend" {
depends_lib-append port:mysql51
configure.args-append --with-mysql=${prefix}/include/mysql51/mysql
configure.args-delete --without-mysql
Expand All @@ -120,7 +121,7 @@ variant mysql51 conflicts client_only mysql55 postgresql83 postgresql84 sqlite3
"
}

variant mysql55 conflicts client_only mysql51 postgresql83 postgresql84 sqlite3 description "Install bacula client and server with mysql 5.5 backend" {
variant mysql55 conflicts client_only mysql51 postgresql16 sqlite3 description "Install bacula client and server with mysql 5.5 backend" {
depends_lib-append port:mysql55
configure.args-append --with-mysql=${prefix}/include/mysql55/mysql
configure.args-delete --without-mysql
Expand All @@ -141,33 +142,12 @@ variant mysql55 conflicts client_only mysql51 postgresql83 postgresql84 sqlite3
"
}

variant postgresql83 conflicts mysql51 mysql55 postgresql84 sqlite3 client_only description "Install bacula client and server with postgresql 8.3 backend" {
depends_lib-append port:postgresql83
variant postgresql16 conflicts mysql51 mysql55 sqlite3 client_only description "Install bacula client and server with postgresql 16 backend" {
depends_lib-append port:postgresql16
configure.args-append --with-postgresql
configure.args-delete --without-postgresql
configure.args-append --enable-batch-insert
configure.env-append PATH=${prefix}/lib/postgresql83/bin:$env(PATH)

patchfiles-append patch-create_postgresql_database.diff

notes-append "
To use the Bacula Director, you'll need to perform the following steps:
1. create user \"bacula\" on a PostgreSQL database
2. execute \"${prefix}/etc/bacula/create_bacula_database -h <postgresql-server> -U <db_admin_user>\"
3. execute \"${prefix}/etc/bacula/make_bacula_tables -h <postgresql-server> -U <db_admin_user>\"
4. execute \"${prefix}/etc/bacula/grant_bacula_privileges -h <postgresql-server> -U <db_admin_user> -p\"
5. configure \"${prefix}/etc/bacula/bacula-dir.conf\" and set the catalog database settings for the bacula db user.
"
}

variant postgresql84 conflicts mysql51 mysql55 postgresql83 sqlite3 client_only description "Install bacula client and server with postgresql 8.4 backend" {
depends_lib-append port:postgresql84
configure.args-append --with-postgresql
configure.args-delete --without-postgresql
configure.args-append --enable-batch-insert
configure.env-append PATH=${prefix}/lib/postgresql84/bin:$env(PATH)

patchfiles-append patch-create_postgresql_database.diff
configure.env-append PATH=${prefix}/lib/postgresql16/bin:$env(PATH)

notes-append "
To use the Bacula Director, you'll need to perform the following steps:
Expand All @@ -179,7 +159,7 @@ variant postgresql84 conflicts mysql51 mysql55 postgresql83 sqlite3 client_only
"
}

variant sqlite3 conflicts client_only mysql51 mysql55 postgresql83 postgresql84 description "Install bacula client and server with sqlite 3 backend" {
variant sqlite3 conflicts client_only mysql51 mysql55 postgresql16 description "Install bacula client and server with sqlite 3 backend" {
depends_lib-append port:sqlite3
configure.args-append --with-sqlite3=${prefix}
configure.args-delete --without-sqlite3
Expand All @@ -194,7 +174,7 @@ variant sqlite3 conflicts client_only mysql51 mysql55 postgresql83 postgresql84

default_variants +console_bat

if {![variant_isset mysql51] && ![variant_isset mysql55] && ![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset sqlite3]} {
if {![variant_isset mysql51] && ![variant_isset mysql55] && ![variant_isset postgresql16] && ![variant_isset sqlite3]} {
default_variants-append +client_only
} else {
# is a server installation
Expand All @@ -213,6 +193,7 @@ if {![variant_isset mysql51] && ![variant_isset mysql55] && ![variant_isset post
file rename ${destroot}${prefix}/etc/bacula/bacula-sd.conf ${destroot}${prefix}/etc/bacula/bacula-sd.conf.example
}
notes-append "To use the Bacula Storage Daemon, you'll need to configure \"${prefix}/etc/bacula/bacula-sd.conf\"."
notes-append "If you are upgrading from a 9.x version of Bacula you must update the database with \"${prefix}/etc/bacula/update_bacula_tables\"."
}

pre-deactivate {
Expand Down
24 changes: 24 additions & 0 deletions sysutils/bacula/files/dynamic_lookup-11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Handle macOS 11 and later properly. Copied from libtool port.
--- configure.orig 2024-09-14 10:55:37.478329337 -0400
+++ configure 2024-09-14 10:58:10.065950473 -0400
@@ -9220,16 +9220,11 @@
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
darwin1.*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
+ darwin*)
+ case ${MACOSX_DEPLOYMENT_TARGET},$host in
+ 10.[012],*|,*powerpc*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
+ *)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
esac
;;
11 changes: 5 additions & 6 deletions sysutils/bacula/files/patch-configure-qt4.diff
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
--- configure.org 2016-04-19 18:47:42.000000000 +0200
+++ configure 2016-04-19 18:49:24.000000000 +0200
@@ -21792,6 +21792,10 @@
--- configure.orig 2024-09-14 10:54:42.236644000 -0400
+++ configure 2024-09-14 10:55:10.790162390 -0400
@@ -22046,6 +22046,10 @@

BAT_DIR=
if test x$support_bat = xyes; then
+ # by MacPorts patch
+ export QMAKE="$prefix/libexec/qt4/bin/qmake"
+ export PKG_CONFIG_PATH="$prefix/libexec/qt4/lib/pkgconfig"
+ # by MacPorts patch end
abc=`$PKGCONFIG QtGui`
abc=`$PKG_CONFIG QtGui`
pkg=$?
if test $pkg = 0; then

11 changes: 0 additions & 11 deletions sysutils/bacula/files/patch-create_postgresql_database.diff

This file was deleted.

0 comments on commit aeb420e

Please sign in to comment.