UPSTREAM: meson.build: Fix cmocka to be optional at configure-time

While building with meson, however without libcmocka
available, attempts are made to fetch a copy to build via
the wrap mechanism. However in hermetic build enviroments
this causes hard failure as the dependency declaration of
cmocka is not optional. Fix this to ensure flashrom can build
hermetically in images without libcmocka available.

BUG=none
BRANCH=none
TEST=`
 $ mkdir build && cd build/
 $ meson --wrap-mode=nodownload --wrap-mode=nofallback ../
 $ ninja test # validate configs, builds and no tests are run.
 --
 $ sudo apt install libcmocka-dev
 $ mkdir build && cd build/
 $ meson --wrap-mode=nodownload --wrap-mode=nofallback ../
 $ ninja test # validate configs, builds and tests are run.
`

Original-Change-Id: Ib59f4dacc14be9b02334ca59b348c19e22963367
Original-Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/54368
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
(cherry picked from commit 16c62a791d0a311bb040812b03c33881ab641a8e)

Cq-Depend: chromium:2879374
Change-Id: I3eaa736f3755d610bf070f325bb41824974607ca
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/2903469
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
1 file changed
tree: 27434fd6ac794eb25c083bfaa50d71caf5b1e886
  1. Documentation/
  2. subprojects/
  3. tests/
  4. util/
  5. .gitattributes
  6. .gitignore
  7. 82802ab.c
  8. action_descriptor.c
  9. action_descriptor.h
  10. amd_imc.c
  11. archtest.c
  12. at45db.c
  13. atahpt.c
  14. atapromise.c
  15. atavia.c
  16. big_lock.c
  17. big_lock.h
  18. bitbang_spi.c
  19. board_enable.c
  20. buspirate_spi.c
  21. cbtable.c
  22. ch341a_spi.c
  23. chipdrivers.h
  24. chipset_enable.c
  25. cli_classic.c
  26. cli_common.c
  27. cli_output.c
  28. COPYING
  29. coreboot_tables.h
  30. cros_alias.c
  31. cros_ec.c
  32. cros_ec.h
  33. cros_ec_commands.h
  34. cros_ec_dev.c
  35. custom_baud.c
  36. custom_baud.h
  37. dediprog.c
  38. developerbox_spi.c
  39. digilent_spi.c
  40. dmi.c
  41. drkaiser.c
  42. dummyflasher.c
  43. edi.c
  44. edi.h
  45. en29lv640b.c
  46. endiantest.c
  47. ene.h
  48. ene_lpc.c
  49. file.c
  50. file.h
  51. file_lock.c
  52. flash.h
  53. flashchips.c
  54. flashchips.h
  55. flashrom.8.tmpl
  56. flashrom.c
  57. fmap.c
  58. fmap.h
  59. ft2232_spi.c
  60. gfxnvidia.c
  61. helpers.c
  62. hwaccess.c
  63. hwaccess.h
  64. hwaccess_x86_io.h
  65. i2c_helper.h
  66. i2c_helper_linux.c
  67. ich_descriptors.c
  68. ich_descriptors.h
  69. ichspi.c
  70. internal.c
  71. ipc_lock.h
  72. it8212.c
  73. it85spi.c
  74. it87spi.c
  75. jedec.c
  76. jlink_spi.c
  77. layout.c
  78. layout.h
  79. libflashrom.c
  80. libflashrom.h
  81. libflashrom.map
  82. linux_mtd.c
  83. linux_spi.c
  84. lspcon_i2c_spi.c
  85. Makefile
  86. mcp6x_spi.c
  87. mec1308.c
  88. meson.build
  89. meson_options.txt
  90. mstarddc_spi.c
  91. ni845x_spi.c
  92. nic3com.c
  93. nicintel.c
  94. nicintel_eeprom.c
  95. nicintel_spi.c
  96. nicnatsemi.c
  97. nicrealtek.c
  98. ogp_spi.c
  99. opaque.c
  100. os.h
  101. OWNERS
  102. pcidev.c
  103. physmap.c
  104. pickit2_spi.c
  105. platform.h
  106. pony_spi.c
  107. power.c
  108. power.h
  109. PRESUBMIT.cfg
  110. print.c
  111. print_wiki.c
  112. processor_enable.c
  113. programmer.c
  114. programmer.h
  115. raiden_debug_spi.c
  116. rayer_spi.c
  117. README
  118. README.chromiumos
  119. realtek_mst_i2c_spi.c
  120. s25f.c
  121. satamv.c
  122. satasii.c
  123. sb600spi.c
  124. serial.c
  125. serprog.c
  126. serprog.h
  127. sfdp.c
  128. spi.c
  129. spi.h
  130. spi25.c
  131. spi25_statusreg.c
  132. spi95.c
  133. sst28sf040.c
  134. sst49lfxxxc.c
  135. sst_fwhub.c
  136. stlinkv3_spi.c
  137. stm50.c
  138. udelay.c
  139. unittest_env.h
  140. usb_device.c
  141. usb_device.h
  142. usbblaster_spi.c
  143. usbdev.c
  144. w29ee011.c
  145. w39.c
  146. wbsio_spi.c
  147. writeprotect.c
  148. writeprotect.h