From kde-buildsystem Tue Aug 24 20:21:51 2010 From: Maciej Mrozowski Date: Tue, 24 Aug 2010 20:21:51 +0000 To: kde-buildsystem Subject: Re: Please review: cmake check for Cagibi Message-Id: <201008242221.51996.reavertm () gmail ! com> X-MARC-Message: https://marc.info/?l=kde-buildsystem&m=128268134926091 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1520641134==" --===============1520641134== Content-Type: multipart/signed; boundary="nextPart3830018.LpoIsa5yJZ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart3830018.LpoIsa5yJZ Content-Type: multipart/mixed; boundary="Boundary-01=_fnCdMoJU73To3/u" Content-Transfer-Encoding: 7bit --Boundary-01=_fnCdMoJU73To3/u Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 24 of August 2010 21:21:08 Friedrich W. H. Kossebau wrote: > Mardi, le 24 ao=C3=BBt 2010, =C3=A0 20:02, Maciej Mrozowski a =C3=A9crit: > > On Tuesday 24 of August 2010 02:34:05 Friedrich W. H. Kossebau wrote: > > > Mardi, le 24 ao=C3=BBt 2010, =C3=A0 01:24, Yury G. Kudryashov a =C3= =A9crit: > > > > BTW, what about adding one more parameter to m_l_f that tells wheth= er > > > > dependency is a runtime dep (default to FALSE)? Or even add another > > > > macro because "required" flag MUST be FALSE for runtime dependencie= s? > > > > Then we'll be able to say: > > > > =3D=3D THE FOLLOWING RUNTIME DEPENDENCIES ARE MISSING ON YOUR SYSTE= M =3D=3D > > >=20 > > > That might be indeed most useful and nice to have, I agree > > > (non-packager, but self-compiler :) ). > >=20 > > Otherwise listing runtime-only dependencies in README file is just as > > good (what said kajonggh does for instance). > >=20 > > It's even better than CMake checks in case all runtime-only dependencies > > are met (so no missing deps are reported) - as packager is not aware of > > them. >=20 > True, good hint. So if packagers do read README file, than I will add one, > too. Hm, should then be kdebase/runtime/README, or can I ever expect some > packager to read kdebase/runtime/kioslave/network/README? Indeed, hunting down all those files may be difficult. > Might be good if this could be standardized. > I still like Yury's proposal for that, as it integrates into the log > creation, so all dependencies can be seen at one place, no need to search > somewhere else. I guess Yury also had the second listing in mind, > =3D=3D THE FOLLOWING RUNTIME DEPENDENCIES ARE AVAILABLE ON YOUR SYSTEM = =3D=3D Definitely some macro would be handy. If it was up to me, I wouldn't provid= e=20 separate lists for missing and met runtime dependencies. As a packager I'm only concerned what runtime dependencies are needed, and = not=20 what's actually installed in my build box. With that mind, runtime-only dependency handling could be simplified to: (s= ee=20 attachment): macro_log_runtime_dependency("FOO" "File Ownership Obstuctor" "http://foo.o= rg"=20 TRUE "" "Sophisticated file ownership obstructor. Required by KIO.") Will produce following output: =2D------------------------------------------------------------------------= =2D--- =2D- The following RUNTIME-ONLY dependencies may be needed. =2D- Consider installing them to enable more features from this software. =2D------------------------------------------------------------------------= =2D--- * FOO REQUIRED File Ownership Obstuctor Sophisticated file ownership obstructor. Required by KIO. =2D-=20 regards MM --Boundary-01=_fnCdMoJU73To3/u Content-Type: text/x-patch; charset="UTF-8"; name="macro_log_runtime_dependency.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="macro_log_runtime_dependency.diff" Index: cmake/modules/MacroLogFeature.cmake =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- cmake/modules/MacroLogFeature.cmake (revision 1167465) +++ cmake/modules/MacroLogFeature.cmake (working copy) @@ -45,9 +45,14 @@ SET(_file ${CMAKE_BINARY_DIR}/DisabledFeatures.txt) IF (EXISTS ${_file}) FILE(REMOVE ${_file}) =2D ENDIF (EXISTS ${_file}) + ENDIF (EXISTS ${_file}) =20 =2D SET(_macroLogFeatureAlreadyIncluded TRUE) + SET(_file ${CMAKE_BINARY_DIR}/RuntimeDependencies.txt) + IF (EXISTS ${_file}) + FILE(REMOVE ${_file}) + ENDIF (EXISTS ${_file}) + + SET(_macroLogFeatureAlreadyIncluded TRUE) ENDIF (NOT _macroLogFeatureAlreadyIncluded) =20 =20 @@ -56,7 +61,7 @@ STRING(TOUPPER "${ARGV4}" _required) SET(_minvers "${ARGV5}") SET(_comments "${ARGV6}") =2D =20 + IF (${_var}) SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/EnabledFeatures.txt) ELSE (${_var}) @@ -88,19 +93,47 @@ ENDIF (NOT ${_var}) =20 FILE(APPEND "${_LOGFILENAME}" "${_logtext}\n") =2D=20 + ENDMACRO(MACRO_LOG_FEATURE) =20 =20 +MACRO(MACRO_LOG_RUNTIME_DEPENDENCY _package _description _url ) # _require= d _minvers _comments) + + STRING(TOUPPER "${ARGV3}" _required) + SET(_minvers "${ARGV4}") + SET(_comments "${ARGV5}") + SET(_LOGFILENAME ${CMAKE_BINARY_DIR}/RuntimeDependencies.txt) + + SET(_logtext " * ${_package}") + IF (${_minvers} MATCHES ".*") + SET(_logtext "${_logtext} (${_minvers} or higher)") + ENDIF (${_minvers} MATCHES ".*") + SET(_logtext "${_logtext} <${_url}>") + IF ("${_required}" STREQUAL "TRUE") + SET(_logtext "${_logtext} REQUIRED") + ELSE ("${_required}" STREQUAL "TRUE") + SET(_logtext "${_logtext} OPTIONAL") + ENDIF ("${_required}" STREQUAL "TRUE") + SET(_logtext "${_logtext}\n ${_description}") + IF (${_comments} MATCHES ".*") + SET(_logtext "${_logtext}\n ${_comments}") + ENDIF (${_comments} MATCHES ".*") + + FILE(APPEND "${_LOGFILENAME}" "${_logtext}\n") + +ENDMACRO(MACRO_LOG_RUNTIME_DEPENDENCY) + + MACRO(MACRO_DISPLAY_FEATURE_LOG) =20 SET(_missingFile ${CMAKE_BINARY_DIR}/MissingRequirements.txt) SET(_enabledFile ${CMAKE_BINARY_DIR}/EnabledFeatures.txt) SET(_disabledFile ${CMAKE_BINARY_DIR}/DisabledFeatures.txt) + SET(_runtimeFile ${CMAKE_BINARY_DIR}/RuntimeDependencies.txt) =20 =2D IF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_dis= abledFile}) + IF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_disab= ledFile} OR EXISTS ${_runtimeFile}) SET(_printSummary TRUE) =2D ENDIF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_= disabledFile}) + ENDIF (EXISTS ${_missingFile} OR EXISTS ${_enabledFile} OR EXISTS ${_di= sabledFile} OR EXISTS ${_runtimeFile}) =20 IF(_printSummary) SET(_missingDeps 0) @@ -133,6 +166,13 @@ ENDIF (NOT ${_missingDeps}) =20 =20 + IF (EXISTS ${_runtimeFile}) + FILE(READ ${_runtimeFile} _runtime) + SET(_summary "${_summary}\n----------------------------------------= =2D------------------------------------\n-- The following RUNTIME-ONLY depe= ndencies may be needed.\n-- Consider installing them to enable more feature= s from this software.\n----------------------------------------------------= =2D------------------------\n${_runtime}") + FILE(REMOVE ${_runtimeFile}) + ENDIF (EXISTS ${_runtimeFile}) + + MESSAGE(${_summary}) MESSAGE("------------------------------------------------------------= =2D----------------\n") =20 --Boundary-01=_fnCdMoJU73To3/u-- --nextPart3830018.LpoIsa5yJZ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEABECAAYFAkx0Kd8ACgkQFuHa/bHpVduM+ACeO6yeSJd3pqHBQZOvBK6Fan/O h+cAoMDRfcz7TGz8qwtnTRMqllGi0tdM =aEgk -----END PGP SIGNATURE----- --nextPart3830018.LpoIsa5yJZ-- --===============1520641134== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem --===============1520641134==--