forked from Lainports/freebsd-ports
databases/mysql80-client: Fix mysqlclient.pc
- Bump PORTREVISION for package change
Not all supported FreeBSD releases has openssl.pc in base system. This patch
adds a check for openssl.pc. It helps to build databases/py-mysqlclient.
If you do not have openssl.pc from your SSL provider.
Before the fix:
% grep Requires.private: /usr/local/libdata/pkgconfig/mysqlclient.pc
Requires.private: openssl
After the fix:
% grep Requires.private: /usr/local/libdata/pkgconfig/mysqlclient.pc
Requires.private:
The build log [1] of databases/py-mysqlclient without the fix:
===> Building for py39-mysqlclient-2.2.0
* Getting build dependencies for wheel...
Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'openssl', required by 'mysqlclient', not found
Trying pkg-config --exists mysqlclient
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/usr/local/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/local/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/usr/local/lib/python3.9/site-packages/setuptools/build_meta.py", line 177, in get_requires_for_build_wheel
return self._get_build_requires(
File "/usr/local/lib/python3.9/site-packages/setuptools/build_meta.py", line 159, in _get_build_requires
self.run_setup()
File "/usr/local/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 154, in <module>
ext_options = get_config_posix(get_options())
File "setup.py", line 50, in get_config_posix
cflags = subprocess.check_output(
File "/usr/local/lib/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'pkg-config --cflags mysqlclient' returned non-zero exit status 1.
ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel
*** Error code 1
Stop.
make: stopped in /usr/ports/databases/py-mysqlclient
Approved by: portmgr (blanket)
Reference: https://pkg-status.freebsd.org/beefy16/data/131amd64-default/0f3f003a3111/logs/py39-mysqlclient-2.2.0.log [1]
This commit is contained in:
parent
97380bb19c
commit
5ee3f5d80c
3 changed files with 19 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
PORTNAME= mysql
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
PKGNAMESUFFIX= 80-client
|
||||
|
||||
COMMENT= Multithreaded SQL database (client)
|
||||
|
|
|
|||
|
|
@ -194,9 +194,16 @@ CXXFLAGS+= -malign-double
|
|||
USES+= compiler:c++17-lang
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
post-extract:
|
||||
@${RM} -rv ${WRKSRC}/sql/sql_hints.yy.cc ${WRKSRC}/sql/sql_hints.yy.h
|
||||
|
||||
# This can be removed after FreeBSD 12.4 and 13.1 EoL
|
||||
.if defined(CLIENT_ONLY) && !exists(${OPENSSLBASE}/libdata/pkgconfig/openssl.pc)
|
||||
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-scripts_CMakeLists.txt
|
||||
.endif
|
||||
|
||||
.if !defined(CLIENT_ONLY)
|
||||
post-install:
|
||||
${MKDIR} ${STAGEDIR}${ETCDIR}
|
||||
|
|
@ -206,4 +213,4 @@ post-install:
|
|||
${MKDIR} ${STAGEDIR}${MY_TMPDIR}
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
--- scripts/CMakeLists.txt.orig 2022-12-16 15:34:44 UTC
|
||||
+++ scripts/CMakeLists.txt
|
||||
@@ -362,7 +362,6 @@ IF (WITH_SSL STREQUAL "system")
|
||||
# We have implemented "system" for other platforms as well, but those
|
||||
# are non-native packages.
|
||||
IF(LINUX OR SOLARIS OR FREEBSD)
|
||||
- SET(CONFIG_REQUIRES_PRIVATE "openssl")
|
||||
STRING(REPLACE "-lssl" "" CONFIG_LIBS_PRIVATE "${CONFIG_LIBS_PRIVATE}")
|
||||
STRING(REPLACE "-lcrypto" "" CONFIG_LIBS_PRIVATE "${CONFIG_LIBS_PRIVATE}")
|
||||
STRING(REGEX REPLACE "[ ]+" " " CONFIG_LIBS_PRIVATE
|
||||
Loading…
Add table
Reference in a new issue