Some old cmake ports still use it. Many hints on how to use them or what to do
in the right order can be found here:
https://cmake.org/cmake/help/latest/module/FindPythonLibs.html
For the record: FindPythonInterp and FindPythonLibs are deprecated since
version 3.12: Use FindPython3, FindPython2 or FindPython instead. All of them
operate with -DPython instead of -DPYTHON.
Spotted by naddy
Add Python${MODPY_MAJOR_VERSION}_{EXECUTABLE,LIBRARY_DIRS,INCLUDE_DIR}
to help CMake to detect the correct python ports version.
OK tb@, discovered in an aarch64 bulk build with Python 3.10 installed at the
time of build.
Override the default binutiles filepath for ar, ranlib, addr2line, nm,
readelf, strip.
Some ports pick up llvm-ar and llvm-ranlib from the ports version of LLVM
tools. This can cause problems if devel/llvm tools (llvm-*) are detected at
configuration time but junked at build time.
Feedback, help and OK sthen@
Ports trying to fetch URLs from variables can be fixed without patching
by passing an absoloute file path as URL, e.g.
file(DOWNLOAD ${CONFIG_URL} ${CMAKE_CURRENT_BINARY_DIR}/config.json)
can be fixed right from our Makefile like so
-DCONFIG_URL=file://${DISTDIR}/myport-config.json
The alternative would be to patch sources to use something akin to
configure_file(${CONFIG_URL} ${CMAKE_CURRENT_BINARY_DIR}/config.json COPYONLY)
UPLOAD does not need this and stays completely neutered in ports builds.
OK sthen rsadowski
- Drop cmComputeLinkInformation.cxx patch
I don't understand why we still have this "workaround". Everything works
WITHOUT it. It comes from very old dark times and was never validated again.
I'm happy to drop it!
- cmGeneratorTarget.cxx patch
cmValue needs heap variables, that fixes a possible crash. Nevertheless,
I still don't like this solution because nothing deletes the string.
I have to dig dipper in the CMake memory management system. Anyway, not
perfect but better than now. I will discuss this with upstream.
- Respect CFLAGS and CXXFLAGS
cmake.port.mk now respects C/CXX flags. With is CMAKE_*_FLAGS_* is obsolete.
- MODCMAKE_LDFLAGS
cmake.port.mk now respects LDFLAGS flags when you set MODCMAKE_LDFLAGS
https://cmake.org/cmake/help/latest/envvar/LDFLAGS.html
Many thanks to tb and sthen. Bulk build by tb, final ok sthen
The default "0.0" version has been broken for several months/years.
MODCMAKE_USE_SHARED_LIBS:
If set to "Yes", CMake will override of shared library version using
LIBxxx_VERSION. LIBxxx_VERSION is created by the module and put in
CONFIGURE_ENV and MAKE_ENV.
If no LIBxxx_VERSION environment variable is present during configure stage
but the shared library was set a VERSION or SOVERSION by CMake, then the
shared library verison is set to 0.0.
Special case: If the CMake target shared library is given the prefix `lib'
and the `PREFIX' option is set to an empty string then the overwrite still
takes effect.
OK kn@, Bulk build by sthen@, Feedback by many; Thanks
Remove the webkit/webengine-wxneeded hack in cmComputeLinkInformation.cxx
and add USE_WXNEEDED=Yes to all cmake webkit/webengine consumer.
Background knowledge about the "hack":
It searches for webkit/webengine (lower-case search) in all link-entries for
EXECUTABLE/SHARED_LIBRARY targets. If the search match it adds
"-Wl,-z,wxneeded".
Feedback, help and OK sthen@ Thanks!
Help porters to find hidden (QUIET) dependencies in cmake ports by disabling
the QUIET option in the ports tree build.
This is controlled at MODCMAKE_PORT_BUILD and is activated by default.
OK kn@
all consumers were packaged and installed on amd64 by me; all python2
syntax in consumers appears to have been updated at this point making
it possible to move to the 4.x series.
lang/ghc bits look ok to gnezdo@
ok sthen@ on the rest
https://cmake.org/cmake/help/latest/variable/CMAKE_SUPPRESS_REGENERATION.html
If something change during the build-task in /usr/local/share/cmake/Modules/
(For example, another package was installed), cmake starts a second configure
tasks after the build task. In this second task our (self hacked) SHARED_LIBS
VERSION's are lost. Whit CMAKE_SUPPRESS_REGENERATION=ON this not happen.
This should lead to significantly better cmake bulk build results.
OK sthen@
if a port needs 2.x then set MODPY_VERSION=${MODPY_DEFAULT_VERSION_2}.
This commit doesn't change any versions currently used; it may be that
some ports have MODPY_DEFAULT_VERSION_2 but don't require it, those
should be cleaned up in the course of updating ports where possible.
Python module ports providing py3-* packages should still use
FLAVOR=python3 so that we don't have a mixture of dependencies some
using ${MODPY_FLAVOR} and others not.
main changes are:
- add a new dep on py-requests
- undo the no longer needed iftex.sty workaround
- move MODPY variables to more standard location
- regen plist
Unfortunately py-sphinx changed the suffix from .txt to .rst.txt in the
1.5 series. This means we have to update PLISTs for about 20+ ports as
a result of this version update. Hopefully future updates of py-sphinx
won't be quite as involved.
ok sthen@