From 86eaf0d618e51f9aad37c8dcda68927f3d1cb88b Mon Sep 17 00:00:00 2001 From: Benjamin Jacobs Date: Mon, 18 Mar 2024 00:56:45 +0000 Subject: [PATCH] security/ocaml-ssl: Fix stublibs. The default search path, ${OCAML_LIBDIR}/ld.conf, does not include the ${OCAML_SITELIBDIR}/stublibs directory which is (oddly) used by ocaml-ssl. Fixed by installing the shared library in ${OCAML_SITELIBDIR}/ssl and registering this directory to the search path. Switch to the new USES ocaml:dune and strip the shared library while at it. PR: 277770 --- security/ocaml-ssl/Makefile | 17 ++++++----------- security/ocaml-ssl/pkg-plist | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/security/ocaml-ssl/Makefile b/security/ocaml-ssl/Makefile index 9d096a157b62..f3069d79ea16 100644 --- a/security/ocaml-ssl/Makefile +++ b/security/ocaml-ssl/Makefile @@ -1,6 +1,6 @@ PORTNAME= ssl PORTVERSION= 0.5.13 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security devel PKGNAMEPREFIX= ocaml- @@ -11,28 +11,23 @@ WWW= https://github.com/savonet/ocaml-ssl LICENSE= LGPL21+ LICENSE_FILE= ${WRKSRC}/COPYING -BUILD_DEPENDS= dune:devel/ocaml-dune - -USES= ssl +USES= ocaml:dune ssl USE_GITHUB= yes GH_ACCOUNT= savonet GH_PROJECT= ocaml-ssl USE_OCAML= yes +USE_OCAML_LDCONFIG= yes DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME} EXAMPLESDIR= ${OCAML_EXAMPLESDIR}/${PORTNAME} OPTIONS_DEFINE= DOCS EXAMPLES -do-build: - cd ${BUILD_WRKSRC} && dune build -p ${PORTNAME} -j ${MAKE_JOBS_NUMBER} - -do-install: - cd ${INSTALL_WRKSRC} && dune install --destdir=${STAGEDIR} \ - --libdir=${PREFIX}/${OCAML_SITELIBDIR} - do-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR} +post-install: + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/ssl/dllssl_stubs.so + .include diff --git a/security/ocaml-ssl/pkg-plist b/security/ocaml-ssl/pkg-plist index 5050f84d3a6f..0c257254ab5a 100644 --- a/security/ocaml-ssl/pkg-plist +++ b/security/ocaml-ssl/pkg-plist @@ -18,7 +18,7 @@ %%OCAML_SITELIBDIR%%/ssl/ssl_threads.cmx %%OCAML_SITELIBDIR%%/ssl/ssl_threads.ml %%OCAML_SITELIBDIR%%/ssl/ssl_threads.mli -%%OCAML_SITELIBDIR%%/stublibs/dllssl_stubs.so +%%OCAML_SITELIBDIR%%/ssl/dllssl_stubs.so %%PORTDOCS%%%%DOCSDIR%%/CHANGES.md %%PORTDOCS%%%%DOCSDIR%%/README.md %%PORTEXAMPLES%%%%EXAMPLESDIR%%/alpn.ml -- 2.43.0