1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-04 06:15:24 +00:00

- fix incorporating from local mbox [1]

- bump PORTREVISION
- small portlint

Submitted by:	me (itetcu), Petre Bandac <petre@kgb.ro> [1]
Approved by:	maintainer [1]
Obtained from:	sylpheed-claws bug-tracking system [1]
This commit is contained in:
Ion-Mihai Tetcu 2006-06-15 20:19:53 +00:00
parent 8ecb9e4c5d
commit 15a74bfa52
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=165518
4 changed files with 130 additions and 8 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= sylpheed-claws
PORTVERSION= 2.2.3
PORTREVISION= 1
CATEGORIES= mail news ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= sylpheed-claws
@ -58,7 +59,6 @@ OPTIONS= ALL "Enable all options." off \
SA_PLUG "Enable SpamAssassin support." off \
SSL "Enable OpenSSL support." on \
THEMES "Install additional themes." on
.include <bsd.port.pre.mk>
@ -74,15 +74,14 @@ CONFIGURE_ARGS+= --disable-openssl
.endif
.if ${HAVE_GNOME:Mgnomeprint} != "" || defined(WITH_GNOMEPRINT)
PLIST_SUB+= GNOMEPRINT=""
PLIST_SUB+= GNOMEPRINT=""
USE_GNOME+= libgnomeprint libgnomeprintui
CONFIGURE_ARGS+= --enable-gnomeprint
.else
PLIST_SUB+= GNOMEPRINT="@comment "
PLIST_SUB+= GNOMEPRINT="@comment "
CONFIGURE_ARGS+= --disable-gnomeprint
.endif
.if exists(${LOCALBASE}/include/clamav.h)
WITH_CLAMAV= yes
.endif

View File

@ -0,0 +1,62 @@
Index: src/mbox.c
===================================================================
RCS file: /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/mbox.c,v
retrieving revision 1.28.2.17
diff -u -u -r1.28.2.17 mbox.c
--- mbox.c 2006/06/12 06:30:30 1.28.2.17
+++ mbox.c 2006/06/15 14:57:57
@@ -278,6 +278,7 @@
g_free(lockfile);
} else if (type == LOCK_FLOCK) {
gint lockfd;
+ gboolean fcntled = FALSE;
#if HAVE_FCNTL_H
struct flock fl;
fl.l_type = F_WRLCK;
@@ -299,15 +300,17 @@
if (fcntl(lockfd, F_SETLK, &fl) == -1) {
g_warning("can't fnctl %s (%s)", base, strerror(errno));
return -1;
+ } else {
+ fcntled = TRUE;
}
#endif
#if HAVE_FLOCK
- if (flock(lockfd, LOCK_EX|LOCK_NB) < 0) {
+ if (flock(lockfd, LOCK_EX|LOCK_NB) < 0 && !fcntled) {
perror("flock");
#else
#if HAVE_LOCKF
- if (lockf(lockfd, F_TLOCK, 0) < 0) {
+ if (lockf(lockfd, F_TLOCK, 0) < 0 && !fcntled) {
perror("lockf");
#else
{
@@ -345,6 +348,7 @@
return 0;
} else if (type == LOCK_FLOCK) {
+ gboolean fcntled = FALSE;
#if HAVE_FCNTL_H
struct flock fl;
fl.l_type = F_UNLCK;
@@ -355,14 +359,16 @@
if (fcntl(fd, F_SETLK, &fl) == -1) {
g_warning("can't fnctl %s", base);
return -1;
+ } else {
+ fcntled = TRUE;
}
#endif
#if HAVE_FLOCK
- if (flock(fd, LOCK_UN) < 0) {
+ if (flock(fd, LOCK_UN) < 0 && !fcntled) {
perror("flock");
#else
#if HAVE_LOCKF
- if (lockf(fd, F_ULOCK, 0) < 0) {
+ if (lockf(fd, F_ULOCK, 0) < 0 && !fcntled) {
perror("lockf");
#else
{

View File

@ -7,6 +7,7 @@
PORTNAME= sylpheed-claws
PORTVERSION= 2.2.3
PORTREVISION= 1
CATEGORIES= mail news ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= sylpheed-claws
@ -58,7 +59,6 @@ OPTIONS= ALL "Enable all options." off \
SA_PLUG "Enable SpamAssassin support." off \
SSL "Enable OpenSSL support." on \
THEMES "Install additional themes." on
.include <bsd.port.pre.mk>
@ -74,15 +74,14 @@ CONFIGURE_ARGS+= --disable-openssl
.endif
.if ${HAVE_GNOME:Mgnomeprint} != "" || defined(WITH_GNOMEPRINT)
PLIST_SUB+= GNOMEPRINT=""
PLIST_SUB+= GNOMEPRINT=""
USE_GNOME+= libgnomeprint libgnomeprintui
CONFIGURE_ARGS+= --enable-gnomeprint
.else
PLIST_SUB+= GNOMEPRINT="@comment "
PLIST_SUB+= GNOMEPRINT="@comment "
CONFIGURE_ARGS+= --disable-gnomeprint
.endif
.if exists(${LOCALBASE}/include/clamav.h)
WITH_CLAMAV= yes
.endif

View File

@ -0,0 +1,62 @@
Index: src/mbox.c
===================================================================
RCS file: /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/mbox.c,v
retrieving revision 1.28.2.17
diff -u -u -r1.28.2.17 mbox.c
--- mbox.c 2006/06/12 06:30:30 1.28.2.17
+++ mbox.c 2006/06/15 14:57:57
@@ -278,6 +278,7 @@
g_free(lockfile);
} else if (type == LOCK_FLOCK) {
gint lockfd;
+ gboolean fcntled = FALSE;
#if HAVE_FCNTL_H
struct flock fl;
fl.l_type = F_WRLCK;
@@ -299,15 +300,17 @@
if (fcntl(lockfd, F_SETLK, &fl) == -1) {
g_warning("can't fnctl %s (%s)", base, strerror(errno));
return -1;
+ } else {
+ fcntled = TRUE;
}
#endif
#if HAVE_FLOCK
- if (flock(lockfd, LOCK_EX|LOCK_NB) < 0) {
+ if (flock(lockfd, LOCK_EX|LOCK_NB) < 0 && !fcntled) {
perror("flock");
#else
#if HAVE_LOCKF
- if (lockf(lockfd, F_TLOCK, 0) < 0) {
+ if (lockf(lockfd, F_TLOCK, 0) < 0 && !fcntled) {
perror("lockf");
#else
{
@@ -345,6 +348,7 @@
return 0;
} else if (type == LOCK_FLOCK) {
+ gboolean fcntled = FALSE;
#if HAVE_FCNTL_H
struct flock fl;
fl.l_type = F_UNLCK;
@@ -355,14 +359,16 @@
if (fcntl(fd, F_SETLK, &fl) == -1) {
g_warning("can't fnctl %s", base);
return -1;
+ } else {
+ fcntled = TRUE;
}
#endif
#if HAVE_FLOCK
- if (flock(fd, LOCK_UN) < 0) {
+ if (flock(fd, LOCK_UN) < 0 && !fcntled) {
perror("flock");
#else
#if HAVE_LOCKF
- if (lockf(fd, F_ULOCK, 0) < 0) {
+ if (lockf(fd, F_ULOCK, 0) < 0 && !fcntled) {
perror("lockf");
#else
{