Re: git: c25f0c013e88 - main - databases/libmemcached: Skip libcrypto.pc when using SSL from base system
Date: Tue, 08 Aug 2023 21:16:28 UTC
On 2023-08-06 15:48, Po-Chuan Hsieh wrote: > On Tue, Aug 1, 2023 at 11:08 AM 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=c25f0c013e88d84c620b2bb8c56158e9ca7f8bef >>> >>> 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= libmemcached >>> PORTVERSION= 1.1.4 >>> +PORTREVISION= 1 >>> CATEGORIES= databases >>> >>> MAINTAINER= sunpoet@FreeBSD.org >>> @@ -44,4 +45,11 @@ MURMUR_CMAKE_BOOL= ENABLE_HASH_MURMUR >>> SASL_CMAKE_BOOL= ENABLE_SASL >>> SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 >>> >>> -.include <bsd.port.mk [1]> >>> +.include <bsd.port.pre.mk [2]> >>> + >>> +# Skip libcrypto.pc while using OpenSSL from base system on older >>> FreeBSD versions which does not skip this file >>> +.if ${SSL_DEFAULT} == base && >>> !exists(/usr/libdata/pkgconfig/libcrypto.pc) >>> +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-openssl >>> +.endif >>> + >>> +.include <bsd.port.post.mk [3]> >>> 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=gnu++17 is set when unit tests are enabled so USES= >> compiler:c++11-lang is incorrect > > USES=compiler:c++11-lang for build is correct. > I know that c++17 is required for the tests. > But USES=compiler:c++11-lang is effectively the same as > USES=compiler: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 Hi, While compiler:c++11-lang and compiler:c++17-lang is for now that doesn't mean it won't change in the future, if we can avoid unnecessary breakage I don't see why we shouldn't? I get your argument however I'm not sure if we should deviate from Porters Handbook unless necessary, simply because of overall (treewide) maintenance instead of having ports with their own little quirks left and right which isn't going to benefit the project in the long run. One major downside using libraries from base is that you may end up with different versions between support major versions of FreeBSD which may cause inconsistencies. For example, 12 is still on 2.5.37 while 13+ is on 2.6.4 https://cgit.freebsd.org/src/log/contrib/flex?h=stable/12 https://cgit.freebsd.org/src/log/contrib/flex?h=stable/13 Best regards, Daniel Links: ------ [1] http://bsd.port.mk [2] http://bsd.port.pre.mk [3] http://bsd.port.post.mk