git: a34c2f347e0a - main - archivers/ocaml-zip: update the port to the latest version 1.11

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Sun, 17 Apr 2022 03:56:55 UTC
The branch main has been updated by danfe:

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

commit a34c2f347e0a3bf0468b469d9ebb0135b818698a
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2022-04-17 03:56:14 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2022-04-17 03:56:14 +0000

    archivers/ocaml-zip: update the port to the latest version 1.11
    
    - Project had been moved under Xavier's GitHub account
    - Remove ugly and (now) mostly useless `post-extract' target:
      installation is done via ``ocamlfind install'' which does the
      right thing by itself and passing ${CFLAGS} does not require
      in-place expansion and can be moved to the `patch-Makefile'
    - Drop dynamic `pkg-plist' generation in favor of static file
    
    PR:             263005 (modified)
    Submitted by:   thierry
    Reported by:    portscout (a while ago)
---
 archivers/ocaml-zip/Makefile             | 28 ++++++++++------------------
 archivers/ocaml-zip/distinfo             |  6 +++---
 archivers/ocaml-zip/files/META           |  7 -------
 archivers/ocaml-zip/files/patch-Makefile | 18 +++++++++---------
 archivers/ocaml-zip/pkg-descr            |  2 +-
 archivers/ocaml-zip/pkg-plist            | 23 +++++++++++++++++++++++
 6 files changed, 46 insertions(+), 38 deletions(-)

diff --git a/archivers/ocaml-zip/Makefile b/archivers/ocaml-zip/Makefile
index f22d0dcbb499..a0b425409645 100644
--- a/archivers/ocaml-zip/Makefile
+++ b/archivers/ocaml-zip/Makefile
@@ -1,9 +1,8 @@
 # Created by: Stanislav Sedov <ssedov@mbsd.msk.ru>
 
 PORTNAME=	zip
-PORTVERSION=	1.06
+PORTVERSION=	1.11
 CATEGORIES=	archivers
-MASTER_SITES=	https://download.ocamlcore.org/camlzip/camlzip/${PORTVERSION}/
 PKGNAMEPREFIX=	ocaml-
 DISTNAME=	caml${PORTNAME}-${PORTVERSION}
 
@@ -13,26 +12,19 @@ COMMENT=	OCaml library to manipulate ZIP/GZIP/JAR archives
 LICENSE=	LGPL21
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+USES=		gmake
+USE_GITHUB=	yes
+GH_ACCOUNT=	xavierleroy
+GH_PROJECT=	camlzip
+GH_TAGNAME=	rel${PORTVERSION:S/.//}
+
 USE_OCAML=	yes
+USE_OCAML_FINDLIB=yes
 USE_OCAML_LDCONFIG=yes
 USE_OCAML_WASH=	yes
 
-ALL_TARGET=	all allopt
-INSTALL_TARGET=	install installopt
-PATTERN=	([[:space:]]*)cp([[:space:]]+.*)
-
-post-extract:
-# PREFIX, CFLAGS and permissions safeness
-	@${REINPLACE_CMD} -E \
-		-e "s,${PATTERN},\1\$${BSD_INSTALL_DATA}\2," \
-		-e "s,(-ccopt[[:space:]])-g,\1\"${CFLAGS}\"," \
-		-e "s,^(INSTALLDIR=).*,\1${STAGEDIR}${OCAMLFIND_DESTDIR}/zip," \
-		-e "/ldconf/d" ${WRKSRC}/Makefile
-
 post-install:
-	${INSTALL_DATA} ${FILESDIR}/META ${STAGEDIR}${OCAMLFIND_DESTDIR}/${PORTNAME}
-	@${FIND} ${STAGEDIR}${OCAMLFIND_DESTDIR}/${PORTNAME} -type f | \
-		${SED} "s,^${STAGEDIR}${PREFIX}/,," >> ${TMPPLIST}
-	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ocaml/site-lib/zip/dllcamlzip.so
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ocaml/site-lib/zip/zip.cmxs \
+		${STAGEDIR}${PREFIX}/lib/ocaml/site-lib/zip/dllcamlzip.so
 
 .include <bsd.port.mk>
diff --git a/archivers/ocaml-zip/distinfo b/archivers/ocaml-zip/distinfo
index 0d53eac6e7f2..e1bec0b93d25 100644
--- a/archivers/ocaml-zip/distinfo
+++ b/archivers/ocaml-zip/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1559737560
-SHA256 (camlzip-1.06.tar.gz) = c83877f9972943e6f2e147cf9715a785da2fc8531e7bed3ab4787043b8f4cf54
-SIZE (camlzip-1.06.tar.gz) = 26499
+TIMESTAMP = 1607797813
+SHA256 (xavierleroy-camlzip-1.11-rel111_GH0.tar.gz) = ffbbc5de3e1c13dc0e59272376d232d2ede91b327551063d47fddb74f1d5ed37
+SIZE (xavierleroy-camlzip-1.11-rel111_GH0.tar.gz) = 28483
diff --git a/archivers/ocaml-zip/files/META b/archivers/ocaml-zip/files/META
deleted file mode 100644
index bf215a6b2c0a..000000000000
--- a/archivers/ocaml-zip/files/META
+++ /dev/null
@@ -1,7 +0,0 @@
-name="zip"
-version="1.04"
-description="reading and writing ZIP, JAR and GZIP files"
-requires="unix"
-archive(byte)="zip.cma"
-archive(native)="zip.cmxa"
-linkopts = ""
diff --git a/archivers/ocaml-zip/files/patch-Makefile b/archivers/ocaml-zip/files/patch-Makefile
index 051d0f353c2d..59ba943febcc 100644
--- a/archivers/ocaml-zip/files/patch-Makefile
+++ b/archivers/ocaml-zip/files/patch-Makefile
@@ -1,11 +1,11 @@
---- Makefile.orig	2015-10-01 02:48:15 UTC
+--- Makefile.orig	2020-12-12 18:30:13 UTC
 +++ Makefile
-@@ -56,7 +56,7 @@ clean:
+@@ -64,7 +64,7 @@ libcamlzip$(EXT_LIB): $(C_OBJS)
+ .ml.cmx:
+ 	$(OCAMLOPT) -c $<
+ .c.o:
+-	$(OCAMLC) -c -ccopt -g $(ZLIB_I_OPT) $<
++	$(OCAMLC) -c -ccopt "$(CFLAGS)" $(ZLIB_I_OPT) $<
  
- install:
- 	mkdir -p $(INSTALLDIR)
--	${BSD_INSTALL_DATA} zip.cma zip.cmi gzip.cmi zip.mli gzip.mli libcamlzip.a $(INSTALLDIR)
-+	${BSD_INSTALL_DATA} zip.cma zip.cmi gzip.cmi zip.mli gzip.mli zlib.cmi zlib.mli libcamlzip.a $(INSTALLDIR)
- 	if test -f dllcamlzip.so; then \
- 	  ${BSD_INSTALL_DATA} dllcamlzip.so $(INSTALLDIR); \
-           installdir=$(INSTALLDIR); \
+ clean:
+ 	rm -f *.cm*
diff --git a/archivers/ocaml-zip/pkg-descr b/archivers/ocaml-zip/pkg-descr
index 07788a8c2838..9c59a008a7f7 100644
--- a/archivers/ocaml-zip/pkg-descr
+++ b/archivers/ocaml-zip/pkg-descr
@@ -2,4 +2,4 @@ This Objective Caml library provides easy access to compressed files in ZIP
 and GZIP format, as well as to Java JAR files.  It provides functions
 for reading from and writing to compressed files in these formats.
 
-WWW: http://pauillac.inria.fr/~xleroy/software.html
+WWW: https://github.com/xavierleroy/camlzip
diff --git a/archivers/ocaml-zip/pkg-plist b/archivers/ocaml-zip/pkg-plist
new file mode 100644
index 000000000000..7476a2e90eea
--- /dev/null
+++ b/archivers/ocaml-zip/pkg-plist
@@ -0,0 +1,23 @@
+%%OCAML_SITELIBDIR%%/camlzip/META
+%%OCAML_SITELIBDIR%%/zip/META
+%%OCAML_SITELIBDIR%%/zip/dllcamlzip.so
+%%OCAML_SITELIBDIR%%/zip/gzip.cmi
+%%OCAML_SITELIBDIR%%/zip/gzip.cmt
+%%OCAML_SITELIBDIR%%/zip/gzip.cmti
+%%OCAML_SITELIBDIR%%/zip/gzip.cmx
+%%OCAML_SITELIBDIR%%/zip/gzip.mli
+%%OCAML_SITELIBDIR%%/zip/libcamlzip.a
+%%OCAML_SITELIBDIR%%/zip/zip.a
+%%OCAML_SITELIBDIR%%/zip/zip.cma
+%%OCAML_SITELIBDIR%%/zip/zip.cmi
+%%OCAML_SITELIBDIR%%/zip/zip.cmt
+%%OCAML_SITELIBDIR%%/zip/zip.cmti
+%%OCAML_SITELIBDIR%%/zip/zip.cmx
+%%OCAML_SITELIBDIR%%/zip/zip.cmxa
+%%OCAML_SITELIBDIR%%/zip/zip.cmxs
+%%OCAML_SITELIBDIR%%/zip/zip.mli
+%%OCAML_SITELIBDIR%%/zip/zlib.cmi
+%%OCAML_SITELIBDIR%%/zip/zlib.cmt
+%%OCAML_SITELIBDIR%%/zip/zlib.cmti
+%%OCAML_SITELIBDIR%%/zip/zlib.cmx
+%%OCAML_SITELIBDIR%%/zip/zlib.mli