Skip to content

Commit c5df823

Browse files
committed
mail/opendmarc: Add support of mariaDB as option
1 parent 5b5326f commit c5df823

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

mail/opendmarc/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: Makefile,v 1.34 2025/03/03 20:29:27 wiz Exp $
1+
# $NetBSD: Makefile,v 1.35 2026/01/18 17:00:44 ryoon Exp $
22

33
DISTNAME= rel-${PKGNAME_NOREV:C/\./-/g}
44
PKGNAME= opendmarc-1.4.2
@@ -15,10 +15,11 @@ LICENSE= modified-bsd
1515

1616
DEPENDS+= p5-JSON-[0-9]*:../../converters/p5-JSON
1717
DEPENDS+= p5-DBI-[0-9]*:../../databases/p5-DBI
18-
DEPENDS+= p5-DBD-mysql-[0-9]*:../../databases/p5-DBD-mysql
1918
DEPENDS+= p5-Switch-[0-9]*:../../lang/p5-Switch
2019
DEPENDS+= p5-HTTP-Message-[0-9]*:../../www/p5-HTTP-Message
2120

21+
.include "options.mk"
22+
2223
USE_LIBTOOL= yes
2324
USE_TOOLS+= perl autoconf automake pkg-config
2425

mail/opendmarc/options.mk

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# $NetBSD: options.mk,v 1.1 2026/01/18 17:00:44 ryoon Exp $
2+
3+
PKG_OPTIONS_VAR= PKG_OPTIONS.opendmarc
4+
PKG_OPTIONS_REQUIRED_GROUPS= db
5+
PKG_OPTIONS_GROUP.db= mysql mariadb
6+
PKG_SUGGESTED_OPTIONS= mysql
7+
8+
.include "../../mk/bsd.options.mk"
9+
10+
###
11+
### Backend database support
12+
###
13+
.if !empty(PKG_OPTIONS:Mmysql)
14+
DEPENDS+= p5-DBD-mysql-[0-9]*:../../databases/p5-DBD-mysql
15+
CONFIGURE_ARGS+= --with-sql-backend=mysql
16+
.elif !empty(PKG_OPTIONS:Mmariadb)
17+
DEPENDS+= p5-DBD-MariaDB-[0-9]*:../../databases/p5-DBD-MariaDB
18+
CONFIGURE_ARGS+= --with-sql-backend=MariaDB
19+
.endif

0 commit comments

Comments
 (0)