aboutsummaryrefslogtreecommitdiff
path: root/security/courier-authlib
diff options
context:
space:
mode:
authorGuido Falsi <madpilot@FreeBSD.org>2020-11-15 12:31:00 +0000
committerGuido Falsi <madpilot@FreeBSD.org>2020-11-15 12:31:00 +0000
commit4d0426bd4cf7af919c5e7392d1e4c3bd3e33056b (patch)
treeb7127a1e203070f0c10f23425522aa896140f1d2 /security/courier-authlib
parent14e8ae53d5bfcba879e8a67dbb5617ec268072e3 (diff)
downloadports-4d0426bd4cf7af919c5e7392d1e4c3bd3e33056b.tar.gz
ports-4d0426bd4cf7af919c5e7392d1e4c3bd3e33056b.zip
Add databases/courier-authlib-sqlite port to install sqlite support
for courier-authlib Suggested by: Ewout Boks <ewout@boks.com>
Notes
Notes: svn path=/head/; revision=555203
Diffstat (limited to 'security/courier-authlib')
-rw-r--r--security/courier-authlib/Makefile14
-rw-r--r--security/courier-authlib/Makefile.dep3
-rw-r--r--security/courier-authlib/Makefile.opt4
-rw-r--r--security/courier-authlib/files/patch-configure71
-rw-r--r--security/courier-authlib/pkg-descr-sqlite5
-rw-r--r--security/courier-authlib/pkg-plist-sqlite7
6 files changed, 82 insertions, 22 deletions
diff --git a/security/courier-authlib/Makefile b/security/courier-authlib/Makefile
index bfd89301059d..833c386d1406 100644
--- a/security/courier-authlib/Makefile
+++ b/security/courier-authlib/Makefile
@@ -54,8 +54,7 @@ CONFIGURE_ARGS= --enable-unicode \
--with-mailgroup=${MAILGRP} \
--localstatedir=${LOCALSTATEDIR} \
--with-authdaemonvar=${AUTHDAEMONVAR} \
- --cache-file=${WRKDIR}/courier-authlib.cache \
- --without-authsqlite
+ --cache-file=${WRKDIR}/courier-authlib.cache
INSTALL_TARGET= install-strip
@@ -142,6 +141,17 @@ CONFIGURE_ARGS+=--with-authpgsql
CONFIGURE_ARGS+=--without-authpgsql
.endif
+.if ${AUTHMOD} == authsqlite
+RUN_DEPENDS+= ${LOCALBASE}/share/sysconftool/sysconftool:devel/sysconftool
+OPTIONS_DEFINE+= DOCS
+
+DOCS= README.authsqlite.html
+USES+= pkgconfig sqlite
+CONFIGURE_ARGS+=--with-authsqlite
+.else
+CONFIGURE_ARGS+=--without-authsqlite
+.endif
+
.if ${AUTHMOD} == authvchkpw
BUILD_DEPENDS+= ${VPOPMAILDIR}/lib/libvpopmail.a:mail/vpopmail
CONFIGURE_ARGS+=--with-authvchkpw
diff --git a/security/courier-authlib/Makefile.dep b/security/courier-authlib/Makefile.dep
index f12ae7d209ea..dc74a2a57dce 100644
--- a/security/courier-authlib/Makefile.dep
+++ b/security/courier-authlib/Makefile.dep
@@ -19,6 +19,9 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/courier-authlib/libauthmysql.so:databases/couri
.if ${PORT_OPTIONS:MAUTH_PGSQL}
BUILD_DEPENDS+= ${LOCALBASE}/lib/courier-authlib/libauthpgsql.so:databases/courier-authlib-pgsql
.endif
+.if ${PORT_OPTIONS:MAUTH_SQLITE}
+BUILD_DEPENDS+= ${LOCALBASE}/lib/courier-authlib/libauthsqlite.so:databases/courier-authlib-sqlite
+.endif
.if ${PORT_OPTIONS:MAUTH_USERDB}
.if ${PORT_OPTIONS:MGDBM}
BUILD_DEPENDS+= ${LOCALBASE}/lib/courier-authlib/libauthuserdb.so:databases/courier-authlib-usergdbm
diff --git a/security/courier-authlib/Makefile.opt b/security/courier-authlib/Makefile.opt
index e9718aae245d..720d1f867f16 100644
--- a/security/courier-authlib/Makefile.opt
+++ b/security/courier-authlib/Makefile.opt
@@ -10,9 +10,11 @@
# in your Makefile *after* any
#.include <bsd.port.pre.mk>
-OPTIONS_DEFINE+= AUTH_LDAP AUTH_MYSQL AUTH_PGSQL AUTH_USERDB AUTH_VCHKPW DOCS
+OPTIONS_DEFINE+= AUTH_LDAP AUTH_MYSQL AUTH_PGSQL AUTH_SQLITE \
+ AUTH_USERDB AUTH_VCHKPW DOCS
AUTH_LDAP_DESC= LDAP support
AUTH_MYSQL_DESC= MySQL support
AUTH_PGSQL_DESC= PostgreSQL support
+AUTH_SQLITE_DESC= SQLite support
AUTH_USERDB_DESC= Userdb support
AUTH_VCHKPW_DESC= popmail/vchkpw support
diff --git a/security/courier-authlib/files/patch-configure b/security/courier-authlib/files/patch-configure
index beced99e9de9..e9617e9ff61a 100644
--- a/security/courier-authlib/files/patch-configure
+++ b/security/courier-authlib/files/patch-configure
@@ -1,4 +1,4 @@
---- configure.orig 2017-07-02 14:41:39 UTC
+--- configure.orig 2020-06-18 01:05:21 UTC
+++ configure
@@ -642,6 +642,10 @@ ltdl_LIBOBJS
am__EXEEXT_FALSE
@@ -9,9 +9,9 @@
+HAVE_USERDB_TRUE
+HAVE_USERDB_FALSE
LIBOBJS
- HAVE_SGML_FALSE
- HAVE_SGML_TRUE
-@@ -676,6 +680,9 @@ LIBAUTHPGSQL
+ VERSION_INFO
+ courierauth_ldflags
+@@ -678,6 +682,9 @@ LIBAUTHPGSQL
PGSQL_LIBS
PG_CONFIG
authpgsqlrc
@@ -21,7 +21,7 @@
LIBAUTHPWD
LIBAUTHSHADOW
SHADOWLIBS
-@@ -1563,6 +1570,7 @@ Optional Packages:
+@@ -1565,6 +1572,7 @@ Optional Packages:
--with-authldaprc=filename Expect to find authldaprc here
--without-authpwd Do not include the authpwd module
--without-authshadow Do not include the authshadow module
@@ -29,7 +29,7 @@
--with-authpgsqlrc=filename Expect to find authpgsql here
--without-authpgsql Do not include the authpgsql module
--with-pgsql-libs=DIR Look for pgsql libs in this dir
-@@ -2938,7 +2946,7 @@ else
+@@ -2940,7 +2948,7 @@ else
fi
fi
@@ -38,7 +38,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
-@@ -18097,8 +18105,12 @@ fi
+@@ -18276,8 +18284,12 @@ fi
if test "$doauthuserdb" = "no"
then
@@ -51,7 +51,7 @@
AUTHUSERDB="authuserdb"
LIBAUTHUSERDB="libauthuserdb.la"
-@@ -18556,7 +18568,21 @@ else
+@@ -18735,7 +18747,21 @@ else
fi
@@ -73,16 +73,10 @@
if test "$HAVE_LDAP" = 1; then
HAVE_LDAP_TRUE=
HAVE_LDAP_FALSE='#'
-@@ -18768,6 +18794,256 @@ if test "$HAVE_PWD" = 1
- then
- LIBAUTHPWD="libauthpwd.la"
- fi
-+
-+
-+
-+
-+
-+
+@@ -18953,6 +18979,256 @@ fi
+
+
+
+
+vpopmail_home=`$PERL -e '@a=getpwnam("vpopmail"); print "$a[7]";'`
+
@@ -327,6 +321,45 @@
+ LIBS=$_SAVE_LIBS
+fi
+
++
++
++
++
++
++
+ # Check whether --with-authpgsqlrc was given.
+ if test "${with_authpgsqlrc+set}" = set; then :
+ withval=$with_authpgsqlrc; authpgsqlrc="$withval"
+@@ -19278,8 +19554,9 @@ then
+ SQLITE_LIBS="`pkg-config --libs sqlite3 2>/dev/null`"
+ saveLIBS="$LIBS"
+ LIBS="$SQLITE_LIBS $LIBS"
+- ac_fn_c_check_func "$LINENO" "sqlite3_version" "ac_cv_func_sqlite3_version"
+-if test "x$ac_cv_func_sqlite3_version" = xyes; then :
++echo $LIBS
++# ac_fn_c_check_func "$LINENO" "sqlite3_version" "ac_cv_func_sqlite3_version"
++if test -n $SQLITE_LIBS; then :
+ doauthsqlite="yes"
+ fi
+@@ -19296,13 +19573,13 @@ then
+ else
+ saveLIBS="$LIBS"
+ LIBS="$SQLITE_LIBS $LIBS"
+- ac_fn_c_check_func "$LINENO" "sqlite3_version" "ac_cv_func_sqlite3_version"
+-if test "x$ac_cv_func_sqlite3_version" = xyes; then :
+- :
+-else
+- as_fn_error $? "Cannot link with $SQLITE_LIBS" "$LINENO" 5
+-
+-fi
++# ac_fn_c_check_func "$LINENO" "sqlite3_version" "ac_cv_func_sqlite3_version"
++#if test "x$ac_cv_func_sqlite3_version" = xyes; then :
++# :
++#else
++# as_fn_error $? "Cannot link with $SQLITE_LIBS" "$LINENO" 5
++#
++#fi
-
+ LIBS="$saveLIBS"
+ HAVE_AUTHSQLITE=1
diff --git a/security/courier-authlib/pkg-descr-sqlite b/security/courier-authlib/pkg-descr-sqlite
new file mode 100644
index 000000000000..345c9ef64eef
--- /dev/null
+++ b/security/courier-authlib/pkg-descr-sqlite
@@ -0,0 +1,5 @@
+This package installs SQLite support for the Courier authentication library
+to read the list of mail accounts and passwords from a table in a SQLite
+database.
+
+WWW: http://www.Courier-MTA.org/authlib/
diff --git a/security/courier-authlib/pkg-plist-sqlite b/security/courier-authlib/pkg-plist-sqlite
new file mode 100644
index 000000000000..bf266db2c245
--- /dev/null
+++ b/security/courier-authlib/pkg-plist-sqlite
@@ -0,0 +1,7 @@
+@preunexec if cmp -s %D/etc/authlib/authsqliterc.dist %D/etc/authlib/authsqliterc; then rm -f %D/etc/authlib/authsqliterc; fi
+@(%%MAILOWN%%,%%MAILGRP%%,660) etc/authlib/authsqliterc.dist
+@postexec %%LOCALBASE%%/share/sysconftool/sysconftool %D/etc/authlib/authsqliterc
+lib/courier-authlib/libauthsqlite.so
+lib/courier-authlib/libauthsqlite.so.0
+lib/courier-authlib/libauthsqlite.so.0.0.0
+%%PORTDOCS%%%%DOCSDIR%%/README.authsqlite.html