diff --git a/databases/pgbackrest/Makefile b/databases/pgbackrest/Makefile --- a/databases/pgbackrest/Makefile +++ b/databases/pgbackrest/Makefile @@ -1,6 +1,6 @@ PORTNAME= pgbackrest DISTVERSIONPREFIX= release/ -DISTVERSION= 2.49 +DISTVERSION= 2.51 CATEGORIES= databases MAINTAINER= schoutm@gmail.com @@ -8,31 +8,37 @@ WWW= https://pgbackrest.org/ LICENSE= MIT -LICENSE_FILE= ${WRKSRC}/../LICENSE +LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= liblz4.so:archivers/liblz4 \ libyaml.so:textproc/libyaml -USES= gmake gnome pkgconfig pgsql ssl +USES= gnome meson pgsql pkgconfig python ssl +USE_GITHUB= yes USE_GNOME= libxml2 -GNU_CONFIGURE= yes -USE_GITHUB= yes +MESON_ARGS+= -Dconfigdir="${LOCALBASE}/etc/pgbackrest" + +BINARY_ALIAS= python3=${PYTHON_CMD} -WRKSRC_SUBDIR= src +OPTIONS_DEFINE= LZ4 SFTP ZSTD +OPTIONS_DEFAULT= LZ4 -ALL_TARGET= +SFTP_DESC= Enable SFTP storage support -CONFIGURE_ARGS= --with-configdir="${LOCALBASE}/etc/pgbackrest" +LZ4_LIB_DEPENDS= liblz4.so:archivers/liblz4 +LZ4_MESON_ON= -Dliblz4=enabled +LZ4_MESON_OFF= -Dliblz4=disabled -OPTIONS_DEFINE= ZSTD +SFTP_LIB_DEPENDS= libssh2.so:security/libssh2 +SFTP_MESON_ON= -Dlibssh2=enabled +SFTP_MESON_OFF= -Dlibssh2=disabled ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd -ZSTD_CONFIGURE_OFF= ac_cv_lib_zstd_ZSTD_isError=no -ZSTD_CONFIGURE_ON= ac_cv_lib_zstd_ZSTD_isError=yes +ZSTD_MESON_ON= -Dlibzstd=enabled +ZSTD_MESON_OFF= -Dlibzstd=disabled post-install: - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/pgbackrest ${MKDIR} ${STAGEDIR}${PREFIX}/etc/pgbackrest .include diff --git a/databases/pgbackrest/distinfo b/databases/pgbackrest/distinfo --- a/databases/pgbackrest/distinfo +++ b/databases/pgbackrest/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1704919820 -SHA256 (pgbackrest-pgbackrest-release-2.49_GH0.tar.gz) = 32a2d1bd504cc13f6e01533811104da39e2e842cdd8a7ba87293021cf03162f3 -SIZE (pgbackrest-pgbackrest-release-2.49_GH0.tar.gz) = 6162457 +TIMESTAMP = 1712155789 +SHA256 (pgbackrest-pgbackrest-release-2.51_GH0.tar.gz) = 9fa6760032927de448251fb1e5b824e2d17caf560796e74947275b72dc20ed2a +SIZE (pgbackrest-pgbackrest-release-2.51_GH0.tar.gz) = 6119922 diff --git a/databases/pgbackrest/files/patch-meson.build b/databases/pgbackrest/files/patch-meson.build new file mode 100644 --- /dev/null +++ b/databases/pgbackrest/files/patch-meson.build @@ -0,0 +1,28 @@ +--- meson.build.orig 2024-04-10 11:23:05 UTC ++++ meson.build +@@ -144,7 +144,7 @@ lib_bz2 = cc.find_library('bz2') + lib_bz2 = cc.find_library('bz2') + + # Find optional lz4 library +-lib_lz4 = dependency('liblz4', required: false) ++lib_lz4 = dependency('liblz4', required: get_option('liblz4')) + + if lib_lz4.found() + configuration.set('HAVE_LIBLZ4', true, description: 'Is liblz4 present?') +@@ -168,14 +168,14 @@ configuration.set('ZLIB_CONST', true, description: 'Re + configuration.set('ZLIB_CONST', true, description: 'Require zlib const input buffer') + + # Find optional libssh2 library +-lib_ssh2 = dependency('libssh2', required: false) ++lib_ssh2 = dependency('libssh2', required: get_option('libssh2')) + + if lib_ssh2.found() + configuration.set('HAVE_LIBSSH2', true, description: 'Is libssh2 present?') + endif + + # Find optional zstd library +-lib_zstd = dependency('libzstd', version: '>=1.0', required: false) ++lib_zstd = dependency('libzstd', version: '>=1.0', required: get_option('libzstd')) + + if lib_zstd.found() + configuration.set('HAVE_LIBZST', true, description: 'Is libzstd present?') diff --git a/databases/pgbackrest/files/patch-meson__options.txt b/databases/pgbackrest/files/patch-meson__options.txt new file mode 100644 --- /dev/null +++ b/databases/pgbackrest/files/patch-meson__options.txt @@ -0,0 +1,8 @@ +--- meson_options.txt.orig 2024-03-24 20:53:22 UTC ++++ meson_options.txt +@@ -1,2 +1,5 @@ option('fatal-errors', type: 'boolean', value: false, + option('configdir', type: 'string', value: '/etc/pgbackrest', description: 'Configuration directory') + option('fatal-errors', type: 'boolean', value: false, description: 'Stop compilation on first error') ++option('liblz4', type: 'feature', value: 'auto', description: 'Enable LZ4 compression support') ++option('libssh2', type: 'feature', value: 'auto', description: 'Enable SFTP storage support') ++option('libzstd', type: 'feature', value: 'auto', description: 'Enable Zstandard compression support') diff --git a/databases/pgbackrest/files/patch-src_meson.build b/databases/pgbackrest/files/patch-src_meson.build new file mode 100644 --- /dev/null +++ b/databases/pgbackrest/files/patch-src_meson.build @@ -0,0 +1,10 @@ +--- src/meson.build.orig 2024-03-24 20:53:22 UTC ++++ src/meson.build +@@ -284,5 +284,6 @@ executable( + lib_xml, + lib_z, + lib_zstd, +- ] ++ ], ++ install: true, + )