mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-29 05:38:00 +00:00
- fix OmitHeaders not working
- fix dkim-stat error - fix Mutex not initialized properly for testing mode - fix build with WITH_SENDMAIL_PORT defined PR: 121700 Submitted by: Hirohisa Yamaguchi (maintainer)
This commit is contained in:
parent
2cb22577e6
commit
45ad903d96
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=209215
@ -14,6 +14,7 @@
|
||||
|
||||
PORTNAME= dkim-milter
|
||||
PORTVERSION= 2.5.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||
@ -136,6 +137,8 @@ PLIST_DIRS+= ${DOCSDIR_REL}/libdkim
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
WITHOUT_MILTER_CFLAGS= yes
|
||||
WITHOUT_MILTER_LDFLAGS= yes
|
||||
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
|
||||
|
||||
SITE+= ${FILESDIR}/site.config.m4
|
||||
@ -146,9 +149,9 @@ SITE+= ${WRKSRC}/site.config.m4.dist
|
||||
SITE_SUB+= -e "s|%%PREFIX%%|${PREFIX}|g" \
|
||||
-e "s|%%LOCALBASE%%|${LOCALBASE}|g"
|
||||
.if defined(WITH_SENDMAIL_STATIC_MILTER)
|
||||
SITE_SUB+= -e '\|-static|s|%%STATIC%%||g'
|
||||
SITE_SUB+= -e 's|%%STATIC%%||g'
|
||||
.else
|
||||
SITE_SUB+= -e '\|-static|s|%%STATIC%%|dnl |g'
|
||||
SITE_SUB+= -e 's|%%STATIC%%|dnl |g'
|
||||
.endif
|
||||
|
||||
SUB_LIST= "RC_SCRIPT=${PREFIX}/etc/rc.d/${USE_RC_SUBR:S/.sh$//}${RC_SUBR_SUFFIX}"
|
||||
|
52
mail/dkim-milter/files/patch-dkim-filter__dkim-db.c
Normal file
52
mail/dkim-milter/files/patch-dkim-filter__dkim-db.c
Normal file
@ -0,0 +1,52 @@
|
||||
--- ./dkim-filter/dkim-db.c.orig 2008-03-05 02:41:25.000000000 +0900
|
||||
+++ ./dkim-filter/dkim-db.c 2008-03-12 23:57:52.000000000 +0900
|
||||
@@ -46,15 +46,22 @@
|
||||
int flags = 0;
|
||||
#endif /* DB_VERSION_CHECK(2,0,0) */
|
||||
int status = 0;
|
||||
+ DBTYPE dbtype;
|
||||
|
||||
assert(db != NULL);
|
||||
assert(file != NULL);
|
||||
|
||||
#if DB_VERSION_CHECK(2,0,0)
|
||||
if (ro)
|
||||
+ {
|
||||
flags |= DB_RDONLY;
|
||||
+ dbtype = DB_UNKNOWN;
|
||||
+ }
|
||||
else
|
||||
+ {
|
||||
flags |= DB_CREATE;
|
||||
+ dbtype = DB_BTREE;
|
||||
+ }
|
||||
#endif /* DB_VERSION_CHECK(2,0,0) */
|
||||
|
||||
#if DB_VERSION_CHECK(3,0,0)
|
||||
@@ -62,21 +69,21 @@
|
||||
if (status == 0)
|
||||
{
|
||||
# if DB_VERSION_CHECK(4,1,25)
|
||||
- status = (*db)->open(*db, NULL, file, NULL, DB_UNKNOWN,
|
||||
+ status = (*db)->open((*db), NULL, file, NULL, dbtype,
|
||||
flags, 0);
|
||||
# else /* DB_VERSION_CHECK(4,1,25) */
|
||||
- status = (*db)->open(*db, file, NULL, DB_UNKNOWN,
|
||||
- flags, 0);
|
||||
+ status = (*db)->open((*db), file, NULL, dbtype, flags, 0);
|
||||
# endif /* DB_VERSION_CHECK(4,1,25) */
|
||||
}
|
||||
#elif DB_VERSION_CHECK(2,0,0)
|
||||
- status = db_open(file, DB_HASH, flags, DB_MODE, NULL, NULL, db);
|
||||
+ status = db_open(file, dbtype, flags, DB_MODE, NULL, NULL, db);
|
||||
#else /* DB_VERSION_MAJOR < 2 */
|
||||
*db = dbopen(file, (ro ? O_RDONLY :(O_CREAT|O_RDWR)), DB_MODE,
|
||||
- DB_HASH, NULL);
|
||||
+ dbtype, NULL);
|
||||
if (*db == NULL)
|
||||
status = errno;
|
||||
#endif /* DB_VERSION_CHECK */
|
||||
+
|
||||
return status;
|
||||
}
|
||||
|
50
mail/dkim-milter/files/patch-dkim-filter__dkim-filter.c
Normal file
50
mail/dkim-milter/files/patch-dkim-filter__dkim-filter.c
Normal file
@ -0,0 +1,50 @@
|
||||
--- ./dkim-filter/dkim-filter.c.orig 2008-03-06 04:29:36.000000000 +0900
|
||||
+++ ./dkim-filter/dkim-filter.c 2008-03-12 23:57:52.000000000 +0900
|
||||
@@ -2481,6 +2481,16 @@
|
||||
if (status != DKIM_STAT_OK)
|
||||
return FALSE;
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ status = dkim_options(conf->conf_libdkim, DKIM_OP_SETOPT,
|
||||
+ DKIM_OPTS_SKIPHDRS,
|
||||
+ (void *) should_not_signhdrs,
|
||||
+ sizeof (u_char **));
|
||||
+
|
||||
+ if (status != DKIM_STAT_OK)
|
||||
+ return FALSE;
|
||||
+ }
|
||||
|
||||
if (conf->conf_signhdrs != NULL)
|
||||
{
|
||||
@@ -2494,8 +2504,8 @@
|
||||
else
|
||||
{
|
||||
status = dkim_options(conf->conf_libdkim, DKIM_OP_SETOPT,
|
||||
- DKIM_OPTS_SKIPHDRS,
|
||||
- (void *) should_not_signhdrs,
|
||||
+ DKIM_OPTS_SIGNHDRS,
|
||||
+ (void *) should_signhdrs,
|
||||
sizeof (u_char **));
|
||||
|
||||
if (status != DKIM_STAT_OK)
|
||||
@@ -7447,6 +7457,9 @@
|
||||
}
|
||||
#endif /* _FFR_BODYLENGTH_DB */
|
||||
|
||||
+ pthread_mutex_init(&popen_lock, NULL);
|
||||
+ pthread_mutex_init(&conf_lock, NULL);
|
||||
+
|
||||
/* perform test mode */
|
||||
if (testfile != NULL)
|
||||
{
|
||||
@@ -7456,9 +7469,6 @@
|
||||
return status;
|
||||
}
|
||||
|
||||
- pthread_mutex_init(&popen_lock, NULL);
|
||||
- pthread_mutex_init(&conf_lock, NULL);
|
||||
-
|
||||
memset(argstr, '\0', sizeof argstr);
|
||||
end = &argstr[sizeof argstr - 1];
|
||||
n = sizeof argstr;
|
@ -15,3 +15,4 @@ define(`confDONT_INSTALL_CATMAN',`True')
|
||||
%%LIBTRE%%APPENDDEF(`confINCDIRS', `-I%%LOCALBASE%%/include/tre ')
|
||||
%%LIBTRE%%APPENDDEF(`confLIBDIRS', `-L%%LOCALBASE%%/lib ')
|
||||
%%LIBTRE%%APPENDDEF(`confLIBS', `-ltre ')
|
||||
%%STATIC%%%%LIBTRE%%APPENDDEF(`confLIBS', `-lintl -liconv ')
|
||||
|
Loading…
Reference in New Issue
Block a user