git: e1179fb216c9 - main - www/sitecopy: Unbreak and fix permission parsing

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Thu, 15 Jan 2026 21:18:32 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e1179fb216c97f5fa0afca98d2aa7349012303e4

commit e1179fb216c97f5fa0afca98d2aa7349012303e4
Author:     Helge Oldach <freebsd@oldach.net>
AuthorDate: 2026-01-15 21:12:21 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-01-15 21:17:53 +0000

    www/sitecopy: Unbreak and fix permission parsing
    
    While here:
    - Fix dependencies.
    - Refresh patches.
    - Improve indents.
    
    PR:             287710 287830
    MFH:            2026Q1
    Co-authored-by: Vladimir Druzenko <vvd@FreeBSD.org>
---
 www/sitecopy/Makefile                              | 28 ++++++++++------------
 www/sitecopy/files/patch-Makefile.in               | 10 ++++----
 www/sitecopy/files/patch-src_lsparser.c            | 13 ++++++++++
 .../{patch-sitestore.c => patch-src_sitestore.c}   |  6 ++---
 4 files changed, 34 insertions(+), 23 deletions(-)

diff --git a/www/sitecopy/Makefile b/www/sitecopy/Makefile
index 069a0bbbc106..4cb84484857b 100644
--- a/www/sitecopy/Makefile
+++ b/www/sitecopy/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	sitecopy
-PORTVERSION=	0.16.6
-PORTREVISION=	9
+DISTVERSION=	0.16.6
+PORTREVISION=	10
 CATEGORIES=	www
 MASTER_SITES=	http://www.manyfish.co.uk/${PORTNAME}/
 
@@ -11,35 +11,33 @@ WWW=		https://www.manyfish.co.uk/sitecopy/
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BROKEN=		Fails to build with neon 0.32+, configure: incompatible neon library version 0.34.0: wanted 0.24 25 26 27 28 29 30 31 32
-
 LIB_DEPENDS=	libneon.so:www/neon
+# Depending on www/neon, this port may be linked against the following
+# libraries: libexpat.so:textproc/expat2, libxml2.so:textproc/libxml2,
+# libproxy.so:net/libproxy.
+# Bump this port if the SONAME of the using library has been bumped.
 
-USES=		gmake gnome localbase
-USE_GNOME=	libxml2
+USES=		gettext-runtime gmake localbase
 
 GNU_CONFIGURE=	yes
 
-CONFIGURE_ARGS=	--with-neon --with-libxml2
+CONFIGURE_ARGS=	--with-neon
 
-OPTIONS_DEFINE=	NLS
-OPTIONS_SUB=	yes
+OPTIONS_DEFINE=		NLS
+OPTIONS_SUB=		yes
 
-NLS_USES=	gettext
+NLS_USES=		gettext-tools
 NLS_CONFIGURE_OFF=	--disable-nls
-NLS_LIBS=	-lintl
 
 .include <bsd.port.options.mk>
 
 .ifndef WITHOUT_SSL
-USES+=	ssl
+USES+=			ssl
 CONFIGURE_ARGS+=	--with-ssl
 .endif
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|;;|;|g' \
-		${WRKSRC}/src/sitestore.c
-	@${REINPLACE_CMD} -e 's|25 26 27 28|& 29 30 31 32|g' \
+	@${REINPLACE_CMD} -e 's|25 26 27 28|& 29 [3-][0-9]|g' \
 		${WRKSRC}/configure
 .if ${OPSYS} == FreeBSD
 	@${REINPLACE_CMD} -e '/#define ksize_t /d' \
diff --git a/www/sitecopy/files/patch-Makefile.in b/www/sitecopy/files/patch-Makefile.in
index 3e91f1daf520..ca73dada9c56 100644
--- a/www/sitecopy/files/patch-Makefile.in
+++ b/www/sitecopy/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig
+--- Makefile.in.orig	2008-07-07 20:55:29 UTC
 +++ Makefile.in
-@@ -11,7 +11,7 @@
+@@ -11,7 +11,7 @@ man1dir = $(mandir)/man1
  bindir = @bindir@
  mandir = @mandir@
  man1dir = $(mandir)/man1
@@ -8,8 +8,8 @@
 +docdir = $(prefix)/share/doc/sitecopy
  localedir = $(datadir)/locale
  datadir = @datadir@
- pkgdatadir = $(datadir)/sitecopy
-@@ -74,7 +74,6 @@
+ datarootdir = @datarootdir@
+@@ -75,7 +75,6 @@ DOCS = README NEWS THANKS doc/update.sh
  
  DATAFILES = doc/examplerc doc/changes.awk
  DOCS = README NEWS THANKS doc/update.sh
@@ -17,7 +17,7 @@
  
  all: $(TARGET)
  
-@@ -178,9 +177,6 @@
+@@ -175,9 +174,6 @@ install-sitecopy: install-common
  	@echo "Installing man page..."
  	$(mkinstalldirs) $(DESTDIR)$(man1dir)
  	$(INSTALL_DATA) $(top_srcdir)/doc/sitecopy.1 $(DESTDIR)$(man1dir)/sitecopy.1
diff --git a/www/sitecopy/files/patch-src_lsparser.c b/www/sitecopy/files/patch-src_lsparser.c
new file mode 100644
index 000000000000..c5939030fb5f
--- /dev/null
+++ b/www/sitecopy/files/patch-src_lsparser.c
@@ -0,0 +1,13 @@
+--- src/lsparser.c.orig	2005-10-24 13:09:55 UTC
++++ src/lsparser.c
+@@ -182,6 +182,10 @@ static enum ls_result parse_file(ls_context_t *ctx, ch
+         return fail(ctx, "Relative filename disallowed");
+     }
+ 
++    /* drop garbage trailing permissions */
++    if (strlen(perms) > 10) {
++        perms[10] = '\0';
++    }
+     if (perms[0] == '-') {
+         /* Normal file */
+         file->mode = parse_permissions(perms);
diff --git a/www/sitecopy/files/patch-sitestore.c b/www/sitecopy/files/patch-src_sitestore.c
similarity index 65%
rename from www/sitecopy/files/patch-sitestore.c
rename to www/sitecopy/files/patch-src_sitestore.c
index fd6d12c72c00..a10e98f5baa9 100644
--- a/www/sitecopy/files/patch-sitestore.c
+++ b/www/sitecopy/files/patch-src_sitestore.c
@@ -1,6 +1,6 @@
---- src/sitestore.c.orig	Mon Jun 19 12:07:52 2006
-+++ src/sitestore.c	Mon Jun 19 12:08:24 2006
-@@ -340,8 +340,8 @@
+--- src/sitestore.c.orig	2006-02-04 10:18:08 UTC
++++ src/sitestore.c
+@@ -340,8 +340,8 @@ static int end_element(void *userdata, int state,
  	}
  	break;
      case SITE_ELM_size: