Date: Sun, 6 Aug 2023 21:48:58 +0800 From: Po-Chuan Hsieh <sunpoet@freebsd.org> To: Daniel Engberg <diizzy@freebsd.org> Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Subject: Re: git: c25f0c013e88 - main - databases/libmemcached: Skip libcrypto.pc when using SSL from base system Message-ID: <CAMHz58S0ySYKaGEunnu4F7Sgbj_kHEhtpiAbUoJP5hRf3djzbg@mail.gmail.com> In-Reply-To: <fd79ae5502e288a54ead898d61f17e28@FreeBSD.org> References: <202307091033.369AXqZ7055562@gitrepo.freebsd.org> <fd79ae5502e288a54ead898d61f17e28@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000062cef806024166f7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Aug 1, 2023 at 11:08=E2=80=AFAM Daniel Engberg <diizzy@freebsd.org>= wrote: > On 2023-07-09 12:33, Po-Chuan Hsieh wrote: > > The branch main has been updated by sunpoet: > > > > URL: > > > https://cgit.FreeBSD.org/ports/commit/?id=3Dc25f0c013e88d84c620b2bb8c5615= 8e9ca7f8bef > > > > commit c25f0c013e88d84c620b2bb8c56158e9ca7f8bef > > Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> > > AuthorDate: 2023-07-09 10:17:04 +0000 > > Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> > > CommitDate: 2023-07-09 10:17:04 +0000 > > > > databases/libmemcached: Skip libcrypto.pc when using SSL from base > > system > > > > - Bump PORTREVISION for package change > > --- > > databases/libmemcached/Makefile | 10 +++++++++- > > databases/libmemcached/files/extra-patch-openssl | 11 +++++++++++ > > 2 files changed, 20 insertions(+), 1 deletion(-) > > > > diff --git a/databases/libmemcached/Makefile > > b/databases/libmemcached/Makefile > > index e044f28499fd..71f031d3014f 100644 > > --- a/databases/libmemcached/Makefile > > +++ b/databases/libmemcached/Makefile > > @@ -1,5 +1,6 @@ > > PORTNAME=3D libmemcached > > PORTVERSION=3D 1.1.4 > > +PORTREVISION=3D 1 > > CATEGORIES=3D databases > > > > MAINTAINER=3D sunpoet@FreeBSD.org > > @@ -44,4 +45,11 @@ MURMUR_CMAKE_BOOL=3D ENABLE_HASH_MURMUR > > SASL_CMAKE_BOOL=3D ENABLE_SASL > > SASL_LIB_DEPENDS=3D libsasl2.so:security/cyrus-sasl2 > > > > -.include <bsd.port.mk> > > +.include <bsd.port.pre.mk> > > + > > +# Skip libcrypto.pc while using OpenSSL from base system on older > > FreeBSD versions which does not skip this file > > +.if ${SSL_DEFAULT} =3D=3D base && > > !exists(/usr/libdata/pkgconfig/libcrypto.pc) > > +EXTRA_PATCHES+=3D ${PATCHDIR}/extra-patch-openssl > > +.endif > > + > > +.include <bsd.port.post.mk> > > diff --git a/databases/libmemcached/files/extra-patch-openssl > > b/databases/libmemcached/files/extra-patch-openssl > > new file mode 100644 > > index 000000000000..bf65fa7f4ece > > --- /dev/null > > +++ b/databases/libmemcached/files/extra-patch-openssl > > @@ -0,0 +1,11 @@ > > +--- src/libhashkit/CMakeLists.txt.orig 2023-03-06 08:47:30 UTC > > ++++ src/libhashkit/CMakeLists.txt > > +@@ -45,7 +45,7 @@ if(ENABLE_OPENSSL_CRYPTO) > > + if(OPENSSL_CRYPTO_LIBRARY) > > + target_compile_definitions(libhashkit > > PRIVATE HAVE_OPENSSL_CRYPTO) > > + target_link_libraries(libhashkit PUBLIC > > OpenSSL::Crypto) > > +- pkgconfig_export(REQUIRES_PRIVATE libcrypto) > > ++ pkgconfig_export(REQUIRES_PRIVATE "") > > + else() > > + message(WARNING "Could not find > > OpenSSL::Crypto") > > + endif() > > Hi, > > Resending as I didn't get a reply last time, > > I few things I noticed compared to the PR I submitted about this port. > > -std=3Dgnu++17 is set when unit tests are enabled so USES=3D > compiler:c++11-lang is incorrect > USES=3Dcompiler:c++11-lang for build is correct. I know that c++17 is required for the tests. But USES=3Dcompiler:c++11-lang is effectively the same as USES=3Dcompiler:c++17-lang. > Is there a reason why default filenames aren't used for patches? > The default filename comes from the path is OK. But it tells you nothing but the path which is already in the diff header. Naming the patch file by its purpose is better here. > Why are we using flex from base rather from ports? > What's wrong with flex from base? If you notice any issue, I'm happy to fix it. That openssl patch can be improved by doing something like this, > https://cgit.freebsd.org/ports/tree/archivers/libarchive/Makefile#n124 > > Best regards, > Daniel > --00000000000062cef806024166f7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">On Tue, Aug 1, 2023 at 11:08=E2=80=AFAM D= aniel Engberg <<a href=3D"mailto:diizzy@freebsd.org">diizzy@freebsd.org<= /a>> wrote:<br></div><div class=3D"gmail_quote"><blockquote class=3D"gma= il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2= 04,204);padding-left:1ex">On 2023-07-09 12:33, Po-Chuan Hsieh wrote:<br> > The branch main has been updated by sunpoet:<br> > <br> > URL:<br> > <a href=3D"https://cgit.FreeBSD.org/ports/commit/?id=3Dc25f0c013e88d84= c620b2bb8c56158e9ca7f8bef" rel=3D"noreferrer" target=3D"_blank">https://cgi= t.FreeBSD.org/ports/commit/?id=3Dc25f0c013e88d84c620b2bb8c56158e9ca7f8bef</= a><br> > <br> > commit c25f0c013e88d84c620b2bb8c56158e9ca7f8bef<br> > Author:=C2=A0 =C2=A0 =C2=A0Po-Chuan Hsieh <sunpoet@FreeBSD.org><= br> > AuthorDate: 2023-07-09 10:17:04 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Po-Chuan Hsieh <sunpoet@FreeBSD.org><= br> > CommitDate: 2023-07-09 10:17:04 +0000<br> > <br> >=C2=A0 =C2=A0 =C2=A0databases/libmemcached: Skip libcrypto.pc when usin= g SSL from base <br> > system<br> > <br> >=C2=A0 =C2=A0 =C2=A0- Bump PORTREVISION for package change<br> > ---<br> >=C2=A0 databases/libmemcached/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 10 +++++++++-<br> >=C2=A0 databases/libmemcached/files/extra-patch-openssl | 11 ++++++++++= +<br> >=C2=A0 2 files changed, 20 insertions(+), 1 deletion(-)<br> > <br> > diff --git a/databases/libmemcached/Makefile <br> > b/databases/libmemcached/Makefile<br> > index e044f28499fd..71f031d3014f 100644<br> > --- a/databases/libmemcached/Makefile<br> > +++ b/databases/libmemcached/Makefile<br> > @@ -1,5 +1,6 @@<br> >=C2=A0 PORTNAME=3D=C2=A0 =C2=A0 libmemcached<br> >=C2=A0 PORTVERSION=3D 1.1.4<br> > +PORTREVISION=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 1<br> >=C2=A0 CATEGORIES=3D=C2=A0 databases<br> > <br> >=C2=A0 MAINTAINER=3D=C2=A0 sunpoet@FreeBSD.org<br> > @@ -44,4 +45,11 @@ MURMUR_CMAKE_BOOL=3D ENABLE_HASH_MURMUR<br> >=C2=A0 SASL_CMAKE_BOOL=3D=C2=A0 =C2=A0 =C2=A0ENABLE_SASL<br> >=C2=A0 SASL_LIB_DEPENDS=3D=C2=A0 =C2=A0 libsasl2.so:security/cyrus-sasl= 2<br> > <br> > -.include <<a href=3D"http://bsd.port.mk" rel=3D"noreferrer" target= =3D"_blank">bsd.port.mk</a>><br> > +.include <<a href=3D"http://bsd.port.pre.mk" rel=3D"noreferrer" ta= rget=3D"_blank">bsd.port.pre.mk</a>><br> > +<br> > +# Skip libcrypto.pc while using OpenSSL from base system on older<br> > FreeBSD versions which does not skip this file<br> > +.if ${SSL_DEFAULT} =3D=3D base && <br> > !exists(/usr/libdata/pkgconfig/libcrypto.pc)<br> > +EXTRA_PATCHES+=3D=C2=A0 =C2=A0 =C2=A0 ${PATCHDIR}/extra-patch-openssl= <br> > +.endif<br> > +<br> > +.include <<a href=3D"http://bsd.port.post.mk" rel=3D"noreferrer" t= arget=3D"_blank">bsd.port.post.mk</a>><br> > diff --git a/databases/libmemcached/files/extra-patch-openssl<br> > b/databases/libmemcached/files/extra-patch-openssl<br> > new file mode 100644<br> > index 000000000000..bf65fa7f4ece<br> > --- /dev/null<br> > +++ b/databases/libmemcached/files/extra-patch-openssl<br> > @@ -0,0 +1,11 @@<br> > +--- src/libhashkit/CMakeLists.txt.orig=C2=A0 =C2=A0 =C2=A0 =C2=A02023= -03-06 08:47:30 UTC<br> > ++++ src/libhashkit/CMakeLists.txt<br> > +@@ -45,7 +45,7 @@ if(ENABLE_OPENSSL_CRYPTO)<br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if(OPEN= SSL_CRYPTO_LIBRARY)<br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0target_compile_definitions(libhashkit<br> > PRIVATE HAVE_OPENSSL_CRYPTO)<br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0target_link_libraries(libhashkit PUBLIC<br> > OpenSSL::Crypto)<br> > +-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 pkgconfig_export(REQUIRES_PRIVATE libcrypto)<br> > ++=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 pkgconfig_export(REQUIRES_PRIVATE "")<br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else()<= br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0message(WARNING "Could not find <br> > OpenSSL::Crypto")<br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0endif()= <br> <br> Hi,<br> <br> Resending as I didn't get a reply last time,<br> <br> I few things I noticed compared to the PR I submitted about this port.<br> <br> -std=3Dgnu++17 is set when unit tests are enabled so USES=3D <br> compiler:c++11-lang is incorrect<br></blockquote><div><br></div>USES=3Dcomp= iler:c++11-lang for build is correct.<br>I know that c++17 is required for = the tests.<br><div>But USES=3Dcompiler:c++11-lang is effectively the same a= s USES=3Dcompiler:c++17-lang.</div><div>=C2=A0</div><blockquote class=3D"gm= ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,= 204,204);padding-left:1ex"> Is there a reason why default filenames aren't used for patches?<br></b= lockquote><div><br></div><div>The default filename comes from the path is O= K.<br></div>But it tells you nothing but the path which is already in the d= iff header.<div>Naming the patch file by its purpose is better here.</div><= div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0= px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Why are we using flex from base rather from ports?<br></blockquote><div><br= ></div><div>What's wrong with flex from base? If you notice any issue, = I'm happy to fix it.</div><div><br></div><blockquote class=3D"gmail_quo= te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204= );padding-left:1ex"> That openssl patch can be improved by doing something like this, <br> <a href=3D"https://cgit.freebsd.org/ports/tree/archivers/libarchive/Makefil= e#n124" rel=3D"noreferrer" target=3D"_blank">https://cgit.freebsd.org/ports= /tree/archivers/libarchive/Makefile#n124</a><br> <br> Best regards,<br> Daniel<br> </blockquote></div></div> --00000000000062cef806024166f7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMHz58S0ySYKaGEunnu4F7Sgbj_kHEhtpiAbUoJP5hRf3djzbg>